summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/xpdf/Page.cc
Unidiff
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Page.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/xpdf/Page.cc40
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
@@ -3,5 +3,5 @@
3// Page.cc 3// Page.cc
4// 4//
5// Copyright 1996 Derek B. Noonburg 5// Copyright 1996-2002 Glyph & Cog, LLC
6// 6//
7//======================================================================== 7//========================================================================
@@ -21,5 +21,5 @@
21#ifndef PDF_PARSER_ONLY 21#ifndef PDF_PARSER_ONLY
22#include "Gfx.h" 22#include "Gfx.h"
23#include "FormWidget.h" 23#include "Annot.h"
24#endif 24#endif
25#include "Error.h" 25#include "Error.h"
@@ -94,4 +94,12 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
94 } 94 }
95 95
96 // misc attributes
97 dict->lookup("LastModified", &lastModified);
98 dict->lookup("BoxColorInfo", &boxColorInfo);
99 dict->lookup("Group", &group);
100 dict->lookup("Metadata", &metadata);
101 dict->lookup("PieceInfo", &pieceInfo);
102 dict->lookup("SeparationInfo", &separationInfo);
103
96 // resource dictionary 104 // resource dictionary
97 dict->lookup("Resources", &obj1); 105 dict->lookup("Resources", &obj1);
@@ -104,4 +112,10 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
104 112
105PageAttrs::~PageAttrs() { 113PageAttrs::~PageAttrs() {
114 lastModified.free();
115 boxColorInfo.free();
116 group.free();
117 metadata.free();
118 pieceInfo.free();
119 separationInfo.free();
106 resources.free(); 120 resources.free();
107} 121}
@@ -210,5 +224,5 @@ void Page::display(OutputDev *out, fouble dpi, int rotate,
210 Link *link; 224 Link *link;
211 int i; 225 int i;
212 FormWidgets *formWidgets; 226 Annots *annotList;
213 227
214 box = getBox(); 228 box = getBox();
@@ -248,18 +262,18 @@ void Page::display(OutputDev *out, fouble dpi, int rotate,
248 } 262 }
249 263
250 // draw AcroForm widgets 264 // draw non-link annotations
251 //~ need to reset CTM ??? 265 //~ need to reset CTM ???
252 formWidgets = new FormWidgets(xref, annots.fetch(xref, &obj)); 266 annotList = new Annots(xref, annots.fetch(xref, &obj));
253 obj.free(); 267 obj.free();
254 if (printCommands && formWidgets->getNumWidgets() > 0) { 268 if (annotList->getNumAnnots() > 0) {
255 printf("***** AcroForm widgets\n"); 269 if (printCommands) {
256 } 270 printf("***** Annotations\n");
257 for (i = 0; i < formWidgets->getNumWidgets(); ++i) { 271 }
258 formWidgets->getWidget(i)->draw(gfx); 272 for (i = 0; i < annotList->getNumAnnots(); ++i) {
259 } 273 annotList->getAnnot(i)->draw(gfx);
260 if (formWidgets->getNumWidgets() > 0) { 274 }
261 out->dump(); 275 out->dump();
262 } 276 }
263 delete formWidgets; 277 delete annotList;
264 278
265 delete gfx; 279 delete gfx;