blob: fb7f2889fd082bdac41c236534fb9ab8335f8174 [file] [log] [blame]
edisonn@google.com29247622013-06-18 16:28:29 +00001#ifndef __DEFINED__SkPdfPageObjectDictionary
2#define __DEFINED__SkPdfPageObjectDictionary
3
4#include "SkPdfEnums_autogen.h"
5#include "SkPdfArray_autogen.h"
6#include "SkPdfDictionary_autogen.h"
7
edisonn@google.comafe5e9e2013-06-19 17:42:17 +00008// Entries in a page object
edisonn@google.com29247622013-06-18 16:28:29 +00009class SkPdfPageObjectDictionary : public SkPdfDictionary {
10public:
edisonn@google.com59543d32013-06-18 22:00:40 +000011 virtual SkPdfObjectType getType() const { return kPageObjectDictionary_SkPdfObjectType;}
12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageObjectDictionary_SkPdfObjectType + 1);}
edisonn@google.com29247622013-06-18 16:28:29 +000013public:
14 virtual SkPdfPageObjectDictionary* asPageObjectDictionary() {return this;}
15 virtual const SkPdfPageObjectDictionary* asPageObjectDictionary() const {return this;}
16
17private:
18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;}
19 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() const {return NULL;}
20
21 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;}
22 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;}
23
24 virtual SkPdfAlternateImageDictionary* asAlternateImageDictionary() {return NULL;}
25 virtual const SkPdfAlternateImageDictionary* asAlternateImageDictionary() const {return NULL;}
26
27 virtual SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary() {return NULL;}
28 virtual const SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary() const {return NULL;}
29
30 virtual SkPdfAnnotationDictionary* asAnnotationDictionary() {return NULL;}
31 virtual const SkPdfAnnotationDictionary* asAnnotationDictionary() const {return NULL;}
32
33 virtual SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsDictionary() {return NULL;}
34 virtual const SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsDictionary() const {return NULL;}
35
36 virtual SkPdfAppearanceDictionary* asAppearanceDictionary() {return NULL;}
37 virtual const SkPdfAppearanceDictionary* asAppearanceDictionary() const {return NULL;}
38
39 virtual SkPdfApplicationDataDictionary* asApplicationDataDictionary() {return NULL;}
40 virtual const SkPdfApplicationDataDictionary* asApplicationDataDictionary() const {return NULL;}
41
42 virtual SkPdfArtifactsDictionary* asArtifactsDictionary() {return NULL;}
43 virtual const SkPdfArtifactsDictionary* asArtifactsDictionary() const {return NULL;}
44
45 virtual SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() {return NULL;}
46 virtual const SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() const {return NULL;}
47
48 virtual SkPdfBeadDictionary* asBeadDictionary() {return NULL;}
49 virtual const SkPdfBeadDictionary* asBeadDictionary() const {return NULL;}
50
51 virtual SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureElementsDictionary() {return NULL;}
52 virtual const SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureElementsDictionary() const {return NULL;}
53
54 virtual SkPdfBorderStyleDictionary* asBorderStyleDictionary() {return NULL;}
55 virtual const SkPdfBorderStyleDictionary* asBorderStyleDictionary() const {return NULL;}
56
57 virtual SkPdfBoxColorInformationDictionary* asBoxColorInformationDictionary() {return NULL;}
58 virtual const SkPdfBoxColorInformationDictionary* asBoxColorInformationDictionary() const {return NULL;}
59
60 virtual SkPdfBoxStyleDictionary* asBoxStyleDictionary() {return NULL;}
61 virtual const SkPdfBoxStyleDictionary* asBoxStyleDictionary() const {return NULL;}
62
63 virtual SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary() {return NULL;}
64 virtual const SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary() const {return NULL;}
65
66 virtual SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() {return NULL;}
67 virtual const SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() const {return NULL;}
68
69 virtual SkPdfCMapDictionary* asCMapDictionary() {return NULL;}
70 virtual const SkPdfCMapDictionary* asCMapDictionary() const {return NULL;}
71
72 virtual SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() {return NULL;}
73 virtual const SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() const {return NULL;}
74
75 virtual SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() {return NULL;}
76 virtual const SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() const {return NULL;}
77
78 virtual SkPdfCatalogDictionary* asCatalogDictionary() {return NULL;}
79 virtual const SkPdfCatalogDictionary* asCatalogDictionary() const {return NULL;}
80
81 virtual SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary() {return NULL;}
82 virtual const SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary() const {return NULL;}
83
84 virtual SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() {return NULL;}
85 virtual const SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() const {return NULL;}
86
87 virtual SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() {return NULL;}
88 virtual const SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() const {return NULL;}
89
90 virtual SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDictionary() {return NULL;}
91 virtual const SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDictionary() const {return NULL;}
92
93 virtual SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() {return NULL;}
94 virtual const SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() const {return NULL;}
95
96 virtual SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary() {return NULL;}
97 virtual const SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary() const {return NULL;}
98
99 virtual SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsDictionary() {return NULL;}
100 virtual const SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsDictionary() const {return NULL;}
101
102 virtual SkPdfDocumentInformationDictionary* asDocumentInformationDictionary() {return NULL;}
103 virtual const SkPdfDocumentInformationDictionary* asDocumentInformationDictionary() const {return NULL;}
104
105 virtual SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDictionary() {return NULL;}
106 virtual const SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDictionary() const {return NULL;}
107
108 virtual SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionary() {return NULL;}
109 virtual const SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionary() const {return NULL;}
110
111 virtual SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionary() {return NULL;}
112 virtual const SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionary() const {return NULL;}
113
114 virtual SkPdfEncodingDictionary* asEncodingDictionary() {return NULL;}
115 virtual const SkPdfEncodingDictionary* asEncodingDictionary() const {return NULL;}
116
117 virtual SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedFileStreamDictionary() {return NULL;}
118 virtual const SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedFileStreamDictionary() const {return NULL;}
119
120 virtual SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() {return NULL;}
121 virtual const SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() const {return NULL;}
122
123 virtual SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() {return NULL;}
124 virtual const SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() const {return NULL;}
125
126 virtual SkPdfFDFDictionary* asFDFDictionary() {return NULL;}
127 virtual const SkPdfFDFDictionary* asFDFDictionary() const {return NULL;}
128
129 virtual SkPdfFDFFieldDictionary* asFDFFieldDictionary() {return NULL;}
130 virtual const SkPdfFDFFieldDictionary* asFDFFieldDictionary() const {return NULL;}
131
132 virtual SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() {return NULL;}
133 virtual const SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() const {return NULL;}
134
135 virtual SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDictionary() {return NULL;}
136 virtual const SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDictionary() const {return NULL;}
137
138 virtual SkPdfFDFPageDictionary* asFDFPageDictionary() {return NULL;}
139 virtual const SkPdfFDFPageDictionary* asFDFPageDictionary() const {return NULL;}
140
141 virtual SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() {return NULL;}
142 virtual const SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() const {return NULL;}
143
144 virtual SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() {return NULL;}
145 virtual const SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() const {return NULL;}
146
147 virtual SkPdfFieldDictionary* asFieldDictionary() {return NULL;}
148 virtual const SkPdfFieldDictionary* asFieldDictionary() const {return NULL;}
149
150 virtual SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDictionary() {return NULL;}
151 virtual const SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDictionary() const {return NULL;}
152
153 virtual SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() {return NULL;}
154 virtual const SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() const {return NULL;}
155
156 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return NULL;}
157 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {return NULL;}
158
159 virtual SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() {return NULL;}
160 virtual const SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() const {return NULL;}
161
162 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;}
163 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;}
164
165 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;}
166 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL;}
167
168 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;}
169 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return NULL;}
170
171 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;}
172 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return NULL;}
173
174 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;}
175 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return NULL;}
176
177 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return NULL;}
178 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return NULL;}
179
180 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;}
181 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return NULL;}
182
183 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {return NULL;}
184 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() const {return NULL;}
185
186 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {return NULL;}
187 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() const {return NULL;}
188
189 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NULL;}
190 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() const {return NULL;}
191
192 virtual SkPdfGoToActionDictionary* asGoToActionDictionary() {return NULL;}
193 virtual const SkPdfGoToActionDictionary* asGoToActionDictionary() const {return NULL;}
194
195 virtual SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() {return NULL;}
196 virtual const SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() const {return NULL;}
197
198 virtual SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() {return NULL;}
199 virtual const SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() const {return NULL;}
200
201 virtual SkPdfHideActionDictionary* asHideActionDictionary() {return NULL;}
202 virtual const SkPdfHideActionDictionary* asHideActionDictionary() const {return NULL;}
203
204 virtual SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() {return NULL;}
205 virtual const SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() const {return NULL;}
206
207 virtual SkPdfIconFitDictionary* asIconFitDictionary() {return NULL;}
208 virtual const SkPdfIconFitDictionary* asIconFitDictionary() const {return NULL;}
209
210 virtual SkPdfImportDataActionDictionary* asImportDataActionDictionary() {return NULL;}
211 virtual const SkPdfImportDataActionDictionary* asImportDataActionDictionary() const {return NULL;}
212
213 virtual SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() {return NULL;}
214 virtual const SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() const {return NULL;}
215
216 virtual SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureElementsDictionary() {return NULL;}
217 virtual const SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureElementsDictionary() const {return NULL;}
218
219 virtual SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() {return NULL;}
220 virtual const SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() const {return NULL;}
221
222 virtual SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() {return NULL;}
223 virtual const SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() const {return NULL;}
224
225 virtual SkPdfJavascriptDictionary* asJavascriptDictionary() {return NULL;}
226 virtual const SkPdfJavascriptDictionary* asJavascriptDictionary() const {return NULL;}
227
228 virtual SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary() {return NULL;}
229 virtual const SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary() const {return NULL;}
230
231 virtual SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() {return NULL;}
232 virtual const SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() const {return NULL;}
233
234 virtual SkPdfLaunchActionDictionary* asLaunchActionDictionary() {return NULL;}
235 virtual const SkPdfLaunchActionDictionary* asLaunchActionDictionary() const {return NULL;}
236
237 virtual SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() {return NULL;}
238 virtual const SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() const {return NULL;}
239
240 virtual SkPdfListAttributeDictionary* asListAttributeDictionary() {return NULL;}
241 virtual const SkPdfListAttributeDictionary* asListAttributeDictionary() const {return NULL;}
242
243 virtual SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedecodeFiltersDictionary() {return NULL;}
244 virtual const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedecodeFiltersDictionary() const {return NULL;}
245
246 virtual SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDictionary() {return NULL;}
247 virtual const SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDictionary() const {return NULL;}
248
249 virtual SkPdfMarkInformationDictionary* asMarkInformationDictionary() {return NULL;}
250 virtual const SkPdfMarkInformationDictionary* asMarkInformationDictionary() const {return NULL;}
251
252 virtual SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceDictionary() {return NULL;}
253 virtual const SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceDictionary() const {return NULL;}
254
255 virtual SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() {return NULL;}
256 virtual const SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() const {return NULL;}
257
258 virtual SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() {return NULL;}
259 virtual const SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() const {return NULL;}
260
261 virtual SkPdfMovieActionDictionary* asMovieActionDictionary() {return NULL;}
262 virtual const SkPdfMovieActionDictionary* asMovieActionDictionary() const {return NULL;}
263
264 virtual SkPdfMovieActivationDictionary* asMovieActivationDictionary() {return NULL;}
265 virtual const SkPdfMovieActivationDictionary* asMovieActivationDictionary() const {return NULL;}
266
267 virtual SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() {return NULL;}
268 virtual const SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() const {return NULL;}
269
270 virtual SkPdfMovieDictionary* asMovieDictionary() {return NULL;}
271 virtual const SkPdfMovieDictionary* asMovieDictionary() const {return NULL;}
272
273 virtual SkPdfNameDictionary* asNameDictionary() {return NULL;}
274 virtual const SkPdfNameDictionary* asNameDictionary() const {return NULL;}
275
276 virtual SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() {return NULL;}
277 virtual const SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() const {return NULL;}
278
279 virtual SkPdfNamedActionsDictionary* asNamedActionsDictionary() {return NULL;}
280 virtual const SkPdfNamedActionsDictionary* asNamedActionsDictionary() const {return NULL;}
281
282 virtual SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() {return NULL;}
283 virtual const SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() const {return NULL;}
284
285 virtual SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() {return NULL;}
286 virtual const SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() const {return NULL;}
287
288 virtual SkPdfOpiVersionDictionary* asOpiVersionDictionary() {return NULL;}
289 virtual const SkPdfOpiVersionDictionary* asOpiVersionDictionary() const {return NULL;}
290
291 virtual SkPdfOutlineDictionary* asOutlineDictionary() {return NULL;}
292 virtual const SkPdfOutlineDictionary* asOutlineDictionary() const {return NULL;}
293
294 virtual SkPdfOutlineItemDictionary* asOutlineItemDictionary() {return NULL;}
295 virtual const SkPdfOutlineItemDictionary* asOutlineItemDictionary() const {return NULL;}
296
297 virtual SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary() {return NULL;}
298 virtual const SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary() const {return NULL;}
299
300 virtual SkPdfPSXobjectDictionary* asPSXobjectDictionary() {return NULL;}
301 virtual const SkPdfPSXobjectDictionary* asPSXobjectDictionary() const {return NULL;}
302
303 virtual SkPdfPageLabelDictionary* asPageLabelDictionary() {return NULL;}
304 virtual const SkPdfPageLabelDictionary* asPageLabelDictionary() const {return NULL;}
305
306 virtual SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() {return NULL;}
307 virtual const SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() const {return NULL;}
308
309 virtual SkPdfPagePieceDictionary* asPagePieceDictionary() {return NULL;}
310 virtual const SkPdfPagePieceDictionary* asPagePieceDictionary() const {return NULL;}
311
312 virtual SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() {return NULL;}
313 virtual const SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() const {return NULL;}
314
315 virtual SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() {return NULL;}
316 virtual const SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() const {return NULL;}
317
318 virtual SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDictionary() {return NULL;}
319 virtual const SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDictionary() const {return NULL;}
320
321 virtual SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() {return NULL;}
322 virtual const SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() const {return NULL;}
323
324 virtual SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() {return NULL;}
325 virtual const SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() const {return NULL;}
326
327 virtual SkPdfReferenceDictionary* asReferenceDictionary() {return NULL;}
328 virtual const SkPdfReferenceDictionary* asReferenceDictionary() const {return NULL;}
329
330 virtual SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() {return NULL;}
331 virtual const SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() const {return NULL;}
332
333 virtual SkPdfResetFormActionDictionary* asResetFormActionDictionary() {return NULL;}
334 virtual const SkPdfResetFormActionDictionary* asResetFormActionDictionary() const {return NULL;}
335
336 virtual SkPdfResourceDictionary* asResourceDictionary() {return NULL;}
337 virtual const SkPdfResourceDictionary* asResourceDictionary() const {return NULL;}
338
339 virtual SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDictionary() {return NULL;}
340 virtual const SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDictionary() const {return NULL;}
341
342 virtual SkPdfSeparationDictionary* asSeparationDictionary() {return NULL;}
343 virtual const SkPdfSeparationDictionary* asSeparationDictionary() const {return NULL;}
344
345 virtual SkPdfShadingDictionary* asShadingDictionary() {return NULL;}
346 virtual const SkPdfShadingDictionary* asShadingDictionary() const {return NULL;}
347
348 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;}
349 virtual const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {return NULL;}
350
351 virtual SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return NULL;}
352 virtual const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {return NULL;}
353
354 virtual SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return NULL;}
355 virtual const SkPdfType3ShadingDictionary* asType3ShadingDictionary() const {return NULL;}
356
357 virtual SkPdfType4ShadingDictionary* asType4ShadingDictionary() {return NULL;}
358 virtual const SkPdfType4ShadingDictionary* asType4ShadingDictionary() const {return NULL;}
359
360 virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return NULL;}
361 virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {return NULL;}
362
363 virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return NULL;}
364 virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {return NULL;}
365
366 virtual SkPdfSignatureDictionary* asSignatureDictionary() {return NULL;}
367 virtual const SkPdfSignatureDictionary* asSignatureDictionary() const {return NULL;}
368
369 virtual SkPdfSoftMaskDictionary* asSoftMaskDictionary() {return NULL;}
370 virtual const SkPdfSoftMaskDictionary* asSoftMaskDictionary() const {return NULL;}
371
372 virtual SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() {return NULL;}
373 virtual const SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() const {return NULL;}
374
375 virtual SkPdfSoundActionDictionary* asSoundActionDictionary() {return NULL;}
376 virtual const SkPdfSoundActionDictionary* asSoundActionDictionary() const {return NULL;}
377
378 virtual SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() {return NULL;}
379 virtual const SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() const {return NULL;}
380
381 virtual SkPdfSoundObjectDictionary* asSoundObjectDictionary() {return NULL;}
382 virtual const SkPdfSoundObjectDictionary* asSoundObjectDictionary() const {return NULL;}
383
384 virtual SkPdfSourceInformationDictionary* asSourceInformationDictionary() {return NULL;}
385 virtual const SkPdfSourceInformationDictionary* asSourceInformationDictionary() const {return NULL;}
386
387 virtual SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() {return NULL;}
388 virtual const SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() const {return NULL;}
389
390 virtual SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandlerDictionary() {return NULL;}
391 virtual const SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandlerDictionary() const {return NULL;}
392
393 virtual SkPdfStandardStructureDictionary* asStandardStructureDictionary() {return NULL;}
394 virtual const SkPdfStandardStructureDictionary* asStandardStructureDictionary() const {return NULL;}
395
396 virtual SkPdfStreamCommonDictionary* asStreamCommonDictionary() {return NULL;}
397 virtual const SkPdfStreamCommonDictionary* asStreamCommonDictionary() const {return NULL;}
398
399 virtual SkPdfStructureElementAccessDictionary* asStructureElementAccessDictionary() {return NULL;}
400 virtual const SkPdfStructureElementAccessDictionary* asStructureElementAccessDictionary() const {return NULL;}
401
402 virtual SkPdfStructureElementDictionary* asStructureElementDictionary() {return NULL;}
403 virtual const SkPdfStructureElementDictionary* asStructureElementDictionary() const {return NULL;}
404
405 virtual SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary() {return NULL;}
406 virtual const SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary() const {return NULL;}
407
408 virtual SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() {return NULL;}
409 virtual const SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() const {return NULL;}
410
411 virtual SkPdfTableAttributesDictionary* asTableAttributesDictionary() {return NULL;}
412 virtual const SkPdfTableAttributesDictionary* asTableAttributesDictionary() const {return NULL;}
413
414 virtual SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() {return NULL;}
415 virtual const SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() const {return NULL;}
416
417 virtual SkPdfTextFieldDictionary* asTextFieldDictionary() {return NULL;}
418 virtual const SkPdfTextFieldDictionary* asTextFieldDictionary() const {return NULL;}
419
420 virtual SkPdfThreadActionDictionary* asThreadActionDictionary() {return NULL;}
421 virtual const SkPdfThreadActionDictionary* asThreadActionDictionary() const {return NULL;}
422
423 virtual SkPdfThreadDictionary* asThreadDictionary() {return NULL;}
424 virtual const SkPdfThreadDictionary* asThreadDictionary() const {return NULL;}
425
426 virtual SkPdfTransitionDictionary* asTransitionDictionary() {return NULL;}
427 virtual const SkPdfTransitionDictionary* asTransitionDictionary() const {return NULL;}
428
429 virtual SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary() {return NULL;}
430 virtual const SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary() const {return NULL;}
431
432 virtual SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionary() {return NULL;}
433 virtual const SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionary() const {return NULL;}
434
435 virtual SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStreamDictionary() {return NULL;}
436 virtual const SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStreamDictionary() const {return NULL;}
437
438 virtual SkPdfType0FunctionDictionary* asType0FunctionDictionary() {return NULL;}
439 virtual const SkPdfType0FunctionDictionary* asType0FunctionDictionary() const {return NULL;}
440
441 virtual SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() {return NULL;}
442 virtual const SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() const {return NULL;}
443
444 virtual SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() {return NULL;}
445 virtual const SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() const {return NULL;}
446
447 virtual SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() {return NULL;}
448 virtual const SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() const {return NULL;}
449
450 virtual SkPdfType1PatternDictionary* asType1PatternDictionary() {return NULL;}
451 virtual const SkPdfType1PatternDictionary* asType1PatternDictionary() const {return NULL;}
452
453 virtual SkPdfType2FunctionDictionary* asType2FunctionDictionary() {return NULL;}
454 virtual const SkPdfType2FunctionDictionary* asType2FunctionDictionary() const {return NULL;}
455
456 virtual SkPdfType2PatternDictionary* asType2PatternDictionary() {return NULL;}
457 virtual const SkPdfType2PatternDictionary* asType2PatternDictionary() const {return NULL;}
458
459 virtual SkPdfType3FunctionDictionary* asType3FunctionDictionary() {return NULL;}
460 virtual const SkPdfType3FunctionDictionary* asType3FunctionDictionary() const {return NULL;}
461
462 virtual SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() {return NULL;}
463 virtual const SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() const {return NULL;}
464
465 virtual SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() {return NULL;}
466 virtual const SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() const {return NULL;}
467
468 virtual SkPdfURIActionDictionary* asURIActionDictionary() {return NULL;}
469 virtual const SkPdfURIActionDictionary* asURIActionDictionary() const {return NULL;}
470
471 virtual SkPdfURIDictionary* asURIDictionary() {return NULL;}
472 virtual const SkPdfURIDictionary* asURIDictionary() const {return NULL;}
473
474 virtual SkPdfURLAliasDictionary* asURLAliasDictionary() {return NULL;}
475 virtual const SkPdfURLAliasDictionary* asURLAliasDictionary() const {return NULL;}
476
477 virtual SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() {return NULL;}
478 virtual const SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() const {return NULL;}
479
480 virtual SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary() {return NULL;}
481 virtual const SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary() const {return NULL;}
482
483 virtual SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() {return NULL;}
484 virtual const SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() const {return NULL;}
485
486 virtual SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSettingsDictionary() {return NULL;}
487 virtual const SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSettingsDictionary() const {return NULL;}
488
489 virtual SkPdfWebCaptureDictionary* asWebCaptureDictionary() {return NULL;}
490 virtual const SkPdfWebCaptureDictionary* asWebCaptureDictionary() const {return NULL;}
491
492 virtual SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() {return NULL;}
493 virtual const SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() const {return NULL;}
494
495 virtual SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDictionary() {return NULL;}
496 virtual const SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDictionary() const {return NULL;}
497
498 virtual SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary() {return NULL;}
499 virtual const SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary() const {return NULL;}
500
501 virtual SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() {return NULL;}
502 virtual const SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() const {return NULL;}
503
504 virtual SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDictionary() {return NULL;}
505 virtual const SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDictionary() const {return NULL;}
506
507 virtual SkPdfXObjectDictionary* asXObjectDictionary() {return NULL;}
508 virtual const SkPdfXObjectDictionary* asXObjectDictionary() const {return NULL;}
509
510 virtual SkPdfImageDictionary* asImageDictionary() {return NULL;}
511 virtual const SkPdfImageDictionary* asImageDictionary() const {return NULL;}
512
513 virtual SkPdfType1FormDictionary* asType1FormDictionary() {return NULL;}
514 virtual const SkPdfType1FormDictionary* asType1FormDictionary() const {return NULL;}
515
516public:
517private:
518public:
519 SkPdfPageObjectDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
520
521 virtual bool valid() const {return true;}
522
523 SkPdfPageObjectDictionary& operator=(const SkPdfPageObjectDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
524
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000525/** (Required) The type of PDF object that this dictionary describes; must be
526 * Page for a page object.
527**/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
530 }
531
edisonn@google.com29247622013-06-18 16:28:29 +0000532 std::string Type() const {
533 std::string ret;
534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
535 // TODO(edisonn): warn about missing required field, assert for known good pdfs
536 return "";
537 }
538
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000539/** (Required; must be an indirect reference) The page tree node that is the im-
540 * mediate parent of this page object.
541**/
542 bool has_Parent() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
544 }
545
edisonn@google.com29247622013-06-18 16:28:29 +0000546 SkPdfDictionary* Parent() const {
547 SkPdfDictionary* ret;
548 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
549 // TODO(edisonn): warn about missing required field, assert for known good pdfs
550 return NULL;
551 }
552
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000553/** (Required if PieceInfo is present; optional otherwise; PDF 1.3) The date and
554 * time (see Section 3.8.2, "Dates") when the page's contents were most re-
555 * cently modified. If a page-piece dictionary (PieceInfo) is present, the
556 * modification date is used to ascertain which of the application data dic-
557 * tionaries that it contains correspond to the current content of the page
558 * (see Section 9.4, "Page-Piece Dictionaries").
559**/
560 bool has_LastModified() const {
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
562 }
563
edisonn@google.com29247622013-06-18 16:28:29 +0000564 SkPdfDate LastModified() const {
565 SkPdfDate ret;
566 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
567 // TODO(edisonn): warn about missing required field, assert for known good pdfs
568 return SkPdfDate();
569 }
570
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000571/** (Required; inheritable) A dictionary containing any resources required by
572 * the page (see Section 3.7.2, "Resource Dictionaries"). If the page requires
573 * no resources, the value of this entry should be an empty dictionary; omit-
574 * ting the entry entirely indicates that the resources are to be inherited from
575 * an ancestor node in the page tree.
576**/
577 bool has_Resources() const {
578 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", NULL));
579 }
580
edisonn@google.com29247622013-06-18 16:28:29 +0000581 SkPdfDictionary* Resources() const {
582 SkPdfDictionary* ret;
583 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", &ret)) return ret;
584 // TODO(edisonn): warn about missing required field, assert for known good pdfs
585 return NULL;
586 }
587
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000588/** (Required; inheritable) A rectangle (see Section 3.8.3, "Rectangles"), ex-
589 * pressed in default user space units, defining the boundaries of the physical
590 * medium on which the page is intended to be displayed or printed (see
591 * Section 9.10.1, "Page Boundaries").
592**/
593 bool has_MediaBox() const {
594 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MediaBox", "", NULL));
595 }
596
edisonn@google.com29247622013-06-18 16:28:29 +0000597 SkRect MediaBox() const {
598 SkRect ret;
599 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MediaBox", "", &ret)) return ret;
600 // TODO(edisonn): warn about missing required field, assert for known good pdfs
601 return SkRect();
602 }
603
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000604/** (Optional; inheritable) A rectangle, expressed in default user space units,
605 * defining the visible region of default user space. When the page is dis-
606 * played or printed, its contents are to be clipped (cropped) to this rectangle
607 * and then imposed on the output medium in some implementation-
608 * defined manner (see Section 9.10.1, "Page Boundaries"). Default value:
609 * the value of MediaBox.
610**/
611 bool has_CropBox() const {
612 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
613 }
614
edisonn@google.com29247622013-06-18 16:28:29 +0000615 SkRect CropBox() const {
616 SkRect ret;
617 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", &ret)) return ret;
618 // TODO(edisonn): warn about missing required field, assert for known good pdfs
619 return SkRect();
620 }
621
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000622/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
623 * fining the region to which the contents of the page should be clipped
624 * when output in a production environment (see Section 9.10.1, "Page
625 * Boundaries"). Default value: the value of CropBox.
626**/
627 bool has_BleedBox() const {
628 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
629 }
630
edisonn@google.com29247622013-06-18 16:28:29 +0000631 SkRect BleedBox() const {
632 SkRect ret;
633 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", &ret)) return ret;
634 // TODO(edisonn): warn about missing required field, assert for known good pdfs
635 return SkRect();
636 }
637
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000638/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
639 * fining the intended dimensions of the finished page after trimming (see
640 * Section 9.10.1, "Page Boundaries"). Default value: the value of CropBox.
641**/
642 bool has_TrimBox() const {
643 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
644 }
645
edisonn@google.com29247622013-06-18 16:28:29 +0000646 SkRect TrimBox() const {
647 SkRect ret;
648 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", &ret)) return ret;
649 // TODO(edisonn): warn about missing required field, assert for known good pdfs
650 return SkRect();
651 }
652
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000653/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
654 * fining the extent of the page's meaningful content (including potential
655 * white space) as intended by the page's creator (see Section 9.10.1, "Page
656 * Boundaries"). Default value: the value of CropBox.
657**/
658 bool has_ArtBox() const {
659 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
660 }
661
edisonn@google.com29247622013-06-18 16:28:29 +0000662 SkRect ArtBox() const {
663 SkRect ret;
664 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", &ret)) return ret;
665 // TODO(edisonn): warn about missing required field, assert for known good pdfs
666 return SkRect();
667 }
668
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000669/** (Optional) A box color information dictionary specifying the colors and
670 * other visual characteristics to be used in displaying guidelines on the
671 * screen for the various page boundaries (see "Display of Page Boundaries"
672 * on page 679). If this entry is absent, the viewer application should use its
673 * own current default settings.
674**/
675 bool has_BoxColorInfo() const {
676 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BoxColorInfo", "", NULL));
677 }
678
edisonn@google.com29247622013-06-18 16:28:29 +0000679 SkPdfDictionary* BoxColorInfo() const {
680 SkPdfDictionary* ret;
681 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BoxColorInfo", "", &ret)) return ret;
682 // TODO(edisonn): warn about missing required field, assert for known good pdfs
683 return NULL;
684 }
685
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000686/** (Optional) A content stream (see Section 3.7.1, "Content Streams") de-
687 * scribing the contents of this page. If this entry is absent, the page is empty.
688 * The value may be either a single stream or an array of streams. If it is an
689 * array, the effect is as if all of the streams in the array were concatenated, in
690 * order, to form a single stream. This allows a program generating a PDF
691 * file to create image objects and other resources as they occur, even though
692 * they interrupt the content stream. The division between streams may
693 * occur only at the boundaries between lexical tokens (see Section 3.1, "Lex-
694 * ical Conventions"), but is unrelated to the page's logical content or orga-
695 * nization. Applications that consume or produce PDF files are not required
696 * to preserve the existing structure of the Contents array. (See implementa-
697 * tion note 22 in Appendix H.)
698**/
699 bool has_Contents() const {
700 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
701 }
702
edisonn@google.com29247622013-06-18 16:28:29 +0000703 bool isContentsAStream() const {
704 SkPdfObject* ret = NULL;
705 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return false;
706 return ret->podofo()->HasStream();
707 }
708
709 SkPdfStream getContentsAsStream() const {
710 SkPdfStream ret = SkPdfStream();
711 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
712 // TODO(edisonn): warn about missing required field, assert for known good pdfs
713 return SkPdfStream();
714 }
715
716 bool isContentsAArray() const {
717 SkPdfObject* ret = NULL;
718 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return false;
719 return ret->podofo()->GetDataType() == ePdfDataType_Array;
720 }
721
722 SkPdfArray getContentsAsArray() const {
723 SkPdfArray ret = SkPdfArray();
724 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
725 // TODO(edisonn): warn about missing required field, assert for known good pdfs
726 return SkPdfArray();
727 }
728
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000729/** (Optional; inheritable) The number of degrees by which the page should
730 * be rotated clockwise when displayed or printed. The value must be a mul-
731 * tiple of 90. Default value: 0.
732**/
733 bool has_Rotate() const {
734 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", NULL));
735 }
736
edisonn@google.com29247622013-06-18 16:28:29 +0000737 long Rotate() const {
738 long ret;
739 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", &ret)) return ret;
740 // TODO(edisonn): warn about missing required field, assert for known good pdfs
741 return 0;
742 }
743
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000744/** (Optional; PDF 1.4) A group attributes dictionary specifying the attributes
745 * of the page's page group for use in the transparent imaging model (see
746 * Sections 7.3.6, "Page Group," and 7.5.5, "Transparency Group XObjects").
747**/
748 bool has_Group() const {
749 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", NULL));
750 }
751
edisonn@google.com29247622013-06-18 16:28:29 +0000752 SkPdfDictionary* Group() const {
753 SkPdfDictionary* ret;
754 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", &ret)) return ret;
755 // TODO(edisonn): warn about missing required field, assert for known good pdfs
756 return NULL;
757 }
758
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000759/** (Optional) A stream object defining the page's thumbnail image (see Sec-
760 * tion 8.2.3, "Thumbnail Images").
761**/
762 bool has_Thumb() const {
763 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Thumb", "", NULL));
764 }
765
edisonn@google.com29247622013-06-18 16:28:29 +0000766 SkPdfStream Thumb() const {
767 SkPdfStream ret;
768 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Thumb", "", &ret)) return ret;
769 // TODO(edisonn): warn about missing required field, assert for known good pdfs
770 return SkPdfStream();
771 }
772
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000773/** (Optional; PDF 1.1; recommended if the page contains article beads) An ar-
774 * ray of indirect references to article beads appearing on the page (see Sec-
775 * tion 8.3.2, "Articles"; see also implementation note 23 in Appendix H).
776 * The beads are listed in the array in natural reading order.
777**/
778 bool has_B() const {
779 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", NULL));
780 }
781
edisonn@google.com29247622013-06-18 16:28:29 +0000782 SkPdfArray B() const {
783 SkPdfArray ret;
784 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", &ret)) return ret;
785 // TODO(edisonn): warn about missing required field, assert for known good pdfs
786 return SkPdfArray();
787 }
788
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000789/** (Optional; PDF 1.1) The page's display duration (also called its advance
790 * timing): the maximum length of time, in seconds, that the page will be
791 * displayed during presentations before the viewer application automati-
792 * cally advances to the next page (see Section 8.3.3, "Presentations"). By
793 * default, the viewer does not advance automatically.
794**/
795 bool has_Dur() const {
796 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dur", "", NULL));
797 }
798
edisonn@google.com29247622013-06-18 16:28:29 +0000799 double Dur() const {
800 double ret;
801 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dur", "", &ret)) return ret;
802 // TODO(edisonn): warn about missing required field, assert for known good pdfs
803 return 0;
804 }
805
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000806/** (Optional; PDF 1.1) A transition dictionary describing the transition effect
807 * to be used when displaying the page during presentations (see Section
808 * 8.3.3, "Presentations").
809**/
810 bool has_Trans() const {
811 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans", "", NULL));
812 }
813
edisonn@google.com29247622013-06-18 16:28:29 +0000814 SkPdfDictionary* Trans() const {
815 SkPdfDictionary* ret;
816 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans", "", &ret)) return ret;
817 // TODO(edisonn): warn about missing required field, assert for known good pdfs
818 return NULL;
819 }
820
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000821/** (Optional) An array of annotation dictionaries representing annotations
822 * associated with the page (see Section 8.4, "Annotations").
823**/
824 bool has_Annots() const {
825 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", NULL));
826 }
827
edisonn@google.com29247622013-06-18 16:28:29 +0000828 SkPdfArray Annots() const {
829 SkPdfArray ret;
830 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", &ret)) return ret;
831 // TODO(edisonn): warn about missing required field, assert for known good pdfs
832 return SkPdfArray();
833 }
834
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000835/** (Optional; PDF 1.2) An additional-actions dictionary defining actions to
836 * be performed when the page is opened or closed (see Section 8.5.2, "Trig-
837 * ger Events"; see also implementation note 24 in Appendix H).
838**/
839 bool has_AA() const {
840 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
841 }
842
edisonn@google.com29247622013-06-18 16:28:29 +0000843 SkPdfDictionary* AA() const {
844 SkPdfDictionary* ret;
845 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
846 // TODO(edisonn): warn about missing required field, assert for known good pdfs
847 return NULL;
848 }
849
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000850/** (Optional; PDF 1.4) A metadata stream containing metadata for the page
851 * (see Section 9.2.2, "Metadata Streams").
852**/
853 bool has_Metadata() const {
854 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
855 }
856
edisonn@google.com29247622013-06-18 16:28:29 +0000857 SkPdfStream Metadata() const {
858 SkPdfStream ret;
859 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
860 // TODO(edisonn): warn about missing required field, assert for known good pdfs
861 return SkPdfStream();
862 }
863
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000864/** (Optional; PDF 1.3) A page-piece dictionary associated with the page (see
865 * Section 9.4, "Page-Piece Dictionaries").
866**/
867 bool has_PieceInfo() const {
868 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", NULL));
869 }
870
edisonn@google.com29247622013-06-18 16:28:29 +0000871 SkPdfDictionary* PieceInfo() const {
872 SkPdfDictionary* ret;
873 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", &ret)) return ret;
874 // TODO(edisonn): warn about missing required field, assert for known good pdfs
875 return NULL;
876 }
877
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000878/** (Required if the page contains structural content items; PDF 1.3) The inte-
879 * ger key of the page's entry in the structural parent tree (see "Finding Struc-
880 * ture Elements from Content Items" on page 600).
881**/
882 bool has_StructParents() const {
883 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", NULL));
884 }
885
edisonn@google.com29247622013-06-18 16:28:29 +0000886 long StructParents() const {
887 long ret;
888 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", &ret)) return ret;
889 // TODO(edisonn): warn about missing required field, assert for known good pdfs
890 return 0;
891 }
892
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000893/** (Optional; PDF 1.3; indirect reference preferred) The digital identifier of the
894 * page's parent Web Capture content set (see Section 9.9.5, "Object At-
895 * tributes Related to Web Capture").
896**/
897 bool has_ID() const {
898 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
899 }
900
edisonn@google.com29247622013-06-18 16:28:29 +0000901 std::string ID() const {
902 std::string ret;
903 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
904 // TODO(edisonn): warn about missing required field, assert for known good pdfs
905 return "";
906 }
907
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000908/** (Optional; PDF 1.3) The page's preferred zoom (magnification) factor: the
909 * factor by which it should be scaled to achieve the "natural" display magni-
910 * fication (see Section 9.9.5, "Object Attributes Related to Web Capture").
911**/
912 bool has_PZ() const {
913 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PZ", "", NULL));
914 }
915
edisonn@google.com29247622013-06-18 16:28:29 +0000916 double PZ() const {
917 double ret;
918 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PZ", "", &ret)) return ret;
919 // TODO(edisonn): warn about missing required field, assert for known good pdfs
920 return 0;
921 }
922
edisonn@google.comafe5e9e2013-06-19 17:42:17 +0000923/** (Optional; PDF 1.3) A separation dictionary containing information need-
924 * ed to generate color separations for the page (see Section 9.10.3, "Separa-
925 * tion Dictionaries").
926**/
927 bool has_SeparationInfo() const {
928 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationInfo", "", NULL));
929 }
930
edisonn@google.com29247622013-06-18 16:28:29 +0000931 SkPdfDictionary* SeparationInfo() const {
932 SkPdfDictionary* ret;
933 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationInfo", "", &ret)) return ret;
934 // TODO(edisonn): warn about missing required field, assert for known good pdfs
935 return NULL;
936 }
937
938};
939
940#endif // __DEFINED__SkPdfPageObjectDictionary