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