Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/TextOutputDev.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/TextOutputDev.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/TextOutputDev.h b/noncore/unsupported/qpdf/xpdf/TextOutputDev.h index 4c71e5e..f0f238e 100644 --- a/noncore/unsupported/qpdf/xpdf/TextOutputDev.h +++ b/noncore/unsupported/qpdf/xpdf/TextOutputDev.h @@ -4,3 +4,3 @@ // -// Copyright 1997 Derek B. Noonburg +// Copyright 1997-2002 Glyph & Cog, LLC // @@ -24,2 +24,6 @@ class GString; //------------------------------------------------------------------------ + +typedef void (*TextOutputFunc)(void *stream, char *text, int len); + +//------------------------------------------------------------------------ // TextString @@ -99,3 +103,3 @@ public: // Dump contents of page to a file. - void dump(FILE *f); + void dump(void *outputStream, TextOutputFunc outputFunc); @@ -130,2 +134,6 @@ public: + // Create a TextOutputDev which will write to a generic stream. If + // <rawOrder> is true, the text is kept in content stream order. + TextOutputDev(TextOutputFunc func, void *stream, GBool rawOrderA); + // Destructor. @@ -145,2 +153,6 @@ public: + // Does this device use beginType3Char/endType3Char? Otherwise, + // text in Type 3 fonts will be drawn with drawChar/drawString. + virtual GBool interpretType3Chars() { return gFalse; } + // Does this device need non-text content? @@ -181,4 +193,6 @@ private: - FILE *f; // text file - GBool needClose; // need to close the file? + TextOutputFunc outputFunc; // output function + void *outputStream; // output stream + GBool needClose; // need to close the output file? + // (only if outputStream is a FILE*) TextPage *text; // text for the current page |