Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Page.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/Page.cc | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/Page.cc b/noncore/unsupported/qpdf/xpdf/Page.cc index 17c4481..9cc08c4 100644 --- a/noncore/unsupported/qpdf/xpdf/Page.cc +++ b/noncore/unsupported/qpdf/xpdf/Page.cc @@ -1,9 +1,9 @@ //======================================================================== // // Page.cc // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2002 Glyph & Cog, LLC // //======================================================================== #ifdef __GNUC__ @@ -19,9 +19,9 @@ #include "Link.h" #include "OutputDev.h" #ifndef PDF_PARSER_ONLY #include "Gfx.h" -#include "FormWidget.h" +#include "Annot.h" #endif #include "Error.h" #include "Page.h" @@ -92,8 +92,16 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) { while (rotate >= 360) { rotate -= 360; } + // misc attributes + dict->lookup("LastModified", &lastModified); + dict->lookup("BoxColorInfo", &boxColorInfo); + dict->lookup("Group", &group); + dict->lookup("Metadata", &metadata); + dict->lookup("PieceInfo", &pieceInfo); + dict->lookup("SeparationInfo", &separationInfo); + // resource dictionary dict->lookup("Resources", &obj1); if (obj1.isDict()) { resources.free(); @@ -102,8 +110,14 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) { obj1.free(); } PageAttrs::~PageAttrs() { + lastModified.free(); + boxColorInfo.free(); + group.free(); + metadata.free(); + pieceInfo.free(); + separationInfo.free(); resources.free(); } GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) { @@ -208,9 +222,9 @@ void Page::display(OutputDev *out, fouble dpi, int rotate, Gfx *gfx; Object obj; Link *link; int i; - FormWidgets *formWidgets; + Annots *annotList; box = getBox(); cropBox = getCropBox(); @@ -246,22 +260,22 @@ void Page::display(OutputDev *out, fouble dpi, int rotate, } out->dump(); } - // draw AcroForm widgets + // draw non-link annotations //~ need to reset CTM ??? - formWidgets = new FormWidgets(xref, annots.fetch(xref, &obj)); + annotList = new Annots(xref, annots.fetch(xref, &obj)); obj.free(); - if (printCommands && formWidgets->getNumWidgets() > 0) { - printf("***** AcroForm widgets\n"); - } - for (i = 0; i < formWidgets->getNumWidgets(); ++i) { - formWidgets->getWidget(i)->draw(gfx); - } - if (formWidgets->getNumWidgets() > 0) { + if (annotList->getNumAnnots() > 0) { + if (printCommands) { + printf("***** Annotations\n"); + } + for (i = 0; i < annotList->getNumAnnots(); ++i) { + annotList->getAnnot(i)->draw(gfx); + } out->dump(); } - delete formWidgets; + delete annotList; delete gfx; #endif } |