+static char*getFontID(GfxFont*font);
+
+class InfoOutputDev: public OutputDev
+{
+ public:
+ int x1,y1,x2,y2;
+ int has_links;
+ int has_images;
+
+ InfoOutputDev()
+ {
+ has_links = 0;
+ has_images = 0;
+ }
+ virtual ~InfoOutputDev() {}
+ virtual GBool upsideDown() {return gTrue;}
+ virtual GBool useDrawChar() {return gTrue;}
+ virtual GBool useGradients() {return gTrue;}
+ virtual GBool interpretType3Chars() {return gTrue;}
+ virtual void startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2)
+ {
+ double x1,y1,x2,y2;
+ state->transform(crop_x1,crop_y1,&x1,&y1);
+ state->transform(crop_x2,crop_y2,&x2,&y2);
+ if(x2<x1) {double x3=x1;x1=x2;x2=x3;}
+ if(y2<y1) {double y3=y1;y1=y2;y2=y3;}
+ this->x1 = (int)x1;
+ this->y1 = (int)y1;
+ this->x2 = (int)x2;
+ this->y2 = (int)y2;
+ }
+ virtual void drawLink(Link *link, Catalog *catalog)
+ {
+ has_links = 1;
+ }
+ virtual void updateFont(GfxState *state)
+ {
+ char*id = getFontID(state->getFont());
+ }
+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GBool invert,
+ GBool inlineImg)
+ {
+ has_images = 1;
+ }
+ virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+ int *maskColors, GBool inlineImg)
+ {
+ has_images = 1;
+ }
+};
+