HTMLGen.h (xpdf-4.03) | : | HTMLGen.h (xpdf-4.04) | ||
---|---|---|---|---|
//======================================================================== | //======================================================================== | |||
// | // | |||
// HTMLGen.h | // HTMLGen.h | |||
// | // | |||
// Copyright 2010 Glyph & Cog, LLC | // Copyright 2010-2021 Glyph & Cog, LLC | |||
// | // | |||
//======================================================================== | //======================================================================== | |||
#ifndef HTMLGEN_H | #ifndef HTMLGEN_H | |||
#define HTMLGEN_H | #define HTMLGEN_H | |||
#include <aconf.h> | #include <aconf.h> | |||
#ifdef USE_GCC_PRAGMAS | #ifdef USE_GCC_PRAGMAS | |||
#pragma interface | #pragma interface | |||
skipping to change at line 30 | skipping to change at line 30 | |||
class TextOutputDev; | class TextOutputDev; | |||
class TextFontInfo; | class TextFontInfo; | |||
class SplashOutputDev; | class SplashOutputDev; | |||
class HTMLGenFontDefn; | class HTMLGenFontDefn; | |||
//------------------------------------------------------------------------ | //------------------------------------------------------------------------ | |||
class HTMLGen { | class HTMLGen { | |||
public: | public: | |||
HTMLGen(double backgroundResolutionA); | HTMLGen(double backgroundResolutionA, GBool tableMode); | |||
~HTMLGen(); | ~HTMLGen(); | |||
GBool isOk() { return ok; } | GBool isOk() { return ok; } | |||
double getBackgroundResolution() { return backgroundResolution; } | double getBackgroundResolution() { return backgroundResolution; } | |||
void setBackgroundResolution(double backgroundResolutionA) | void setBackgroundResolution(double backgroundResolutionA) | |||
{ backgroundResolution = backgroundResolutionA; } | { backgroundResolution = backgroundResolutionA; } | |||
double getZoom() { return zoom; } | double getZoom() { return zoom; } | |||
void setZoom(double zoomA) { zoom = zoomA; } | void setZoom(double zoomA) { zoom = zoomA; } | |||
void setVStretch(double vStretchA) { vStretch = vStretchA; } | ||||
GBool getDrawInvisibleText() { return drawInvisibleText; } | GBool getDrawInvisibleText() { return drawInvisibleText; } | |||
void setDrawInvisibleText(GBool drawInvisibleTextA) | void setDrawInvisibleText(GBool drawInvisibleTextA) | |||
{ drawInvisibleText = drawInvisibleTextA; } | { drawInvisibleText = drawInvisibleTextA; } | |||
GBool getAllTextInvisible() { return allTextInvisible; } | GBool getAllTextInvisible() { return allTextInvisible; } | |||
void setAllTextInvisible(GBool allTextInvisibleA) | void setAllTextInvisible(GBool allTextInvisibleA) | |||
{ allTextInvisible = allTextInvisibleA; } | { allTextInvisible = allTextInvisibleA; } | |||
void setExtractFontFiles(GBool extractFontFilesA) | void setExtractFontFiles(GBool extractFontFilesA) | |||
{ extractFontFiles = extractFontFilesA; } | { extractFontFiles = extractFontFilesA; } | |||
void setConvertFormFields(GBool convertFormFieldsA) | ||||
{ convertFormFields = convertFormFieldsA; } | ||||
void setEmbedBackgroundImage(GBool embedBackgroundImageA) | ||||
{ embedBackgroundImage = embedBackgroundImageA; } | ||||
void setEmbedFonts(GBool embedFontsA) | ||||
{ embedFonts = embedFontsA; } | ||||
void startDoc(PDFDoc *docA); | void startDoc(PDFDoc *docA); | |||
int convertPage(int pg, const char *pngURL, const char *htmlDir, | int convertPage(int pg, const char *pngURL, const char *htmlDir, | |||
int (*writeHTML)(void *stream, const char *data, int size), | int (*writeHTML)(void *stream, const char *data, int size), | |||
void *htmlStream, | void *htmlStream, | |||
int (*writePNG)(void *stream, const char *data, int size), | int (*writePNG)(void *stream, const char *data, int size), | |||
void *pngStream); | void *pngStream); | |||
private: | private: | |||
int findDirSpan(GList *words, int firstWordIdx, int primaryDir, | int findDirSpan(GList *words, int firstWordIdx, int primaryDir, | |||
skipping to change at line 77 | skipping to change at line 88 | |||
void appendUTF8(Unicode u, GString *s); | void appendUTF8(Unicode u, GString *s); | |||
HTMLGenFontDefn *getFontDefn(TextFontInfo *font, const char *htmlDir); | HTMLGenFontDefn *getFontDefn(TextFontInfo *font, const char *htmlDir); | |||
HTMLGenFontDefn *getFontFile(TextFontInfo *font, const char *htmlDir); | HTMLGenFontDefn *getFontFile(TextFontInfo *font, const char *htmlDir); | |||
HTMLGenFontDefn *getSubstituteFont(TextFontInfo *font); | HTMLGenFontDefn *getSubstituteFont(TextFontInfo *font); | |||
void getFontDetails(TextFontInfo *font, const char **family, | void getFontDetails(TextFontInfo *font, const char **family, | |||
const char **weight, const char **style, | const char **weight, const char **style, | |||
double *scale); | double *scale); | |||
double backgroundResolution; | double backgroundResolution; | |||
double zoom; | double zoom; | |||
double vStretch; | ||||
GBool drawInvisibleText; | GBool drawInvisibleText; | |||
GBool allTextInvisible; | GBool allTextInvisible; | |||
GBool extractFontFiles; | GBool extractFontFiles; | |||
GBool convertFormFields; | ||||
GBool embedBackgroundImage; | ||||
GBool embedFonts; | ||||
PDFDoc *doc; | PDFDoc *doc; | |||
TextOutputDev *textOut; | TextOutputDev *textOut; | |||
SplashOutputDev *splashOut; | SplashOutputDev *splashOut; | |||
GList *fonts; // [TextFontInfo] | GList *fonts; // [TextFontInfo] | |||
double *fontScales; | double *fontScales; | |||
GList *fontDefns; // [HTMLGenFontDefn] | GList *fontDefns; // [HTMLGenFontDefn] | |||
int nextFontFaceIdx; | int nextFontFaceIdx; | |||
TextFontInfo *formFieldFont; | ||||
GList *formFieldInfo; // [HTMLGenFormFieldInfo] | ||||
int nextFieldID; | ||||
GBool ok; | GBool ok; | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 7 change blocks. | ||||
2 lines changed or deleted | 21 lines changed or added |