Index: glib/poppler-document.cc =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler-document.cc,v retrieving revision 1.37 diff -u -8 -p -r1.37 poppler-document.cc --- glib/poppler-document.cc 19 May 2006 22:12:38 -0000 1.37 +++ glib/poppler-document.cc 16 Jun 2006 17:40:17 -0000 @@ -1343,8 +1343,55 @@ poppler_ps_file_set_duplex (PopplerPSFil * **/ void poppler_ps_file_free (PopplerPSFile *ps_file) { g_return_if_fail (ps_file != NULL); g_object_unref (ps_file); } + +void +poppler_document_set_form_field_content (PopplerDocument *document, int id, char *content) +{ + Catalog *catalog = document->doc->getCatalog(); + int numPages = catalog->getNumPages(); + for (int i=1; i<=numPages; i++) { + Form *form = catalog->getPage(i)->getForm(); + FormField *field = form->getFieldById(id); + if (field) { + field->setContentCopy(content); + } + } +} + +gchar * +poppler_document_get_form_field_content (PopplerDocument *document, int id) +{ + PopplerFormField *field = poppler_document_find_form_field_by_id(document, id); + if (field) + return field->content; + else { + g_warning("poppler_document_get_form_field_content, unknown id: %i", id); + return NULL; + } +} + +PopplerFormField * +poppler_document_find_form_field_by_id (PopplerDocument *document, int id) +{ + Catalog *catalog = document->doc->getCatalog(); + //decode id + int pageNum = id >> 16; + int fieldNum = (id << 16) >> 16; + FormField *field = catalog->getPage(pageNum)->getForm()->getField(fieldNum); + if (field != NULL) { + PopplerFormField *poppler_field; + poppler_field = g_new(PopplerFormField, 1); + field->getRect ((&poppler_field->area.x1), &(poppler_field->area.y1), + &(poppler_field->area.x2), &(poppler_field->area.y2)); + poppler_field->type = (PopplerFormFieldType)field->getType(); + poppler_field->id = field->getID(); + poppler_field->content = field->getContentCopy(); + return poppler_field; + } else + return NULL; +} Index: glib/poppler-document.h =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler-document.h,v retrieving revision 1.21 diff -u -8 -p -r1.21 poppler-document.h --- glib/poppler-document.h 19 May 2006 22:19:21 -0000 1.21 +++ glib/poppler-document.h 16 Jun 2006 17:40:17 -0000 @@ -103,16 +103,27 @@ PopplerPage *poppler_document_get_pa /* Attachments */ gboolean poppler_document_has_attachments (PopplerDocument *document); GList *poppler_document_get_attachments (PopplerDocument *document); /* Links */ PopplerDest *poppler_document_find_dest (PopplerDocument *document, const gchar *link_name); +/* Form */ +void poppler_document_set_form_field_content (PopplerDocument *document, + int id, + char *content); +PopplerFormField *poppler_document_find_form_field_by_id (PopplerDocument *document, + int id); + +gchar * +poppler_document_get_form_field_content (PopplerDocument *document, int id); + + /* Interface for getting the Index of a poppler_document */ #define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type ()) GType poppler_index_iter_get_type (void) G_GNUC_CONST; PopplerIndexIter *poppler_index_iter_new (PopplerDocument *document); PopplerIndexIter *poppler_index_iter_copy (PopplerIndexIter *iter); void poppler_index_iter_free (PopplerIndexIter *iter); PopplerIndexIter *poppler_index_iter_get_child (PopplerIndexIter *parent); Index: glib/poppler-page.cc =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v retrieving revision 1.50 diff -u -8 -p -r1.50 poppler-page.cc --- glib/poppler-page.cc 19 May 2006 21:42:54 -0000 1.50 +++ glib/poppler-page.cc 16 Jun 2006 17:40:19 -0000 @@ -980,8 +980,104 @@ poppler_link_mapping_copy (PopplerLinkMa void poppler_link_mapping_free (PopplerLinkMapping *mapping) { if (mapping) poppler_action_free (mapping->action); g_free (mapping); } + + +/* Form Type */ +GType +poppler_form_field_get_type (void) +{ + static GType our_type = 0; + if (our_type == 0) + our_type = g_boxed_type_register_static("PopplerFormField", + (GBoxedCopyFunc) poppler_form_field_copy, + (GBoxedFreeFunc) poppler_form_field_free); + return our_type; +} + +PopplerFormField* +poppler_form_field_new (void) +{ + return (PopplerFormField *) g_new0 (PopplerFormField, 1); +} + +PopplerFormField* +poppler_form_field_copy (PopplerFormField* field) +{ + PopplerFormField* new_field; + new_field = poppler_form_field_new(); + new_field = field; + return new_field; +} + +void +poppler_form_field_free (PopplerFormField* field) +{ + g_free (field); +} + +/** + * poppler_page_get_form_fields + **/ + +GList* +poppler_page_get_form_fields (PopplerPage *page) +{ + GList *field_list = NULL; + Form *form; + gint i; + Object obj; + + g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL); + + //form = new Form(page->page->getAnnots (&obj)); + form = page->page->getForm(); + + obj.free (); + if(form == NULL) + return NULL; + + + for(i = 0; i < form->getNumFields(); i++) { + PopplerFormField *poppler_field; + FormField *field; + field = form->getField(i); + + poppler_field = g_new(PopplerFormField, 1); + field->getRect (&(poppler_field->area.x1), &(poppler_field->area.y1), + &(poppler_field->area.x2), &(poppler_field->area.y2)); + + poppler_field->type = (PopplerFormFieldType)field->getType(); + poppler_field->id = field->getID(); + poppler_field->content = field->getContentCopy(); + field_list = g_list_prepend(field_list,poppler_field); + } + return field_list; + +} + +void +poppler_page_free_form_fields (GList *list) +{ + if (list == NULL) + return; + + g_list_foreach (list, (GFunc) (poppler_form_field_free), NULL); + g_list_free (list); + +} + +void +poppler_page_get_crop_box (PopplerPage *page, PopplerRectangle *rect) +{ + PDFRectangle* cropBox = page->page->getCropBox(); + rect->x1 = cropBox->x1; + rect->x2 = cropBox->x2; + rect->y1 = cropBox->y1; + rect->y2 = cropBox->y2; +} + Index: glib/poppler-page.h =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler-page.h,v retrieving revision 1.21 diff -u -8 -p -r1.21 poppler-page.h --- glib/poppler-page.h 12 Apr 2006 02:07:07 -0000 1.21 +++ glib/poppler-page.h 16 Jun 2006 17:40:19 -0000 @@ -75,16 +75,21 @@ GdkRegion * poppler_page_get_sel void poppler_page_render_selection (PopplerPage *page, gdouble scale, int rotation, GdkPixbuf *pixbuf, PopplerRectangle *selection, PopplerRectangle *old_selection, GdkColor *glyph_color, GdkColor *background_color); +GList *poppler_page_get_form_fields (PopplerPage *page); +void poppler_page_free_form_fields (GList *list); + +void poppler_page_get_crop_box (PopplerPage *page, + PopplerRectangle *rect); /* A rectangle on a page, with coordinates in PDF points. */ #define POPPLER_TYPE_RECTANGLE (poppler_rectangle_get_type ()) struct _PopplerRectangle { gdouble x1; gdouble y1; @@ -107,11 +112,27 @@ struct _PopplerLinkMapping PopplerAction *action; }; GType poppler_link_mapping_get_type (void) G_GNUC_CONST; PopplerLinkMapping *poppler_link_mapping_new (void); PopplerLinkMapping *poppler_link_mapping_copy (PopplerLinkMapping *mapping); void poppler_link_mapping_free (PopplerLinkMapping *mapping); +/* FormField */ +#define POPPLER_TYPE_FORM_FIELD (poppler_form_field_get_type ()) +struct _PopplerFormField +{ + PopplerRectangle area; + PopplerFormFieldType type; + gchar *content; + int id; + +}; + +GType poppler_form_field_get_type (void) G_GNUC_CONST; +PopplerFormField *poppler_form_field_new (void); +PopplerFormField *poppler_form_field_copy (PopplerFormField *field); +void poppler_form_field_free (PopplerFormField *field); + G_END_DECLS #endif /* __POPPLER_PAGE_H__ */ Index: glib/poppler-private.h =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler-private.h,v retrieving revision 1.16 diff -u -8 -p -r1.16 poppler-private.h --- glib/poppler-private.h 19 May 2006 20:54:13 -0000 1.16 +++ glib/poppler-private.h 16 Jun 2006 17:40:19 -0000 @@ -1,15 +1,16 @@ #ifndef __POPPLER_PRIVATE_H__ #define __POPPLER_PRIVATE_H__ #include #include #include #include +#include #include #include #include #include #include "poppler-attachment.h" #if defined (HAVE_CAIRO) Index: glib/poppler.h =================================================================== RCS file: /cvs/poppler/poppler/glib/poppler.h,v retrieving revision 1.12 diff -u -8 -p -r1.12 poppler.h --- glib/poppler.h 16 Apr 2006 22:59:44 -0000 1.12 +++ glib/poppler.h 16 Jun 2006 17:40:20 -0000 @@ -37,21 +37,32 @@ typedef enum typedef enum { POPPLER_ORIENTATION_PORTRAIT, POPPLER_ORIENTATION_LANDSCAPE, POPPLER_ORIENTATION_UPSIDEDOWN, POPPLER_ORIENTATION_SEASCAPE } PopplerOrientation; +/* MUST be the same than poppler/Form.h fieldType */ +typedef enum +{ + POPPLER_FORM_FIELD_BUTTON, + POPPLER_FORM_FIELD_TEXT, + POPPLER_FORM_FIELD_CHOICE, + POPPLER_FORM_FIELD_SIGNATURE +} PopplerFormFieldType; + + typedef struct _PopplerDocument PopplerDocument; typedef struct _PopplerIndexIter PopplerIndexIter; typedef struct _PopplerFontsIter PopplerFontsIter; typedef struct _PopplerRectangle PopplerRectangle; typedef struct _PopplerLinkMapping PopplerLinkMapping; +typedef struct _PopplerFormField PopplerFormField; typedef struct _PopplerPage PopplerPage; typedef struct _PopplerFontInfo PopplerFontInfo; typedef struct _PopplerPSFile PopplerPSFile; typedef union _PopplerAction PopplerAction; typedef struct _PopplerDest PopplerDest; typedef enum Index: poppler/Form.cc =================================================================== RCS file: poppler/Form.cc diff -N poppler/Form.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ poppler/Form.cc 16 Jun 2006 17:40:20 -0000 @@ -0,0 +1,252 @@ +//======================================================================== +// +// Form.cc +// +// Copyright 1996-2003 Glyph & Cog, LLC +// Copyright 2006 Julien Rebetez +// +//======================================================================== + +#include + +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + +#include +#include +#include "goo/gmem.h" +#include "goo/GooString.h" +#include "Error.h" +#include "Object.h" +#include "Array.h" +#include "Dict.h" +#include "Form.h" +#include "UGooString.h" + + +//======================================================================== +// FormField +//======================================================================== + +FormField::FormField(Dict *dict, unsigned id) { + Object obj1, obj2, obj3i; + double t; + + ID = id; + ok = gFalse; + content = NULL; + // get rectangle + if (!dict->lookup("Rect", &obj1)->isArray()) { + error(-1, "Annotation rectangle is wrong type"); + goto err2; + } + if (!obj1.arrayGet(0, &obj2)->isNum()) { + error(-1, "Bad annotation rectangle"); + goto err1; + } + x1 = obj2.getNum(); + obj2.free(); + if (!obj1.arrayGet(1, &obj2)->isNum()) { + error(-1, "Bad annotation rectangle"); + goto err1; + } + y1 = obj2.getNum(); + obj2.free(); + if (!obj1.arrayGet(2, &obj2)->isNum()) { + error(-1, "Bad annotation rectangle"); + goto err1; + } + x2 = obj2.getNum(); + obj2.free(); + if (!obj1.arrayGet(3, &obj2)->isNum()) { + error(-1, "Bad annotation rectangle"); + goto err1; + } + y2 = obj2.getNum(); + obj2.free(); + obj1.free(); + //swap coords if needed + if (x1 > x2) { + t = x1; + x1 = x2; + x2 = t; + } + if (y1 > y2) { + t = y1; + y1 = y2; + y2 = t; + } + + + + ok = gTrue; + + err1: + obj2.free(); + err2: + obj1.free(); +} + +FormField::FormField(FormField *dest) +{ + x1 = dest->x1; + y1 = dest->y1; + x2 = dest->x2; + y2 = dest->x2; + + ok = dest->ok; + + type = dest->type; +} + +FormField::~FormField() +{ + +} + +//------------------------------------------------------------------------ +// FormFieldButton +//------------------------------------------------------------------------ +FormFieldButton::FormFieldButton(Dict *dict, unsigned id) : FormField(dict, id) +{ + type = fieldButton; +} + +FormFieldButton::~FormFieldButton() +{ + +} + +//------------------------------------------------------------------------ +// FormFieldText +//------------------------------------------------------------------------ +FormFieldText::FormFieldText(Dict *dict, unsigned id) : FormField(dict, id) +{ + type = fieldText; +} + +FormFieldText::~FormFieldText() +{ + +} + +//------------------------------------------------------------------------ +// FormFieldChoice +//------------------------------------------------------------------------ +FormFieldChoice::FormFieldChoice(Dict *dict, unsigned id) : FormField(dict, id) +{ + type = fieldChoice; +} + +FormFieldChoice::~FormFieldChoice() +{ + +} + +//------------------------------------------------------------------------ +// FormFieldSignature +//------------------------------------------------------------------------ +FormFieldSignature::FormFieldSignature(Dict *dict, unsigned id): FormField(dict, id) +{ + type = fieldSignature; +} + +FormFieldSignature::~FormFieldSignature() +{ + +} + +//------------------------------------------------------------------------ +// Form +//------------------------------------------------------------------------ + +Form::Form(Object* annots, unsigned page) +{ + FormField* field; + Object obj1, obj2; + int size; + int i; + unsigned count = 0; + + fields = NULL; + size = 0; + numFields = 0; + pageNum = page; + + if (annots->isArray()) { + for (i = 0; i < annots->arrayGetLength(); ++i) { + if (annots->arrayGet(i, &obj1)->isDict()) { + if (obj1.dictLookup("Subtype", &obj2)->isName("Widget")) { + unsigned id = ((unsigned)pageNum << 16) + count; + obj2.free(); + if(obj1.dictLookup("FT", &obj2)->isName("Btn")) { + field = new FormFieldButton(obj1.getDict(),id); + count++; + } else if (obj2.isName("Tx")) { + field = new FormFieldText(obj1.getDict(),id); + count++; + } else if (obj2.isName("Ch")) { + field = new FormFieldChoice(obj1.getDict(),id); + count++; + } else if (obj2.isName("Sig")) { + field = new FormFieldSignature(obj1.getDict(),id); + count++; + } else { + goto err1; + } + if (field->isOk()) { + if (numFields >= size) { + size += 16; + fields = (FormField**)greallocn(fields,size,sizeof(FormField*)); + } + fields[numFields++] = field; + } else { + delete field; + } + + } +err1: + obj2.free(); + } + obj1.free(); + } + } + +} + +Form::~Form() { + int i; + for(i = 0; i< numFields; ++i) + delete fields[i]; + gfree(fields); +} + +FormField *Form::find(double x, double y) const { + int i; + for (i = numFields -1; i>= 0; --i) { + if (fields[i]->inRect(x, y)) { + return fields[i]; + } + } + return NULL; +} + +FormField* Form::getFieldById (unsigned int id) const { + int i; + for (i=0; igetID() == id) { + return fields[i]; + } + } + return NULL; +} +GBool Form::onField(double x, double y) const { + int i; + for (i =0; iinRect(x,y)) + return gTrue; + } + return gFalse; +} + Index: poppler/Form.h =================================================================== RCS file: poppler/Form.h diff -N poppler/Form.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ poppler/Form.h 16 Jun 2006 17:40:20 -0000 @@ -0,0 +1,176 @@ +//======================================================================== +// +// Form.h +// +// Copyright 2006 Julien Rebetez +// Copyright 1996-2003 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef FORM_H +#define FORM_H + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "Object.h" + +class GooString; +class UGooString; +class Array; +class Dict; + + +//------------------------------------------------------------------------ +// FormFieldType +//------------------------------------------------------------------------ + +enum FormFieldType { + fieldButton, + fieldText, + fieldChoice, + fieldSignature +}; + +class FormField { +public: + // Destructor + virtual ~FormField(); + + // Copy a FormField + FormField *copy() { return new FormField(this); } + + // Was the FormField created successfully ? + GBool isOk() { return ok; } + + // Check if point is inside the field rectangle + GBool inRect(double x, double y) + { return x1 <= x && x <= x2 && y1 <= y && y <= y2; } + + // Get the field rectangle + void getRect(double *xa1, double *ya1, double *xa2, double *ya2) + { *xa1 = x1; *ya1 = y1; *xa2 = x2; *ya2 = y2; } + + + + // Accessors. + FormFieldType getType() { return type; } + unsigned getID () { return ID; } + char* getContentCopy() { if (content == NULL) return NULL; + else return strdup(content); } + void setContentCopy(char* new_content) { if(content) delete [] content; + if (new_content == NULL) content = NULL; + else content = strdup(new_content); } +protected: + // Build a FormField from the dict, only callable from child-classes + FormField(Dict *dict, unsigned id); + FormFieldType type; // field type + GBool ok; // set if created successfully + char* content; + + + +private: + FormField() {} + FormField(FormField *dest); + + /* ID is a 32bits int. It is 'document-unique' (two fields in the same document never + share the same ID. + ID is calculated as follow : + first 16 bits are page number + last 16 bits are field number ('page-unique') + + The ID system only works with positive page/fields number + + */ + unsigned ID; + + double x1, y1; // lower left corner + double x2, y2; // upper right corner +}; + + +//------------------------------------------------------------------------ +// FormFieldButton +//------------------------------------------------------------------------ + +class FormFieldButton: public FormField { +public: + // Build a fieldButton from flags + FormFieldButton(Dict *dict, unsigned id); + + // Destructor + virtual ~FormFieldButton(); +}; + +//------------------------------------------------------------------------ +// FormFieldText +//------------------------------------------------------------------------ + +class FormFieldText: public FormField { +public: + // Build a fieldText from flags + FormFieldText(Dict *dict, unsigned id); + + // Destructor + virtual ~FormFieldText(); +}; + +//------------------------------------------------------------------------ +// FormFieldChoice +//------------------------------------------------------------------------ + +class FormFieldChoice: public FormField { +public: + // Build a fieldChoice from flags + FormFieldChoice(Dict *dict, unsigned id); + + // Destructor + virtual ~FormFieldChoice(); +}; + +//------------------------------------------------------------------------ +// FormFieldSignature +//------------------------------------------------------------------------ + +class FormFieldSignature: public FormField { +public: + // Build a fieldSignature from flags + FormFieldSignature(Dict *dict, unsigned id); + + // Destructor + virtual ~FormFieldSignature(); +}; + +//------------------------------------------------------------------------ +// Form +//------------------------------------------------------------------------ + +class Form { +public: + // Extract form from array of annotations + Form(Object* annots, unsigned page); + + // Destructor + ~Form(); + + // Iterate through list of fields. + int getNumFields() const { return numFields; } + FormField* getField(int i) const { return fields[i]; } + FormField* getFieldById (unsigned int id) const; + + // If point , is in a field, return the associated field; + // else return NULL + FormField *find(double x, double y) const; + + // Return true if , is in a field. + GBool onField(double x, double y) const; + +private: + FormField** fields; + int numFields; + unsigned pageNum; +}; +#endif + Index: poppler/Makefile.am =================================================================== RCS file: /cvs/poppler/poppler/poppler/Makefile.am,v retrieving revision 1.23 diff -u -8 -p -r1.23 Makefile.am --- poppler/Makefile.am 19 May 2006 22:04:17 -0000 1.23 +++ poppler/Makefile.am 16 Jun 2006 17:40:20 -0000 @@ -105,16 +105,17 @@ poppler_include_HEADERS = \ Catalog.h \ CharCodeToUnicode.h \ CMap.h \ Decrypt.h \ Dict.h \ Error.h \ FontEncodingTables.h \ FontInfo.h \ + Form.h \ Function.cc \ Function.h \ Gfx.h \ GfxFont.h \ GfxState.h \ GlobalParams.h \ JArithmeticDecoder.h \ JBIG2Stream.h \ @@ -167,16 +168,17 @@ libpoppler_la_SOURCES = \ Catalog.cc \ CharCodeToUnicode.cc \ CMap.cc \ Decrypt.cc \ Dict.cc \ Error.cc \ FontEncodingTables.cc \ FontInfo.cc \ + Form.cc \ Function.cc \ Gfx.cc \ GfxFont.cc \ GfxState.cc \ GlobalParams.cc \ JArithmeticDecoder.cc \ JBIG2Stream.cc \ JPXStream.cc \ Index: poppler/Page.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/Page.cc,v retrieving revision 1.12 diff -u -8 -p -r1.12 Page.cc --- poppler/Page.cc 16 Mar 2006 22:04:56 -0000 1.12 +++ poppler/Page.cc 16 Jun 2006 17:40:21 -0000 @@ -21,16 +21,17 @@ #include "XRef.h" #include "Link.h" #include "OutputDev.h" #ifndef PDF_PARSER_ONLY #include "Gfx.h" #include "GfxState.h" #include "Annot.h" #include "TextOutputDev.h" +#include "Form.h" #endif #include "Error.h" #include "Page.h" #include "UGooString.h" //------------------------------------------------------------------------ // PageAttrs //------------------------------------------------------------------------ @@ -184,16 +185,17 @@ GBool PageAttrs::readBox(Dict *dict, cha return ok; } //------------------------------------------------------------------------ // Page //------------------------------------------------------------------------ Page::Page(XRef *xrefA, int numA, Dict *pageDict, PageAttrs *attrsA) { + Object obj; ok = gTrue; xref = xrefA; num = numA; // get attributes attrs = attrsA; // transtion @@ -208,16 +210,20 @@ Page::Page(XRef *xrefA, int numA, Dict * pageDict->lookupNF("Annots", &annots); if (!(annots.isRef() || annots.isArray() || annots.isNull())) { error(-1, "Page annotations object (page %d) is wrong type (%s)", num, annots.getTypeName()); annots.free(); goto err2; } + // forms + form = new Form(this->getAnnots(&obj),num); + obj.free(); + // contents pageDict->lookupNF("Contents", &contents); if (!(contents.isRef() || contents.isArray() || contents.isNull())) { error(-1, "Page contents object (page %d) is wrong type (%s)", num, contents.getTypeName()); contents.free(); goto err1; Index: poppler/Page.h =================================================================== RCS file: /cvs/poppler/poppler/poppler/Page.h,v retrieving revision 1.5 diff -u -8 -p -r1.5 Page.h --- poppler/Page.h 30 Oct 2005 20:29:05 -0000 1.5 +++ poppler/Page.h 16 Jun 2006 17:40:22 -0000 @@ -18,16 +18,17 @@ class Dict; class XRef; class OutputDev; class Links; class Catalog; class Annots; class Annot; class Gfx; +class Form; //------------------------------------------------------------------------ class PDFRectangle { public: double x1, y1, x2, y2; PDFRectangle() { x1 = y1 = x2 = y2 = 0; } @@ -146,16 +147,19 @@ public: // Get thumb. Object *getThumb(Object *obj) { return thumb.fetch(xref, obj); } GBool loadThumb(unsigned char **data, int *width, int *height, int *rowstride); // Get transition. Object *getTrans(Object *obj) { return trans.fetch(xref, obj); } + // Get form. + Form *getForm() { return form; } + Gfx *createGfx(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, Links *links, Catalog *catalog, GBool (*abortCheckCbk)(void *data), void *abortCheckCbkData, GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), void *annotDisplayDecideCbkData); @@ -190,11 +194,12 @@ private: XRef *xref; // the xref table for this PDF file int num; // page number PageAttrs *attrs; // page attributes Object annots; // annotations array Object contents; // page contents Object thumb; // page thumbnail Object trans; // page transition GBool ok; // true if page is valid + Form *form; // the form for that page }; #endif Index: test/gtk-splash-test.cc =================================================================== RCS file: /cvs/poppler/poppler/test/gtk-splash-test.cc,v retrieving revision 1.5 diff -u -8 -p -r1.5 gtk-splash-test.cc --- test/gtk-splash-test.cc 30 Oct 2005 20:29:05 -0000 1.5 +++ test/gtk-splash-test.cc 16 Jun 2006 17:40:23 -0000 @@ -271,16 +271,17 @@ int main (int argc, char *argv []) { View *v; int i; gtk_init (&argc, &argv); globalParams = new GlobalParams("/etc/xpdfrc"); + //globalParams->setPrintCommands(TRUE); if (argc == 1) { fprintf (stderr, "usage: %s PDF-FILES...\n", argv[0]); return -1; }