aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--experimental/PdfViewer/SkPdfALinkAnnotationDictionary_autogen.h54
-rw-r--r--experimental/PdfViewer/SkPdfActionDictionary_autogen.h24
-rw-r--r--experimental/PdfViewer/SkPdfAlternateImageDictionary_autogen.h16
-rw-r--r--experimental/PdfViewer/SkPdfAnnotationActionsDictionary_autogen.h46
-rw-r--r--experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h191
-rw-r--r--experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_autogen.h103
-rw-r--r--experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h21
-rw-r--r--experimental/PdfViewer/SkPdfApplicationDataDictionary_autogen.h15
-rw-r--r--experimental/PdfViewer/SkPdfArtifactsDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfAttributeObjectDictionary_autogen.h8
-rw-r--r--experimental/PdfViewer/SkPdfBeadDictionary_autogen.h44
-rw-r--r--experimental/PdfViewer/SkPdfBlockLevelStructureElementsDictionary_autogen.h175
-rw-r--r--experimental/PdfViewer/SkPdfBorderStyleDictionary_autogen.h42
-rw-r--r--experimental/PdfViewer/SkPdfBoxColorInformationDictionary_autogen.h33
-rw-r--r--experimental/PdfViewer/SkPdfBoxStyleDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfCIDFontDescriptorDictionary_autogen.h40
-rw-r--r--experimental/PdfViewer/SkPdfCIDFontDictionary_autogen.h87
-rw-r--r--experimental/PdfViewer/SkPdfCIDSystemInfoDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfCMapDictionary_autogen.h57
-rw-r--r--experimental/PdfViewer/SkPdfCalgrayColorSpaceDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfCalrgbColorSpaceDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfCatalogDictionary_autogen.h194
-rw-r--r--experimental/PdfViewer/SkPdfCcittfaxdecodeFilterDictionary_autogen.h84
-rw-r--r--experimental/PdfViewer/SkPdfCheckboxFieldDictionary_autogen.h8
-rw-r--r--experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h30
-rw-r--r--experimental/PdfViewer/SkPdfComponentsWithMetadataDictionary_autogen.h7
-rw-r--r--experimental/PdfViewer/SkPdfDctdecodeFilterDictionary_autogen.h24
-rw-r--r--experimental/PdfViewer/SkPdfDeviceNColorSpaceDictionary_autogen.h18
-rw-r--r--experimental/PdfViewer/SkPdfDocumentCatalogActionsDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfDocumentInformationDictionary_autogen.h76
-rw-r--r--experimental/PdfViewer/SkPdfEmbeddedFileParameterDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfEmbeddedFileStreamDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfEmbeddedFontStreamDictionary_autogen.h42
-rw-r--r--experimental/PdfViewer/SkPdfEncodingDictionary_autogen.h31
-rw-r--r--experimental/PdfViewer/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h9
-rw-r--r--experimental/PdfViewer/SkPdfEncryptionCommonDictionary_autogen.h33
-rw-r--r--experimental/PdfViewer/SkPdfFDFCatalogDictionary_autogen.h20
-rw-r--r--experimental/PdfViewer/SkPdfFDFDictionary_autogen.h110
-rw-r--r--experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h132
-rw-r--r--experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h8
-rw-r--r--experimental/PdfViewer/SkPdfFDFNamedPageReferenceDictionary_autogen.h14
-rw-r--r--experimental/PdfViewer/SkPdfFDFPageDictionary_autogen.h16
-rw-r--r--experimental/PdfViewer/SkPdfFDFTemplateDictionary_autogen.h24
-rw-r--r--experimental/PdfViewer/SkPdfFDFTrailerDictionary_autogen.h8
-rw-r--r--experimental/PdfViewer/SkPdfFieldDictionary_autogen.h90
-rw-r--r--experimental/PdfViewer/SkPdfFileAttachmentAnnotationDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfFileSpecificationDictionary_autogen.h90
-rw-r--r--experimental/PdfViewer/SkPdfFileTrailerDictionary_autogen.h44
-rw-r--r--experimental/PdfViewer/SkPdfFontDescriptorDictionary_autogen.h148
-rw-r--r--experimental/PdfViewer/SkPdfFormFieldActionsDictionary_autogen.h35
-rw-r--r--experimental/PdfViewer/SkPdfFreeTextAnnotationDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfFunctionCommonDictionary_autogen.h32
-rw-r--r--experimental/PdfViewer/SkPdfGoToActionDictionary_autogen.h14
-rw-r--r--experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h218
-rw-r--r--experimental/PdfViewer/SkPdfGroupAttributesDictionary_autogen.h19
-rw-r--r--experimental/PdfViewer/SkPdfHideActionDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfIccProfileStreamDictionary_autogen.h41
-rw-r--r--experimental/PdfViewer/SkPdfIconFitDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfImageDictionary_autogen.h163
-rw-r--r--experimental/PdfViewer/SkPdfImportDataActionDictionary_autogen.h15
-rw-r--r--experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h35
-rw-r--r--experimental/PdfViewer/SkPdfInlineLevelStructureElementsDictionary_autogen.h17
-rw-r--r--experimental/PdfViewer/SkPdfInteractiveFormDictionary_autogen.h55
-rw-r--r--experimental/PdfViewer/SkPdfJavascriptActionDictionary_autogen.h17
-rw-r--r--experimental/PdfViewer/SkPdfJavascriptDictionary_autogen.h29
-rw-r--r--experimental/PdfViewer/SkPdfJbig2DecodeFilterDictionary_autogen.h9
-rw-r--r--experimental/PdfViewer/SkPdfLabColorSpaceDictionary_autogen.h31
-rw-r--r--experimental/PdfViewer/SkPdfLaunchActionDictionary_autogen.h47
-rw-r--r--experimental/PdfViewer/SkPdfLineAnnotationDictionary_autogen.h50
-rw-r--r--experimental/PdfViewer/SkPdfListAttributeDictionary_autogen.h24
-rw-r--r--experimental/PdfViewer/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h45
-rw-r--r--experimental/PdfViewer/SkPdfMacOsFileInformationDictionary_autogen.h19
-rw-r--r--experimental/PdfViewer/SkPdfMarkInformationDictionary_autogen.h8
-rw-r--r--experimental/PdfViewer/SkPdfMarkedContentReferenceDictionary_autogen.h43
-rw-r--r--experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_autogen.h41
-rw-r--r--experimental/PdfViewer/SkPdfMetadataStreamDictionary_autogen.h15
-rw-r--r--experimental/PdfViewer/SkPdfMovieActionDictionary_autogen.h38
-rw-r--r--experimental/PdfViewer/SkPdfMovieActivationDictionary_autogen.h97
-rw-r--r--experimental/PdfViewer/SkPdfMovieAnnotationDictionary_autogen.h35
-rw-r--r--experimental/PdfViewer/SkPdfMovieDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h4
-rw-r--r--experimental/PdfViewer/SkPdfNameDictionary_autogen.h57
-rw-r--r--experimental/PdfViewer/SkPdfNameTreeNodeDictionary_autogen.h27
-rw-r--r--experimental/PdfViewer/SkPdfNamedActionsDictionary_autogen.h14
-rw-r--r--experimental/PdfViewer/SkPdfNumberTreeNodeDictionary_autogen.h28
-rw-r--r--experimental/PdfViewer/SkPdfObjectReferenceDictionary_autogen.h23
-rw-r--r--experimental/PdfViewer/SkPdfOpiVersionDictionary_autogen.h9
-rw-r--r--experimental/PdfViewer/SkPdfOutlineDictionary_autogen.h30
-rw-r--r--experimental/PdfViewer/SkPdfOutlineItemDictionary_autogen.h93
-rw-r--r--experimental/PdfViewer/SkPdfPDF_XOutputIntentDictionary_autogen.h77
-rw-r--r--experimental/PdfViewer/SkPdfPSXobjectDictionary_autogen.h23
-rw-r--r--experimental/PdfViewer/SkPdfPageLabelDictionary_autogen.h37
-rw-r--r--experimental/PdfViewer/SkPdfPageObjectActionsDictionary_autogen.h20
-rw-r--r--experimental/PdfViewer/SkPdfPageObjectDictionary_autogen.h220
-rw-r--r--experimental/PdfViewer/SkPdfPagePieceDictionary_autogen.h4
-rw-r--r--experimental/PdfViewer/SkPdfPageTreeNodeDictionary_autogen.h29
-rw-r--r--experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfPrinterMarkAnnotationDictionary_autogen.h15
-rw-r--r--experimental/PdfViewer/SkPdfPrinterMarkFormDictionary_autogen.h19
-rw-r--r--experimental/PdfViewer/SkPdfRadioButtonFieldDictionary_autogen.h11
-rw-r--r--experimental/PdfViewer/SkPdfReferenceDictionary_autogen.h26
-rw-r--r--experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfResetFormActionDictionary_autogen.h28
-rw-r--r--experimental/PdfViewer/SkPdfResourceDictionary_autogen.h58
-rw-r--r--experimental/PdfViewer/SkPdfRubberStampAnnotationDictionary_autogen.h31
-rw-r--r--experimental/PdfViewer/SkPdfSeparationDictionary_autogen.h33
-rw-r--r--experimental/PdfViewer/SkPdfShadingDictionary_autogen.h61
-rw-r--r--experimental/PdfViewer/SkPdfSignatureDictionary_autogen.h63
-rw-r--r--experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h55
-rw-r--r--experimental/PdfViewer/SkPdfSoftMaskImageDictionary_autogen.h12
-rw-r--r--experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h48
-rw-r--r--experimental/PdfViewer/SkPdfSoundAnnotationDictionary_autogen.h35
-rw-r--r--experimental/PdfViewer/SkPdfSoundObjectDictionary_autogen.h56
-rw-r--r--experimental/PdfViewer/SkPdfSourceInformationDictionary_autogen.h43
-rw-r--r--experimental/PdfViewer/SkPdfSquareOrCircleAnnotation_autogen.h34
-rw-r--r--experimental/PdfViewer/SkPdfStandardSecurityHandlerDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfStandardStructureDictionary_autogen.h74
-rw-r--r--experimental/PdfViewer/SkPdfStreamCommonDictionary_autogen.h65
-rw-r--r--experimental/PdfViewer/SkPdfStructureElementAccessDictionary_autogen.h19
-rw-r--r--experimental/PdfViewer/SkPdfStructureElementDictionary_autogen.h128
-rw-r--r--experimental/PdfViewer/SkPdfStructureTreeRootDictionary_autogen.h69
-rw-r--r--experimental/PdfViewer/SkPdfSubmitFormActionDictionary_autogen.h40
-rw-r--r--experimental/PdfViewer/SkPdfTableAttributesDictionary_autogen.h17
-rw-r--r--experimental/PdfViewer/SkPdfTextAnnotationDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfTextFieldDictionary_autogen.h7
-rw-r--r--experimental/PdfViewer/SkPdfThreadActionDictionary_autogen.h41
-rw-r--r--experimental/PdfViewer/SkPdfThreadDictionary_autogen.h23
-rw-r--r--experimental/PdfViewer/SkPdfTransitionDictionary_autogen.h75
-rw-r--r--experimental/PdfViewer/SkPdfTransparencyGroupDictionary_autogen.h44
-rw-r--r--experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h63
-rw-r--r--experimental/PdfViewer/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h45
-rw-r--r--experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h56
-rw-r--r--experimental/PdfViewer/SkPdfType0FunctionDictionary_autogen.h40
-rw-r--r--experimental/PdfViewer/SkPdfType10HalftoneDictionary_autogen.h45
-rw-r--r--experimental/PdfViewer/SkPdfType16HalftoneDictionary_autogen.h63
-rw-r--r--experimental/PdfViewer/SkPdfType1FontDictionary_autogen.h93
-rw-r--r--experimental/PdfViewer/SkPdfType1FormDictionary_autogen.h143
-rw-r--r--experimental/PdfViewer/SkPdfType1HalftoneDictionary_autogen.h66
-rw-r--r--experimental/PdfViewer/SkPdfType1PatternDictionary_autogen.h31
-rw-r--r--experimental/PdfViewer/SkPdfType1ShadingDictionary_autogen.h30
-rw-r--r--experimental/PdfViewer/SkPdfType2FunctionDictionary_autogen.h22
-rw-r--r--experimental/PdfViewer/SkPdfType2PatternDictionary_autogen.h42
-rw-r--r--experimental/PdfViewer/SkPdfType2ShadingDictionary_autogen.h38
-rw-r--r--experimental/PdfViewer/SkPdfType3FontDictionary_autogen.h41
-rw-r--r--experimental/PdfViewer/SkPdfType3FunctionDictionary_autogen.h26
-rw-r--r--experimental/PdfViewer/SkPdfType3ShadingDictionary_autogen.h41
-rw-r--r--experimental/PdfViewer/SkPdfType4ShadingDictionary_autogen.h53
-rw-r--r--experimental/PdfViewer/SkPdfType5HalftoneDictionary_autogen.h36
-rw-r--r--experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h52
-rw-r--r--experimental/PdfViewer/SkPdfType6HalftoneDictionary_autogen.h45
-rw-r--r--experimental/PdfViewer/SkPdfType6ShadingDictionary_autogen.h53
-rw-r--r--experimental/PdfViewer/SkPdfURIActionDictionary_autogen.h24
-rw-r--r--experimental/PdfViewer/SkPdfURIDictionary_autogen.h12
-rw-r--r--experimental/PdfViewer/SkPdfURLAliasDictionary_autogen.h14
-rw-r--r--experimental/PdfViewer/SkPdfVariableTextFieldDictionary_autogen.h30
-rw-r--r--experimental/PdfViewer/SkPdfViewerPreferencesDictionary_autogen.h131
-rw-r--r--experimental/PdfViewer/SkPdfWebCaptureCommandDictionary_autogen.h47
-rw-r--r--experimental/PdfViewer/SkPdfWebCaptureCommandSettingsDictionary_autogen.h17
-rw-r--r--experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h57
-rw-r--r--experimental/PdfViewer/SkPdfWebCaptureImageSetDictionary_autogen.h19
-rw-r--r--experimental/PdfViewer/SkPdfWebCaptureInformationDictionary_autogen.h18
-rw-r--r--experimental/PdfViewer/SkPdfWebCapturePageSetDictionary_autogen.h22
-rw-r--r--experimental/PdfViewer/SkPdfWidgetAnnotationDictionary_autogen.h44
-rw-r--r--experimental/PdfViewer/SkPdfWindowsLaunchActionDictionary_autogen.h34
-rw-r--r--experimental/PdfViewer/generate_code.py31
-rw-r--r--experimental/PdfViewer/pdf_viewer_main.cpp121
166 files changed, 7602 insertions, 33 deletions
diff --git a/experimental/PdfViewer/SkPdfALinkAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfALinkAnnotationDictionary_autogen.h
index 73cf622c60..65320a4a4d 100644
--- a/experimental/PdfViewer/SkPdfALinkAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfALinkAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a link annotation
class SkPdfALinkAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kALinkAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfALinkAnnotationDictionary& operator=(const SkPdfALinkAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Link
+ * for a link annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; PDF 1.4) An alternate representation of the annotation's contents in
+ * human-readable form, useful when extracting the document's contents in sup-
+ * port of accessibility to disabled users or for other purposes (see Section 9.8.2,
+ * "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +552,14 @@ public:
return "";
}
+/** (Optional; not permitted if an A entry is present) A destination to be displayed
+ * when the annotation is activated (see Section 8.2.1, "Destinations"; see also
+ * implementation note 66 in Appendix H).
+**/
+ bool has_Dest() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", NULL));
+ }
+
bool isDestAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
@@ -574,6 +599,24 @@ public:
return "";
}
+/** (Optional; PDF 1.2) The annotation's highlighting mode, the visual effect to be
+ * used when the mouse button is pressed or held down inside its active area:
+ * N (None) No highlighting.
+ * I (Invert) Invert the contents of the annotation rectangle.
+ * O (Outline) Invert the annotation's border.
+ * P (Push) Display the annotation's down appearance, if any (see Section
+ * 8.4.4, "Appearance Streams"). If no down appearance is defined, offset
+ * the contents of the annotation rectangle to appear as if it were being
+ * "pushed" below the surface of the page.
+ * A highlighting mode other than P overrides any down appearance defined for
+ * the annotation. Default value: I.
+ * Note: In PDF 1.1, highlighting is always done by inverting colors inside the anno-
+ * tation rectangle.
+**/
+ bool has_H() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
+ }
+
std::string H() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
@@ -581,6 +624,17 @@ public:
return "";
}
+/** (Optional; PDF 1.3) A URI action (see "URI Actions" on page 523) formerly
+ * associated with this annotation. When Web Capture (Section 9.9, "Web Cap-
+ * ture") changes an annotation from a URI to a go-to action ("Go-To Actions"
+ * on page 519), it uses this entry to save the data from the original URI action so
+ * that it can be changed back in case the target page for the go-to action is subse-
+ * quently deleted.
+**/
+ bool has_PA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", NULL));
+ }
+
SkPdfDictionary* PA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfActionDictionary_autogen.h
index 8f2dcfa6a1..7d4b52db4b 100644
--- a/experimental/PdfViewer/SkPdfActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all action dictionaries
class SkPdfActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfActionDictionary& operator=(const SkPdfActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be Action for an action dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The type of action that this dictionary describes; see Table 8.34
+ * on page 518 for specific values.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +550,15 @@ public:
return "";
}
+/** (Optional; PDF 1.2) The next action, or sequence of actions, to be per-
+ * formed after this one. The value is either a single action dictionary or an
+ * array of action dictionaries to be performed in order; see below for fur-
+ * ther discussion.
+**/
+ bool has_Next() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", NULL));
+ }
+
bool isNextADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfAlternateImageDictionary_autogen.h b/experimental/PdfViewer/SkPdfAlternateImageDictionary_autogen.h
index abeaee4ce3..1a7ae95548 100644
--- a/experimental/PdfViewer/SkPdfAlternateImageDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAlternateImageDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an alternate image dictionary
class SkPdfAlternateImageDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAlternateImageDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfAlternateImageDictionary& operator=(const SkPdfAlternateImageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The image XObject for the alternate image.
+**/
+ bool has_Image() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", NULL));
+ }
+
SkPdfStream Image() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", &ret)) return ret;
@@ -528,6 +535,15 @@ public:
return SkPdfStream();
}
+/** (Optional) A flag indicating whether this alternate image is the default ver-
+ * sion to be used for printing. At most one alternate for a given base image may
+ * be so designated. If no alternate has this entry set to true, the base image itself
+ * is used for printing.
+**/
+ bool has_DefaultForPrinting() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", NULL));
+ }
+
bool DefaultForPrinting() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfAnnotationActionsDictionary_autogen.h b/experimental/PdfViewer/SkPdfAnnotationActionsDictionary_autogen.h
index b825524506..7d5ebcf726 100644
--- a/experimental/PdfViewer/SkPdfAnnotationActionsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAnnotationActionsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an annotation's additional-actions dictionary
class SkPdfAnnotationActionsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAnnotationActionsDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfAnnotationActionsDictionary& operator=(const SkPdfAnnotationActionsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.2) An action to be performed when the cursor enters the annotation's
+ * active area.
+**/
+ bool has_E() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
+ }
+
SkPdfDictionary* E() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An action to be performed when the cursor exits the annotation's
+ * active area.
+**/
+ bool has_X() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", NULL));
+ }
+
SkPdfDictionary* X() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An action to be performed when the mouse button is pressed
+ * inside the annotation's active area. (The name D stands for "down.")
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
SkPdfDictionary* D() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
@@ -542,6 +564,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An action to be performed when the mouse button is released
+ * inside the annotation's active area. (The name U stands for "up.")
+ * Note: For backward compatibility, the A entry in an annotation dictionary, if present,
+ * takes precedence over this entry (see Table 8.10 on page 490).
+**/
+ bool has_U() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", NULL));
+ }
+
SkPdfDictionary* U() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &ret)) return ret;
@@ -549,6 +580,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2; widget annotations only) An action to be performed when the
+ * annotation receives the input focus.
+**/
+ bool has_Fo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", NULL));
+ }
+
SkPdfDictionary* Fo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", &ret)) return ret;
@@ -556,6 +594,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2; widget annotations only) (Uppercase B, lowercase L) An action to
+ * be performed when the annotation loses the input focus. (The name Bl stands for
+ * "blurred.")
+**/
+ bool has_Bl() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", NULL));
+ }
+
SkPdfDictionary* Bl() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h
index 3e01542ff1..de92d52fcd 100644
--- a/experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all annotation dictionaries
class SkPdfAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfAnnotationDictionary& operator=(const SkPdfAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Annot for an annotation dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The type of annotation that this dictionary describes; see Table
+ * 8.14 on page 499 for specific values.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -535,6 +550,17 @@ public:
return "";
}
+/** (Required or optional, depending on the annotation type) Text to be displayed
+ * for the annotation or, if this type of annotation does not display text, an al-
+ * ternate description of the annotation's contents in human-readable form. In
+ * either case, this text is useful when extracting the document's contents in
+ * support of accessibility to disabled users or for other purposes (see Section
+ * 9.8.2, "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -542,6 +568,13 @@ public:
return "";
}
+/** (Optional; PDF 1.3; not used in FDF files) An indirect reference to the page
+ * object with which this annotation is associated.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
SkPdfDictionary* P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
@@ -549,6 +582,13 @@ public:
return NULL;
}
+/** (Required) The annotation rectangle, defining the location of the annotation
+ * on the page in default user space units.
+**/
+ bool has_Rect() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", NULL));
+ }
+
SkRect Rect() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", &ret)) return ret;
@@ -556,6 +596,22 @@ public:
return SkRect();
}
+/** (Optional; PDF 1.4) The annotation name, a text string uniquely identifying
+ * it among all the annotations on its page.
+**/
+ bool has_NM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NM", "", NULL));
+ }
+
+/** (Optional; PDF 1.1) The date and time when the annotation was most
+ * recently modified. The preferred format is a date string as described in Sec-
+ * tion 3.8.2, "Dates," but viewer applications should be prepared to accept and
+ * display a string in any format. (See implementation note 59 in Appendix H.)
+**/
+ bool has_M() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", NULL));
+ }
+
bool isMADate() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false;
@@ -582,6 +638,13 @@ public:
return "";
}
+/** (Optional; PDF 1.1) A set of flags specifying various characteristics of the an-
+ * notation (see Section 8.4.2, "Annotation Flags"). Default value: 0.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -589,6 +652,17 @@ public:
return 0;
}
+/** (Optional; PDF 1.2) A border style dictionary specifying the characteristics of
+ * the annotation's border (see Section 8.4.3, "Border Styles"; see also imple-
+ * mentation note 60 in Appendix H).
+ * Note: This entry also specifies the width and dash pattern for the lines drawn by
+ * line, square, circle, and ink annotations. See the note under Border (below) for
+ * additional information.
+**/
+ bool has_BS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
+ }
+
SkPdfDictionary* BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
@@ -596,6 +670,33 @@ public:
return NULL;
}
+/** (Optional) An array specifying the characteristics of the annotation's border.
+ * The border is specified as a "rounded rectangle."
+ * In PDF 1.0, the array consists of three numbers defining the horizontal cor-
+ * ner radius, vertical corner radius, and border width, all in default user space
+ * units. If the corner radii are 0, the border has square (not rounded) corners;
+ * if the border width is 0, no border is drawn. (See implementation note 61 in
+ * Appendix H.)
+ * In PDF 1.1, the array may have a fourth element, an optional dash array
+ * defining a pattern of dashes and gaps to be used in drawing the border. The
+ * dash array is specified in the same format as in the line dash pattern parame-
+ * ter of the graphics state (see "Line Dash Pattern" on page 155). For example,
+ * a Border value of [0 0 1 [3 2]] specifies a border 1 unit wide, with square
+ * corners, drawn with 3-unit dashes alternating with 2-unit gaps. Note that no
+ * dash phase is specified; the phase is assumed to be 0. (See implementation
+ * note 62 in Appendix H.)
+ * Note: In PDF 1.2 or later, annotations may ignore this entry and use the BS
+ * entry (see above) to specify their border styles instead. In PDF 1.2 and 1.3, only
+ * widget annotations do so; in PDF 1.4, all of the standard annotation types ex-
+ * cept Link (see Table 8.14 on page 499) use BS rather than Border if both are
+ * present. For backward compatibility, however, Border is still supported for all
+ * annotation types.
+ * Default value: [0 0 1].
+**/
+ bool has_Border() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", NULL));
+ }
+
SkPdfArray Border() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", &ret)) return ret;
@@ -603,6 +704,14 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) An appearance dictionary specifying how the annotation
+ * is presented visually on the page (see Section 8.4.4, "Appearance Streams";
+ * see also implementation note 60 in Appendix H).
+**/
+ bool has_AP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
+ }
+
SkPdfDictionary* AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
@@ -610,6 +719,15 @@ public:
return NULL;
}
+/** (Required if the appearance dictionary AP contains one or more subdictionaries;
+ * PDF 1.2) The annotation's appearance state, which selects the applicable
+ * appearance stream from an appearance subdictionary (see Section 8.4.4,
+ * "Appearance Streams"; see also implementation note 60 in Appendix H).
+**/
+ bool has_AS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", NULL));
+ }
+
std::string AS() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", &ret)) return ret;
@@ -617,6 +735,17 @@ public:
return "";
}
+/** (Optional; PDF 1.1) An array of three numbers in the range 0.0 to 1.0, repre-
+ * senting the components of a color in the DeviceRGB color space. This color
+ * will be used for the following purposes:
+ * * The background of the annotation's icon when closed
+ * * The title bar of the annotation's pop-up window
+ * * The border of a link annotation
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfArray C() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
@@ -624,6 +753,27 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) The constant opacity value to be used in painting the
+ * annotation (see Sections 7.1, "Overview of Transparency," and 7.2.6, "Shape
+ * and Opacity Computations"). This value applies to all visible elements of
+ * the annotation in its closed state (including its background and border), but
+ * not to the pop-up window that appears when the annotation is opened. The
+ * specified value is used as the initial alpha constant (both stroking and non-
+ * stroking) for interpreting the annotation's appearance stream, if any (see
+ * Section 8.4.4, "Appearance Streams," and "Constant Shape and Opacity" on
+ * page 444). The implicit blend mode (see Section 7.2.4, "Blend Mode") is
+ * Normal. Default value: 1.0.
+ * Note: If no explicit appearance stream is defined for the annotation, it will be
+ * painted by implementation-dependent means that do not necessarily conform to
+ * the Adobe imaging model; in this case, the effect of this entry is implementation-
+ * dependent as well.
+ * Note: This entry is recognized by all of the standard annotation types listed in
+ * Table 8.14 on page 499 except Link, Movie, Widget, PrinterMark, and TrapNet.
+**/
+ bool has_CA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
+ }
+
double CA() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
@@ -631,6 +781,13 @@ public:
return 0;
}
+/** (Optional; PDF 1.1) The text label to be displayed in the title bar of the anno-
+ * tation's pop-up window when open and active.
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -638,6 +795,13 @@ public:
return "";
}
+/** (Optional; PDF 1.3) An indirect reference to a pop-up annotation for enter-
+ * ing or editing the text associated with this annotation.
+**/
+ bool has_Popup() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", NULL));
+ }
+
SkPdfDictionary* Popup() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", &ret)) return ret;
@@ -645,6 +809,16 @@ public:
return NULL;
}
+/** (Optional; PDF 1.1) An action to be performed when the annotation is acti-
+ * vated (see Section 8.5, "Actions").
+ * Note: This entry is not permitted in link annotations if a Dest entry is present
+ * (see "Link Annotations" on page 501). Also note that the A entry in movie anno-
+ * tations has a different meaning (see "Movie Annotations" on page 510).
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
SkPdfDictionary* A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
@@ -652,6 +826,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An additional-actions dictionary defining the anno-
+ * tation's behavior in response to various trigger events (see Section 8.5.2,
+ * "Trigger Events"). At the time of publication, this entry is used only by wid-
+ * get annotations.
+**/
+ bool has_AA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
+ }
+
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
@@ -659,6 +842,14 @@ public:
return NULL;
}
+/** (Required if the annotation is a structural content item; PDF 1.3) The integer
+ * key of the annotation's entry in the structural parent tree (see "Finding Struc-
+ * ture Elements from Content Items" on page 600).
+**/
+ bool has_StructParent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
+ }
+
long StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_autogen.h b/experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_autogen.h
index e4ee8a1f4f..8c164375f3 100644
--- a/experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAppearanceCharacteristicsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an appearance characteristics dictionary
class SkPdfAppearanceCharacteristicsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAppearanceCharacteristicsDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfAppearanceCharacteristicsDictionary& operator=(const SkPdfAppearanceCharacteristicsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The number of degrees by which the widget annotation is rotated
+ * counterclockwise relative to the page. The value must be a multiple of 90.
+ * Default value: 0.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
long R() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
@@ -528,6 +537,18 @@ public:
return 0;
}
+/** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
+ * widget annotation's border. The number of array elements determines the color
+ * space in which the color is defined:
+ * 0 No color; transparent
+ * 1 DeviceGray
+ * 3 DeviceRGB
+ * 4 DeviceCMYK
+**/
+ bool has_BC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
+ }
+
SkPdfArray BC() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", &ret)) return ret;
@@ -535,6 +556,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
+ * widget annotation's background. The number of array elements determines the
+ * color space, as described above for BC.
+**/
+ bool has_BG() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
+ }
+
SkPdfArray BG() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", &ret)) return ret;
@@ -542,6 +571,17 @@ public:
return SkPdfArray();
}
+/** (Optional; button fields only) The widget annotation's normal caption, displayed
+ * when it is not interacting with the user.
+ * Note: Unlike the remaining entries listed below, which apply only to widget annota-
+ * tions associated with pushbutton fields (see "Pushbuttons" on page 539), the CA
+ * entry can be used with any type of button field, including checkboxes ("Checkboxes"
+ * on page 539) and radio buttons ("Radio Buttons" on page 540).
+**/
+ bool has_CA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
+ }
+
std::string CA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
@@ -549,6 +589,14 @@ public:
return "";
}
+/** (Optional; pushbutton fields only) The widget annotation's rollover caption, dis-
+ * played when the user rolls the cursor into its active area without pressing the
+ * mouse button.
+**/
+ bool has_RC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", NULL));
+ }
+
std::string RC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", &ret)) return ret;
@@ -556,6 +604,13 @@ public:
return "";
}
+/** (Optional; pushbutton fields only) The widget annotation's alternate (down)
+ * caption, displayed when the mouse button is pressed within its active area.
+**/
+ bool has_AC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", NULL));
+ }
+
std::string AC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", &ret)) return ret;
@@ -563,6 +618,14 @@ public:
return "";
}
+/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
+ * defining the widget annotation's normal icon, displayed when it is not inter-
+ * acting with the user.
+**/
+ bool has_I() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
+ }
+
SkPdfStream I() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
@@ -570,6 +633,14 @@ public:
return SkPdfStream();
}
+/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
+ * defining the widget annotation's rollover icon, displayed when the user rolls the
+ * cursor into its active area without pressing the mouse button.
+**/
+ bool has_RI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
+ }
+
SkPdfStream RI() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret;
@@ -577,6 +648,14 @@ public:
return SkPdfStream();
}
+/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
+ * defining the widget annotation's alternate (down) icon, displayed when the
+ * mouse button is pressed within its active area.
+**/
+ bool has_IX() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", NULL));
+ }
+
SkPdfStream IX() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", &ret)) return ret;
@@ -584,6 +663,15 @@ public:
return SkPdfStream();
}
+/** (Optional; pushbutton fields only) An icon fit dictionary (see Table 8.73 on page
+ * 566) specifying how to display the widget annotation's icon within its
+ * annotation rectangle. If present, the icon fit dictionary applies to all of the anno-
+ * tation's icons (normal, rollover, and alternate).
+**/
+ bool has_IF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
+ }
+
SkPdfDictionary* IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
@@ -591,6 +679,21 @@ public:
return NULL;
}
+/** (Optional; pushbutton fields only) A code indicating where to position the text of
+ * the widget annotation's caption relative to its icon:
+ * 0 No icon; caption only
+ * 1 No caption; icon only
+ * 2 Caption below the icon
+ * 3 Caption above the icon
+ * 4 Caption to the right of the icon
+ * 5 Caption to the left of the icon
+ * 6 Caption overlaid directly on the icon
+ * Default value: 0.
+**/
+ bool has_TP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", NULL));
+ }
+
long TP() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h b/experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h
index 8b82405336..c73b1fb016 100644
--- a/experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAppearanceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an appearance dictionary
class SkPdfAppearanceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAppearanceDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfAppearanceDictionary& operator=(const SkPdfAppearanceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The annotation's normal appearance.
+**/
+ bool has_N() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
+ }
+
bool isNAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
@@ -547,6 +554,13 @@ public:
return NULL;
}
+/** (Optional) The annotation's rollover appearance. Default value: the value of
+ * the N entry.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
bool isRAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
@@ -573,6 +587,13 @@ public:
return NULL;
}
+/** (Optional) The annotation's down appearance. Default value: the value of the
+ * N entry.
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
bool isDAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfApplicationDataDictionary_autogen.h b/experimental/PdfViewer/SkPdfApplicationDataDictionary_autogen.h
index d7f3c8af23..c4526ec97b 100644
--- a/experimental/PdfViewer/SkPdfApplicationDataDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfApplicationDataDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an application data dictionary
class SkPdfApplicationDataDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kApplicationDataDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfApplicationDataDictionary& operator=(const SkPdfApplicationDataDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The date and time when the contents of the page or form
+ * were most recently modified by this application.
+**/
+ bool has_LastModified() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
+ }
+
SkPdfDate LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return SkPdfDate();
}
+/** (Optional) Any private data appropriate to the application, typically
+ * in the form of a dictionary.
+**/
+ bool has_Private() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", NULL));
+ }
+
SkPdfObject* Private() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfArtifactsDictionary_autogen.h b/experimental/PdfViewer/SkPdfArtifactsDictionary_autogen.h
index c5a580bc06..b303a88ed0 100644
--- a/experimental/PdfViewer/SkPdfArtifactsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfArtifactsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Property list entries for artifacts
class SkPdfArtifactsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kArtifactsDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfArtifactsDictionary& operator=(const SkPdfArtifactsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of artifact that this property list describes; if present, must
+ * be one of the names Pagination, Layout, or Page.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Optional) An array of four numbers in default user space units giving the coor-
+ * dinates of the left, bottom, right, and top edges, respectively, of the artifact's
+ * bounding box (the rectangle that completely encloses its visible extent).
+**/
+ bool has_BBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
+ }
+
SkRect BBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
@@ -535,6 +551,17 @@ public:
return SkRect();
}
+/** (Optional; pagination artifacts only) An array of name objects containing one to
+ * four of the names Top, Bottom, Left, and Right, specifying the edges of the page, if
+ * any, to which the artifact is logically attached. Page edges are defined by the
+ * page's crop box (see Section 9.10.1, "Page Boundaries"). The ordering of names
+ * within the array is immaterial. Including both Left and Right or both Top and
+ * Bottom indicates a full-width or full-height artifact, respectively.
+**/
+ bool has_Attached() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", NULL));
+ }
+
SkPdfArray Attached() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfAttributeObjectDictionary_autogen.h b/experimental/PdfViewer/SkPdfAttributeObjectDictionary_autogen.h
index 5433c3cf96..eff5f27398 100644
--- a/experimental/PdfViewer/SkPdfAttributeObjectDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfAttributeObjectDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry common to all attribute objects
class SkPdfAttributeObjectDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kAttributeObjectDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfAttributeObjectDictionary& operator=(const SkPdfAttributeObjectDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The name of the application or plug-in extension owning the attribute data.
+ * The name must conform to the guidelines described in Appendix E.
+**/
+ bool has_O() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
+ }
+
std::string O() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfBeadDictionary_autogen.h b/experimental/PdfViewer/SkPdfBeadDictionary_autogen.h
index 92f5f05f63..8d0545214b 100644
--- a/experimental/PdfViewer/SkPdfBeadDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfBeadDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a bead dictionary
class SkPdfBeadDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kBeadDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfBeadDictionary& operator=(const SkPdfBeadDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * Bead for a bead dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Required for the first bead of a thread; optional for all others; must be an indirect refer-
+ * ence) The thread to which this bead belongs.
+ * Note: In PDF 1.1, this entry is permitted only for the first bead of a thread. In PDF 1.2
+ * and higher, it is permitted for any bead but required only for the first.
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
SkPdfDictionary* T() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -535,6 +552,13 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) The next bead in the thread. In the last bead,
+ * this entry points to the first.
+**/
+ bool has_N() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
+ }
+
SkPdfDictionary* N() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
@@ -542,6 +566,13 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) The previous bead in the thread. In the first
+ * bead, this entry points to the last.
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
SkPdfDictionary* V() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -549,6 +580,13 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) The page object representing the page on
+ * which this bead appears.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
SkPdfDictionary* P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
@@ -556,6 +594,12 @@ public:
return NULL;
}
+/** (Required) A rectangle specifying the location of this bead on the page.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
SkRect R() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfBlockLevelStructureElementsDictionary_autogen.h b/experimental/PdfViewer/SkPdfBlockLevelStructureElementsDictionary_autogen.h
index d795a62e75..8041c7cb98 100644
--- a/experimental/PdfViewer/SkPdfBlockLevelStructureElementsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfBlockLevelStructureElementsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional standard layout attributes specific to block-level structure elements
class SkPdfBlockLevelStructureElementsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kBlockLevelStructureElementsDictionary_SkPdfObjectType;}
@@ -521,6 +522,19 @@ public:
SkPdfBlockLevelStructureElementsDictionary& operator=(const SkPdfBlockLevelStructureElementsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The amount of extra space preceding the before edge of the BLSE,
+ * measured in default user space units in the block-progression direction. This
+ * value is added to any adjustments induced by the LineHeight attributes of
+ * ILSEs within the first line of the BLSE (see "Layout Attributes for ILSEs" on
+ * page 646). If the preceding BLSE has a SpaceAfter attribute, the greater of the
+ * two attribute values is used. Default value: 0.
+ * Note: This attribute is disregarded for the first BLSE placed in a given reference
+ * area.
+**/
+ bool has_SpaceBefore() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", NULL));
+ }
+
double SpaceBefore() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", &ret)) return ret;
@@ -528,6 +542,19 @@ public:
return 0;
}
+/** (Optional) The amount of extra space following the after edge of the BLSE,
+ * measured in default user space units in the block-progression direction. This
+ * value is added to any adjustments induced by the LineHeight attributes of
+ * ILSEs within the last line of the BLSE (see "Layout Attributes for ILSEs" on
+ * page 646). If the following BLSE has a SpaceBefore attribute, the greater of
+ * the two attribute values is used. Default value: 0.
+ * Note: This attribute is disregarded for the last BLSE placed in a given reference
+ * area.
+**/
+ bool has_SpaceAfter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", NULL));
+ }
+
double SpaceAfter() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", &ret)) return ret;
@@ -535,6 +562,25 @@ public:
return 0;
}
+/** (Optional) The distance from the start edge of the reference area to that of the
+ * BLSE, measured in default user space units in the inline-progression direc-
+ * tion. This attribute applies only to structure elements with a Placement
+ * attribute of Block or Start (see "General Layout Attributes" on page 640); it is
+ * disregarded for those with other Placement values. Default value: 0.
+ * Note: A negative value for this attribute places the start edge of the BLSE out-
+ * side that of the reference area. The results are implementation-dependent and
+ * may not be supported by all Tagged PDF consumer applications or export
+ * formats.
+ * Note: If a structure element with a StartIndent attribute is placed adjacent to a
+ * floating element with a Placement attribute of Start, the actual value used for
+ * the element's starting indent will be its own StartIndent attribute or the inline
+ * extent of the adjacent floating element, whichever is greater. This value may
+ * then be further adjusted by the element's TextIndent attribute, if any.
+**/
+ bool has_StartIndent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", NULL));
+ }
+
double StartIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", &ret)) return ret;
@@ -542,6 +588,23 @@ public:
return 0;
}
+/** (Optional) The distance from the end edge of the BLSE to that of the ref-
+ * erence area, measured in default user space units in the inline-progression
+ * direction. This attribute applies only to structure elements with a Placement
+ * attribute of Block or End (see "General Layout Attributes" on page 640); it is
+ * disregarded for those with other Placement values. Default value: 0.
+ * Note: A negative value for this attribute places the end edge of the BLSE outside
+ * that of the reference area. The results are implementation-dependent and may
+ * not be supported by all Tagged PDF consumer applications or export formats.
+ * Note: If a structure element with an EndIndent attribute is placed adjacent to a
+ * floating element with a Placement attribute of End, the actual value used for the
+ * element's ending indent will be its own EndIndent attribute or the inline extent
+ * of the adjacent floating element, whichever is greater.
+**/
+ bool has_EndIndent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", NULL));
+ }
+
double EndIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", &ret)) return ret;
@@ -549,6 +612,19 @@ public:
return 0;
}
+/** (Optional; applies only to some BLSEs, as described below) The additional
+ * distance, measured in default user space units in the inline-progression
+ * direction, from the start edge of the BLSE, as specified by StartIndent
+ * (above), to that of the first line of text. A negative value indicates a hanging
+ * indent. Default value: 0.
+ * This attribute applies only to paragraphlike BLSEs and those of structure
+ * types Lbl (Label), LBody (List body), TH (Table header), and TD (Table data),
+ * provided that they contain content other than nested BLSEs.
+**/
+ bool has_TextIndent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", NULL));
+ }
+
double TextIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", &ret)) return ret;
@@ -556,6 +632,21 @@ public:
return 0;
}
+/** (Optional; applies only to BLSEs containing text) The alignment, in the inline-
+ * progression direction, of text and other content within lines of the BLSE:
+ * Start Aligned with the start edge.
+ * Center Centered between the start and end edges.
+ * End Aligned with the end edge.
+ * Justify Aligned with both the start and end edges, with internal
+ * spacing within each line expanded, if necessary, to achieve
+ * such alignment. The last (or only) line is aligned with the
+ * start edge only, as for Start (above).
+ * Default value: Start.
+**/
+ bool has_TextAlign() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", NULL));
+ }
+
std::string TextAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", &ret)) return ret;
@@ -563,6 +654,17 @@ public:
return "";
}
+/** (Illustrations and tables only; required if the element appears in its entirety on a
+ * single page) An array of four numbers in default user space units giving the
+ * coordinates of the left, bottom, right, and top edges, respectively, of the ele-
+ * ment's bounding box (the rectangle that completely encloses its visible con-
+ * tent). This attribute applies only to elements of structure type Figure,
+ * Formula, Form, or Table.
+**/
+ bool has_BBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
+ }
+
SkRect BBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
@@ -570,6 +672,20 @@ public:
return SkRect();
}
+/** (Optional; illustrations, tables, table headers, and table cells only; strongly
+ * recommended for table cells) The desired width of the element's content
+ * rectangle (see "Content and Allocation Rectangles" on page 648), measured
+ * in default user space units in the inline-progression direction. This attribute
+ * applies only to elements of structure type Figure, Formula, Form, Table, TH
+ * (Table header), or TD (Table data).
+ * The name Auto in place of a numeric value indicates that no specific width
+ * constraint is to be imposed; the element's width is determined by the intrin-
+ * sic width of its content. Default value: Auto.
+**/
+ bool has_Width() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", NULL));
+ }
+
bool isWidthANumber() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return false;
@@ -596,6 +712,19 @@ public:
return "";
}
+/** (Optional; illustrations, tables, table headers, and table cells only) The desired
+ * height of the element's content rectangle (see "Content and Allocation
+ * Rectangles" on page 648), measured in default user space units in the block-
+ * progression direction. This attribute applies only to elements of structure
+ * type Figure, Formula, Form, Table, TH (Table header), or TD (Table data).
+ * The name Auto in place of a numeric value indicates that no specific height
+ * constraint is to be imposed; the element's height is determined by the intrin-
+ * sic height of its content. Default value: Auto.
+**/
+ bool has_Height() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", NULL));
+ }
+
bool isHeightANumber() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return false;
@@ -622,6 +751,32 @@ public:
return "";
}
+/** (Optional; table cells only) The alignment, in the block-progression direction,
+ * of content within the table cell:
+ * Before Before edge of the first child's allocation rectangle aligned
+ * with that of the table cell's content rectangle.
+ * Middle Children centered within the table cell, so that the distance
+ * between the before edge of the first child's allocation rec-
+ * tangle and that of the table cell's content rectangle is the same
+ * as the distance between the after edge of the last child's allo-
+ * cation rectangle and that of the table cell's content rectangle.
+ * After After edge of the last child's allocation rectangle aligned with
+ * that of the table cell's content rectangle.
+ * Justify Children aligned with both the before and after edges of the
+ * table cell's content rectangle. The first child is placed as
+ * described above for Before and the last child as described for
+ * After, with equal spacing between the children. If there is only
+ * one child, it is aligned with the before edge only, as for Before.
+ * This attribute applies only to elements of structure type TH (Table header) or
+ * TD (Table data), and controls the placement of all BLSEs that are children of
+ * the given element. The table cell's content rectangle (see "Content and Allo-
+ * cation Rectangles" on page 648) becomes the reference area for all of its
+ * descendants. Default value: Before.
+**/
+ bool has_BlockAlign() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", NULL));
+ }
+
std::string BlockAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", &ret)) return ret;
@@ -629,6 +784,26 @@ public:
return "";
}
+/** (Optional; table cells only) The alignment, in the inline-progression direction,
+ * of content within the table cell:
+ * Start Start edge of each child's allocation rectangle aligned with
+ * that of the table cell's content rectangle
+ * Center Each child centered within the table cell, so that the distance
+ * between the start edges of the child's allocation rectangle and
+ * the table cell's content rectangle is the same as the distance
+ * between their end edges
+ * End End edge of each child's allocation rectangle aligned with
+ * that of the table cell's content rectangle
+ * This attribute applies only to elements of structure type TH (Table header) or
+ * TD (Table data), and controls the placement of all BLSEs that are children of
+ * the given element. The table cell's content rectangle (see "Content and Allo-
+ * cation Rectangles" on page 648) becomes the reference area for all of its
+ * descendants. Default value: Start.
+**/
+ bool has_InlineAlign() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", NULL));
+ }
+
std::string InlineAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfBorderStyleDictionary_autogen.h b/experimental/PdfViewer/SkPdfBorderStyleDictionary_autogen.h
index df04cb9323..c7ea5f5354 100644
--- a/experimental/PdfViewer/SkPdfBorderStyleDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfBorderStyleDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a border style dictionary
class SkPdfBorderStyleDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kBorderStyleDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfBorderStyleDictionary& operator=(const SkPdfBorderStyleDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * Border for a border style dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Optional) The border width in points. If this value is 0, no border is drawn. Default
+ * value: 1.
+**/
+ bool has_W() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
+ }
+
double W() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
@@ -535,6 +550,22 @@ public:
return 0;
}
+/** (Optional) The border style:
+ * S (Solid) A solid rectangle surrounding the annotation.
+ * D (Dashed) A dashed rectangle surrounding the annotation. The dash pattern
+ * is specified by the D entry (see below).
+ * B (Beveled) A simulated embossed rectangle that appears to be raised above the
+ * surface of the page.
+ * I (Inset) A simulated engraved rectangle that appears to be recessed below the
+ * surface of the page.
+ * U (Underline) A single line along the bottom of the annotation rectangle.
+ * Other border styles may be defined in the future. (See implementation note 64 in
+ * Appendix H.) Default value: S.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -542,6 +573,17 @@ public:
return "";
}
+/** (Optional) A dash array defining a pattern of dashes and gaps to be used in drawing a
+ * dashed border (border style D above). The dash array is specified in the same format
+ * as in the line dash pattern parameter of the graphics state (see "Line Dash Pattern" on
+ * page 155). The dash phase is not specified and is assumed to be 0. For example, a D
+ * entry of [3 2] specifies a border drawn with 3-point dashes alternating with 2-point
+ * gaps. Default value: [3].
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
SkPdfArray D() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfBoxColorInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfBoxColorInformationDictionary_autogen.h
index f889a38aec..ea26ccdcf7 100644
--- a/experimental/PdfViewer/SkPdfBoxColorInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfBoxColorInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a box color information dictionary
class SkPdfBoxColorInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kBoxColorInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfBoxColorInformationDictionary& operator=(const SkPdfBoxColorInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
+ * tics for displaying guidelines for the page's crop box. This entry is ignored if no crop
+ * box is defined in the page object.
+**/
+ bool has_CropBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
+ }
+
SkPdfDictionary* CropBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return NULL;
}
+/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
+ * tics for displaying guidelines for the page's bleed box. This entry is ignored if no
+ * bleed box is defined in the page object.
+**/
+ bool has_BleedBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
+ }
+
SkPdfDictionary* BleedBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", &ret)) return ret;
@@ -535,6 +552,14 @@ public:
return NULL;
}
+/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
+ * tics for displaying guidelines for the page's trim box. This entry is ignored if no trim
+ * box is defined in the page object.
+**/
+ bool has_TrimBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
+ }
+
SkPdfDictionary* TrimBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", &ret)) return ret;
@@ -542,6 +567,14 @@ public:
return NULL;
}
+/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
+ * tics for displaying guidelines for the page's art box. This entry is ignored if no art
+ * box is defined in the page object.
+**/
+ bool has_ArtBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
+ }
+
SkPdfDictionary* ArtBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfBoxStyleDictionary_autogen.h b/experimental/PdfViewer/SkPdfBoxStyleDictionary_autogen.h
index a962aac70b..e91a7d95e3 100644
--- a/experimental/PdfViewer/SkPdfBoxStyleDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfBoxStyleDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a box style dictionary
class SkPdfBoxStyleDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kBoxStyleDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfBoxStyleDictionary& operator=(const SkPdfBoxStyleDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of three numbers in the range 0.0 to 1.0, representing the com-
+ * ponents in the DeviceRGB color space of the color to be used for displaying the
+ * guidelines. Default value: [0.0 0.0 0.0].
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfArray C() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
@@ -528,6 +537,12 @@ public:
return SkPdfArray();
}
+/** (Optional) The guideline width in default user space units. Default value: 1.
+**/
+ bool has_W() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
+ }
+
double W() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
@@ -535,6 +550,16 @@ public:
return 0;
}
+/** (Optional) The guideline style:
+ * S (Solid) A solid rectangle.
+ * D (Dashed) A dashed rectangle. The dash pattern is specified by the D entry
+ * (see below).
+ * Other guideline styles may be defined in the future. Default value: S.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -542,6 +567,17 @@ public:
return "";
}
+/** (Optional) A dash array defining a pattern of dashes and gaps to be used in drawing
+ * dashed guidelines (guideline style D above). The dash array is specified in default
+ * user space units, in the same format as in the line dash pattern parameter of the
+ * graphics state (see "Line Dash Pattern" on page 155). The dash phase is not speci-
+ * fied and is assumed to be 0. For example, a D entry of [3 2] specifies guidelines
+ * drawn with 3-point dashes alternating with 2-point gaps. Default value: [3].
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
SkPdfArray D() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCIDFontDescriptorDictionary_autogen.h b/experimental/PdfViewer/SkPdfCIDFontDescriptorDictionary_autogen.h
index a19c7f2092..0be2a828ad 100644
--- a/experimental/PdfViewer/SkPdfCIDFontDescriptorDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCIDFontDescriptorDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional font descriptor entries for CIDFonts
class SkPdfCIDFontDescriptorDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCIDFontDescriptorDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfCIDFontDescriptorDictionary& operator=(const SkPdfCIDFontDescriptorDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A dictionary containing entries that describe the style of the glyphs in
+ * the font (see "Style," above).
+**/
+ bool has_Style() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", NULL));
+ }
+
SkPdfDictionary* Style() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", &ret)) return ret;
@@ -528,6 +536,16 @@ public:
return NULL;
}
+/** (Optional) A name specifying the language of the font, used for encodings where
+ * the language is not implied by the encoding itself. The possible values are the
+ * 2-character language codes defined by ISO 639-for example, en for English and ja
+ * for Japanese. The complete list of these codes be obtained from the International
+ * Organization for Standardization (see the Bibliography).
+**/
+ bool has_Lang() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
+ }
+
std::string Lang() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
@@ -535,6 +553,15 @@ public:
return "";
}
+/** (Optional) A dictionary whose keys identify a class of characters in a CIDFont.
+ * Each value is a dictionary containing entries that override the corresponding
+ * values in the main font descriptor dictionary for that class of characters (see "FD,"
+ * below).
+**/
+ bool has_FD() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", NULL));
+ }
+
SkPdfDictionary* FD() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", &ret)) return ret;
@@ -542,6 +569,19 @@ public:
return NULL;
}
+/** (Optional) A stream identifying which CIDs are present in the CIDFont file. If this
+ * entry is present, the CIDFont contains only a subset of the glyphs in the character
+ * collection defined by the CIDSystemInfo dictionary. If it is absent, the only indica-
+ * tion of a CIDFont subset is the subset tag in the FontName entry (see Section 5.5.3,
+ * "Font Subsets").
+ * The stream's data is organized as a table of bits indexed by CID. The bits should be
+ * stored in bytes with the high-order bit first. Each bit corresponds to a CID. The first
+ * bit of the first byte corresponds to CID 0, the next bit to CID 1, and so on.
+**/
+ bool has_CIDSet() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", NULL));
+ }
+
SkPdfStream CIDSet() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCIDFontDictionary_autogen.h b/experimental/PdfViewer/SkPdfCIDFontDictionary_autogen.h
index fc81ad456f..297e33e355 100644
--- a/experimental/PdfViewer/SkPdfCIDFontDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCIDFontDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfFontDictionary_autogen.h"
+// Entries in a CIDFont dictionary
class SkPdfCIDFontDictionary : public SkPdfFontDictionary {
public:
virtual SkPdfObjectType getType() const { return kCIDFontDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfCIDFontDictionary& operator=(const SkPdfCIDFontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Font for a CIDFont dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -45,6 +53,12 @@ public:
return "";
}
+/** (Required) The type of CIDFont; CIDFontType0 or CIDFontType2.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -52,6 +66,16 @@ public:
return "";
}
+/** (Required) The PostScript name of the CIDFont. For Type 0 CIDFonts, this
+ * is usually the value of the CIDFontName entry in the CIDFont program. For
+ * Type 2 CIDFonts, it is derived the same way as for a simple TrueType font;
+ * see Section 5.5.2, "TrueType Fonts." In either case, the name can have a sub-
+ * set prefix if appropriate; see Section 5.5.3, "Font Subsets."
+**/
+ bool has_BaseFont() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
+ }
+
std::string BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
@@ -59,6 +83,13 @@ public:
return "";
}
+/** (Required) A dictionary containing entries that define the character collec-
+ * tion of the CIDFont. See Table 5.12 on page 337.
+**/
+ bool has_CIDSystemInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", NULL));
+ }
+
SkPdfDictionary* CIDSystemInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
@@ -66,6 +97,14 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) A font descriptor describing the
+ * CIDFont's default metrics other than its glyph widths (see Section 5.7,
+ * "Font Descriptors").
+**/
+ bool has_FontDescriptor() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", NULL));
+ }
+
SkPdfDictionary* FontDescriptor() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", &ret)) return ret;
@@ -73,6 +112,13 @@ public:
return NULL;
}
+/** (Optional) The default width for glyphs in the CIDFont (see "Glyph Met-
+ * rics in CIDFonts" on page 340). Default value: 1000.
+**/
+ bool has_DW() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", NULL));
+ }
+
long DW() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", &ret)) return ret;
@@ -80,6 +126,16 @@ public:
return 0;
}
+/** (Optional) A description of the widths for the glyphs in the CIDFont. The
+ * array's elements have a variable format that can specify individual widths
+ * for consecutive CIDs or one width for a range of CIDs (see "Glyph Metrics
+ * in CIDFonts" on page 340). Default value: none (the DW value is used for
+ * all glyphs).
+**/
+ bool has_W() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
+ }
+
SkPdfArray W() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
@@ -87,6 +143,14 @@ public:
return SkPdfArray();
}
+/** (Optional; applies only to CIDFonts used for vertical writing) An array of two
+ * numbers specifying the default metrics for vertical writing (see "Glyph
+ * Metrics in CIDFonts" on page 340). Default value: [880 -1000].
+**/
+ bool has_DW2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", NULL));
+ }
+
SkPdfArray DW2() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", &ret)) return ret;
@@ -94,6 +158,15 @@ public:
return SkPdfArray();
}
+/** (Optional; applies only to CIDFonts used for vertical writing) A description of
+ * the metrics for vertical writing for the glyphs in the CIDFont (see "Glyph
+ * Metrics in CIDFonts" on page 340). Default value: none (the DW2 value is
+ * used for all glyphs).
+**/
+ bool has_W2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", NULL));
+ }
+
SkPdfArray W2() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", &ret)) return ret;
@@ -101,6 +174,20 @@ public:
return SkPdfArray();
}
+/** (Optional; Type 2 CIDFonts only) A specification of the mapping from CIDs
+ * to glyph indices. If the value is a stream, the bytes in the stream contain the
+ * mapping from CIDs to glyph indices: the glyph index for a particular CID
+ * value c is a 2-byte value stored in bytes 2 x c and 2 x c + 1, where the first
+ * byte is the high-order byte. If the value of CIDToGIDMap is a name, it must
+ * be Identity, indicating that the mapping between CIDs and glyph indices is
+ * the identity mapping. Default value: Identity.
+ * This entry may appear only in a Type 2 CIDFont whose associated True-
+ * Type font program is embedded in the PDF file (see the next section).
+**/
+ bool has_CIDToGIDMap() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", NULL));
+ }
+
bool isCIDToGIDMapAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfCIDSystemInfoDictionary_autogen.h b/experimental/PdfViewer/SkPdfCIDSystemInfoDictionary_autogen.h
index 00f2620beb..192991289c 100644
--- a/experimental/PdfViewer/SkPdfCIDSystemInfoDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCIDSystemInfoDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a CIDSystemInfo dictionary
class SkPdfCIDSystemInfoDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCIDSystemInfoDictionary_SkPdfObjectType;}
@@ -521,6 +522,15 @@ public:
SkPdfCIDSystemInfoDictionary& operator=(const SkPdfCIDSystemInfoDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) A string identifying the issuer of the character collection-for exam-
+ * ple, Adobe. For information about assigning a registry identifier, consult the ASN
+ * Developer Program Web site or contact the Adobe Solutions Network (see the
+ * Bibliography).
+**/
+ bool has_Registry() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", NULL));
+ }
+
std::string Registry() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", &ret)) return ret;
@@ -528,6 +538,13 @@ public:
return "";
}
+/** (Required) A string that uniquely names the character collection within the speci-
+ * fied registry-for example, Japan1.
+**/
+ bool has_Ordering() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", NULL));
+ }
+
std::string Ordering() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", &ret)) return ret;
@@ -535,6 +552,16 @@ public:
return "";
}
+/** (Required) The supplement number of the character collection. An original charac-
+ * ter collection has a supplement number of 0. Whenever additional CIDs are
+ * assigned in a character collection, the supplement number is increased. Supple-
+ * ments do not alter the ordering of existing CIDs in the character collection. This
+ * value is not used in determining compatibility between character collections.
+**/
+ bool has_Supplement() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", NULL));
+ }
+
long Supplement() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCMapDictionary_autogen.h b/experimental/PdfViewer/SkPdfCMapDictionary_autogen.h
index c2a91e028a..d07bbefe83 100644
--- a/experimental/PdfViewer/SkPdfCMapDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCMapDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries in a CMap dictionary
class SkPdfCMapDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCMapDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfCMapDictionary& operator=(const SkPdfCMapDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * CMap for a CMap dictionary. (Note that although this object is the value of
+ * an entry named Encoding in a Type 0 font, its type is CMap.)
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +537,13 @@ public:
return "";
}
+/** (Required) The PostScript name of the CMap. This should be the same as the
+ * value of CMapName in the CMap file itself.
+**/
+ bool has_CMapName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", NULL));
+ }
+
std::string CMapName() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", &ret)) return ret;
@@ -535,6 +551,26 @@ public:
return "";
}
+/** (Required) A dictionary or array containing entries that define the character
+ * collection for the CIDFont or CIDFonts associated with the CMap. If the
+ * CMap selects only font number 0 and specifies character selectors that are
+ * CIDs, this entry can be a dictionary identifying the character collection for
+ * the associated CIDFont. Otherwise, it is an array indexed by the font num-
+ * ber. If the character selectors for a given font number are CIDs, the corre-
+ * sponding array element is a dictionary identifying the character collection
+ * for the associated CIDFont. If the character selectors are names or codes (to
+ * be used with an associated font, not a CIDFont), the array element should
+ * be null. For details of the CIDSystemInfo dictionaries, see Section 5.6.2,
+ * "CIDSystemInfo Dictionaries."
+ * Note: In all PDF versions up to and including PDF 1.4, CIDSystemInfo must be
+ * either a dictionary or a one-element array containing a dictionary.
+ * The value of this entry should be the same as the value of CIDSystemInfo in
+ * the CMap file itself.
+**/
+ bool has_CIDSystemInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", NULL));
+ }
+
bool isCIDSystemInfoADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return false;
@@ -561,6 +597,18 @@ public:
return SkPdfArray();
}
+/** (Optional) A code that determines the writing mode for any CIDFont with
+ * which this CMap is combined:
+ * 0 Horizontal
+ * 1 Vertical
+ * Default value: 0.
+ * The value of this entry should be the same as the value of WMode in the
+ * CMap file itself.
+**/
+ bool has_WMode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", NULL));
+ }
+
long WMode() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", &ret)) return ret;
@@ -568,6 +616,15 @@ public:
return 0;
}
+/** (Optional) The name of a predefined CMap, or a stream containing a CMap,
+ * that is to be used as the base for this CMap. This allows the CMap to be de-
+ * fined differentially, specifying only the character mappings that differ from
+ * the base CMap.
+**/
+ bool has_UseCMap() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", NULL));
+ }
+
bool isUseCMapAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfCalgrayColorSpaceDictionary_autogen.h b/experimental/PdfViewer/SkPdfCalgrayColorSpaceDictionary_autogen.h
index 5f38cc3dc8..8b6fa38ccd 100644
--- a/experimental/PdfViewer/SkPdfCalgrayColorSpaceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCalgrayColorSpaceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a CalGray color space dictionary
class SkPdfCalgrayColorSpaceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCalgrayColorSpaceDictionary_SkPdfObjectType;}
@@ -521,6 +522,15 @@ public:
SkPdfCalgrayColorSpaceDictionary& operator=(const SkPdfCalgrayColorSpaceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of three numbers [XW YW ZW ] specifying the tri-
+ * stimulus value, in the CIE 1931 XYZ space, of the diffuse white point; see
+ * "CalRGB Color Spaces," below, for further discussion. The numbers XW and
+ * ZW must be positive, and YW must be equal to 1.0.
+**/
+ bool has_WhitePoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
+ }
+
SkPdfArray WhitePoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
@@ -528,6 +538,15 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus
+ * value, in the CIE 1931 XYZ space, of the diffuse black point; see "CalRGB
+ * Color Spaces," below, for further discussion. All three of these numbers must
+ * be nonnegative. Default value: [0.0 0.0 0.0].
+**/
+ bool has_BlackPoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
+ }
+
SkPdfArray BlackPoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
@@ -535,6 +554,14 @@ public:
return SkPdfArray();
}
+/** (Optional) A number G defining the gamma for the gray (A) component. G
+ * must be positive and will generally be greater than or equal to 1. Default
+ * value: 1.
+**/
+ bool has_Gamma() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
+ }
+
double Gamma() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCalrgbColorSpaceDictionary_autogen.h b/experimental/PdfViewer/SkPdfCalrgbColorSpaceDictionary_autogen.h
index 285171dd67..d204278dce 100644
--- a/experimental/PdfViewer/SkPdfCalrgbColorSpaceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCalrgbColorSpaceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a CalRGB color space dictionary
class SkPdfCalrgbColorSpaceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCalrgbColorSpaceDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfCalrgbColorSpaceDictionary& operator=(const SkPdfCalrgbColorSpaceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of three numbers [ XW YW ZW ] specifying the tristimulus value,
+ * in the CIE 1931 XYZ space, of the diffuse white point; see below for further discus-
+ * sion. The numbers XW and ZW must be positive, and YW must be equal to 1.0.
+**/
+ bool has_WhitePoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
+ }
+
SkPdfArray WhitePoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus value, in
+ * the CIE 1931 XYZ space, of the diffuse black point; see below for further discussion.
+ * All three of these numbers must be nonnegative. Default value: [0.0 0.0 0.0].
+**/
+ bool has_BlackPoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
+ }
+
SkPdfArray BlackPoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
@@ -535,6 +552,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of three numbers [ GR GG GB ] specifying the gamma for the red,
+ * green, and blue (A, B, and C) components of the color space. Default value:
+ * [1.0 1.0 1.0].
+**/
+ bool has_Gamma() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
+ }
+
SkPdfArray Gamma() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
@@ -542,6 +567,15 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of nine numbers [ XA YA ZA XB YB ZB XC YC ZC ] specifying
+ * the linear interpretation of the decoded A, B, and C components of the color space
+ * with respect to the final XYZ representation. Default value: the identity matrix
+ * [1 0 0 0 1 0 0 0 1].
+**/
+ bool has_Matrix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
+ }
+
SkPdfArray Matrix() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCatalogDictionary_autogen.h b/experimental/PdfViewer/SkPdfCatalogDictionary_autogen.h
index a9b1a3d864..7737435dd3 100644
--- a/experimental/PdfViewer/SkPdfCatalogDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCatalogDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the catalog dictionary
class SkPdfCatalogDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCatalogDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfCatalogDictionary& operator=(const SkPdfCatalogDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must
+ * be Catalog for the catalog dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,22 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The version of the PDF specification to which the
+ * document conforms (for example, 1.4), if later than the version specified
+ * in the file's header (see Section 3.4.1, "File Header"). If the header speci-
+ * fies a later version, or if this entry is absent, the document conforms to
+ * the version specified in the header. This entry enables a PDF producer
+ * application to update the version using an incremental update; see Sec-
+ * tion 3.4.5, "Incremental Updates." (See implementation note 18 in Ap-
+ * pendix H.)
+ * Note: The value of this entry is a name object, not a number, and so must
+ * be preceded by a slash character (/) when written in the PDF file (for ex-
+ * ample, /1.4).
+**/
+ bool has_Version() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
+ }
+
std::string Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
@@ -535,6 +559,13 @@ public:
return "";
}
+/** (Required; must be an indirect reference) The page tree node that is the
+ * root of the document's page tree (see Section 3.6.2, "Page Tree").
+**/
+ bool has_Pages() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
+ }
+
SkPdfDictionary* Pages() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
@@ -542,6 +573,17 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A number tree (see Section 3.8.5, "Number Trees")
+ * defining the page labeling for the document. The keys in this tree are
+ * page indices; the corresponding values are page label dictionaries (see
+ * Section 8.3.1, "Page Labels"). Each page index denotes the first page in a
+ * labeling range to which the specified page label dictionary applies. The
+ * tree must include a value for page index 0.
+**/
+ bool has_PageLabels() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", NULL));
+ }
+
bool isPageLabelsANumber() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return false;
@@ -568,6 +610,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) The document's name dictionary (see Section 3.6.3,
+ * "Name Dictionary").
+**/
+ bool has_Names() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", NULL));
+ }
+
SkPdfDictionary* Names() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", &ret)) return ret;
@@ -575,6 +624,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.1; must be an indirect reference) A dictionary of names
+ * and corresponding destinations (see "Named Destinations" on page
+ * 476).
+**/
+ bool has_Dests() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", NULL));
+ }
+
SkPdfDictionary* Dests() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", &ret)) return ret;
@@ -582,6 +639,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) A viewer preferences dictionary (see Section 8.1,
+ * "Viewer Preferences") specifying the way the document is to be dis-
+ * played on the screen. If this entry is absent, viewer applications should
+ * use their own current user preference settings.
+**/
+ bool has_ViewerPreferences() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", NULL));
+ }
+
SkPdfDictionary* ViewerPreferences() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", &ret)) return ret;
@@ -589,6 +655,20 @@ public:
return NULL;
}
+/** (Optional) A name object specifying the page layout to be used when the
+ * document is opened:
+ * SinglePage Display one page at a time.
+ * OneColumn Display the pages in one column.
+ * TwoColumnLeft Display the pages in two columns, with odd-
+ * numbered pages on the left.
+ * TwoColumnRight Display the pages in two columns, with odd-
+ * numbered pages on the right.
+ * (See implementation note 19 in Appendix H.) Default value: SinglePage.
+**/
+ bool has_PageLayout() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", NULL));
+ }
+
std::string PageLayout() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", &ret)) return ret;
@@ -596,6 +676,20 @@ public:
return "";
}
+/** (Optional) A name object specifying how the document should be dis-
+ * played when opened:
+ * UseNone Neither document outline nor thumbnail im-
+ * ages visible
+ * UseOutlines Document outline visible
+ * UseThumbs Thumbnail images visible
+ * FullScreen Full-screen mode, with no menu bar, window
+ * controls, or any other window visible
+ * Default value: UseNone.
+**/
+ bool has_PageMode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", NULL));
+ }
+
std::string PageMode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", &ret)) return ret;
@@ -603,6 +697,14 @@ public:
return "";
}
+/** (Optional; must be an indirect reference) The outline dictionary that is the
+ * root of the document's outline hierarchy (see Section 8.2.2, "Document
+ * Outline").
+**/
+ bool has_Outlines() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", NULL));
+ }
+
SkPdfDictionary* Outlines() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", &ret)) return ret;
@@ -610,6 +712,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.1; must be an indirect reference) An array of thread
+ * dictionaries representing the document's article threads (see Section
+ * 8.3.2, "Articles").
+**/
+ bool has_Threads() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", NULL));
+ }
+
SkPdfArray Threads() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", &ret)) return ret;
@@ -617,6 +727,17 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.1) A value specifying a destination to be displayed or
+ * an action to be performed when the document is opened. The value is
+ * either an array defining a destination (see Section 8.2.1, "Destinations")
+ * or an action dictionary representing an action (Section 8.5, "Actions"). If
+ * this entry is absent, the document should be opened to the top of the
+ * first page at the default magnification factor.
+**/
+ bool has_OpenAction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", NULL));
+ }
+
bool isOpenActionAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return false;
@@ -643,6 +764,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An additional-actions dictionary defining the actions
+ * to be taken in response to various trigger events affecting the document
+ * as a whole (see "Trigger Events" on page 514). (See also implementation
+ * note 20 in Appendix H.)
+**/
+ bool has_AA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
+ }
+
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
@@ -650,6 +780,14 @@ public:
return NULL;
}
+/** (Optional) A URI dictionary containing document-level information for
+ * URI (uniform resource identifier) actions (see "URI Actions" on page
+ * 523).
+**/
+ bool has_URI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", NULL));
+ }
+
SkPdfDictionary* URI() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", &ret)) return ret;
@@ -657,6 +795,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) The document's interactive form (AcroForm) dic-
+ * tionary (see Section 8.6.1, "Interactive Form Dictionary").
+**/
+ bool has_AcroForm() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", NULL));
+ }
+
SkPdfDictionary* AcroForm() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", &ret)) return ret;
@@ -664,6 +809,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4; must be an indirect reference) A metadata stream
+ * containing metadata for the document (see Section 9.2.2, "Metadata
+ * Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
@@ -671,6 +824,13 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.3) The document's structure tree root dictionary (see
+ * Section 9.6.1, "Structure Hierarchy").
+**/
+ bool has_StructTreeRoot() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", NULL));
+ }
+
SkPdfDictionary* StructTreeRoot() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", &ret)) return ret;
@@ -678,6 +838,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A mark information dictionary containing informa-
+ * tion about the document's usage of Tagged PDF conventions (see Sec-
+ * tion 9.7.1, "Mark Information Dictionary").
+**/
+ bool has_MarkInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", NULL));
+ }
+
SkPdfDictionary* MarkInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", &ret)) return ret;
@@ -685,6 +853,16 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A language identifier specifying the natural language
+ * for all text in the document except where overridden by language speci-
+ * fications for structure elements or marked content (see Section 9.8.1,
+ * "Natural Language Specification"). If this entry is absent, the language is
+ * considered unknown.
+**/
+ bool has_Lang() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
+ }
+
std::string Lang() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
@@ -692,6 +870,14 @@ public:
return "";
}
+/** (Optional; PDF 1.3) A Web Capture information dictionary containing
+ * state information used by the Acrobat Web Capture (AcroSpider) plug-
+ * in extension (see Section 9.9.1, "Web Capture Information Dictionary").
+**/
+ bool has_SpiderInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", NULL));
+ }
+
SkPdfDictionary* SpiderInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", &ret)) return ret;
@@ -699,6 +885,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An array of output intent dictionaries describing the
+ * color characteristics of output devices on which the document might be
+ * rendered (see "Output Intents" on page 684).
+**/
+ bool has_OutputIntents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", NULL));
+ }
+
SkPdfArray OutputIntents() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCcittfaxdecodeFilterDictionary_autogen.h b/experimental/PdfViewer/SkPdfCcittfaxdecodeFilterDictionary_autogen.h
index f15c416bd3..b5f9e11da3 100644
--- a/experimental/PdfViewer/SkPdfCcittfaxdecodeFilterDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCcittfaxdecodeFilterDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Optional parameters for the CCITTFaxDecode filter
class SkPdfCcittfaxdecodeFilterDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCcittfaxdecodeFilterDictionary_SkPdfObjectType;}
@@ -521,6 +522,20 @@ public:
SkPdfCcittfaxdecodeFilterDictionary& operator=(const SkPdfCcittfaxdecodeFilterDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** ()A code identifying the encoding scheme used:
+ * <0 Pure two-dimensional encoding (Group 4)
+ * 0 Pure one-dimensional encoding (Group 3, 1-D)
+ * >0 Mixed one- and two-dimensional encoding (Group 3,
+ * 2-D), in which a line encoded one-dimensionally can be
+ * followed by at most K - 1 lines encoded two-dimensionally
+ * The filter distinguishes among negative, zero, and positive values of
+ * K to determine how to interpret the encoded data; however, it does
+ * not distinguish between different positive K values. Default value: 0.
+**/
+ bool has_K() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
+ }
+
long K() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return ret;
@@ -528,6 +543,15 @@ public:
return 0;
}
+/** ()A flag indicating whether end-of-line bit patterns are required to be
+ * present in the encoding. The CCITTFaxDecode filter always accepts
+ * end-of-line bit patterns, but requires them only if EndOfLine is true.
+ * Default value: false.
+**/
+ bool has_EndOfLine() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", NULL));
+ }
+
bool EndOfLine() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", &ret)) return ret;
@@ -535,6 +559,16 @@ public:
return false;
}
+/** ()A flag indicating whether the filter expects extra 0 bits before each
+ * encoded line so that the line begins on a byte boundary. If true, the
+ * filter skips over encoded bits to begin decoding each line at a byte
+ * boundary. If false, the filter does not expect extra bits in the encod-
+ * ed representation. Default value: false.
+**/
+ bool has_EncodedByteAlign() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", NULL));
+ }
+
bool EncodedByteAlign() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", &ret)) return ret;
@@ -542,6 +576,15 @@ public:
return false;
}
+/** ()The width of the image in pixels. If the value is not a multiple of 8,
+ * the filter adjusts the width of the unencoded image to the next mul-
+ * tiple of 8, so that each line starts on a byte boundary. Default value:
+ * 1728.
+**/
+ bool has_Columns() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", NULL));
+ }
+
long Columns() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", &ret)) return ret;
@@ -549,6 +592,15 @@ public:
return 0;
}
+/** ()The height of the image in scan lines. If the value is 0 or absent, the
+ * image's height is not predetermined, and the encoded data must be
+ * terminated by an end-of-block bit pattern or by the end of the fil-
+ * ter's data. Default value: 0.
+**/
+ bool has_Rows() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", NULL));
+ }
+
long Rows() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", &ret)) return ret;
@@ -556,6 +608,18 @@ public:
return 0;
}
+/** ()A flag indicating whether the filter expects the encoded data to be
+ * terminated by an end-of-block pattern, overriding the Rows pa-
+ * rameter. If false, the filter stops when it has decoded the number of
+ * lines indicated by Rows or when its data has been exhausted, which-
+ * ever occurs first. The end-of-block pattern is the CCITT end-of-
+ * facsimile-block (EOFB) or return-to-control (RTC) appropriate for
+ * the K parameter. Default value: true.
+**/
+ bool has_EndOfBlock() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", NULL));
+ }
+
bool EndOfBlock() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", &ret)) return ret;
@@ -563,6 +627,14 @@ public:
return false;
}
+/** ()A flag indicating whether 1 bits are to be interpreted as black pixels
+ * and 0 bits as white pixels, the reverse of the normal PDF convention
+ * for image data. Default value: false.
+**/
+ bool has_BlackIs1() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", NULL));
+ }
+
bool BlackIs1() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", &ret)) return ret;
@@ -570,6 +642,18 @@ public:
return false;
}
+/** ()The number of damaged rows of data to be tolerated before an
+ * error occurs. This entry applies only if EndOfLine is true and K is
+ * nonnegative. Tolerating a damaged row means locating its end in
+ * the encoded data by searching for an EndOfLine pattern and then
+ * substituting decoded data from the previous row if the previous
+ * row was not damaged, or a white scan line if the previous row was
+ * also damaged. Default value: 0.
+**/
+ bool has_DamagedRowsBeforeError() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", NULL));
+ }
+
long DamagedRowsBeforeError() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfCheckboxFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfCheckboxFieldDictionary_autogen.h
index 8db794b163..2902e4744e 100644
--- a/experimental/PdfViewer/SkPdfCheckboxFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfCheckboxFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry specific to a checkbox field
class SkPdfCheckboxFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kCheckboxFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfCheckboxFieldDictionary& operator=(const SkPdfCheckboxFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; inheritable; PDF 1.4) A text string to be used in place of the V entry for the
+ * value of the field.
+**/
+ bool has_Opt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
+ }
+
std::string Opt() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h
index db22be5a1b..db81967655 100644
--- a/experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfChoiceFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a choice field
class SkPdfChoiceFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kChoiceFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfChoiceFieldDictionary& operator=(const SkPdfChoiceFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required; inheritable) An array of options to be presented to the user. Each element of
+ * the array is either a text string representing one of the available options or a two-element
+ * array consisting of a text string together with a default appearance string for construct-
+ * ing the item's appearance dynamically at viewing time (see "Variable Text" on page 533;
+ * see also implementation note 85 in Appendix H).
+**/
+ bool has_Opt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
+ }
+
SkPdfArray Opt() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
@@ -528,6 +539,13 @@ public:
return SkPdfArray();
}
+/** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
+ * of the first option visible in the list).
+**/
+ bool has_TI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
+ }
+
long TI() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &ret)) return ret;
@@ -535,6 +553,18 @@ public:
return 0;
}
+/** (Sometimes required, otherwise optional; inheritable; PDF 1.4) For choice fields that allow
+ * multiple selection (MultiSelect flag set), an array of integers, sorted in ascending order,
+ * representing the zero-based indices in the Opt array of the currently selected option
+ * items. This entry is required when two or more elements in the Opt array have different
+ * names but the same export value, or when the value of the choice field is an array; in
+ * other cases, it is permitted but not required. If the items identified by this entry differ
+ * from those in the V entry of the field dictionary (see below), the V entry takes precedence.
+**/
+ bool has_I() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
+ }
+
SkPdfArray I() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfComponentsWithMetadataDictionary_autogen.h b/experimental/PdfViewer/SkPdfComponentsWithMetadataDictionary_autogen.h
index f433cde7e0..8c9122f074 100644
--- a/experimental/PdfViewer/SkPdfComponentsWithMetadataDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfComponentsWithMetadataDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry for components having metadata
class SkPdfComponentsWithMetadataDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kComponentsWithMetadataDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfComponentsWithMetadataDictionary& operator=(const SkPdfComponentsWithMetadataDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the component.
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfDctdecodeFilterDictionary_autogen.h b/experimental/PdfViewer/SkPdfDctdecodeFilterDictionary_autogen.h
index f444ad6f75..9cdb5bccb7 100644
--- a/experimental/PdfViewer/SkPdfDctdecodeFilterDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfDctdecodeFilterDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Optional parameter for the DCTDecode filter
class SkPdfDctdecodeFilterDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kDctdecodeFilterDictionary_SkPdfObjectType;}
@@ -521,6 +522,29 @@ public:
SkPdfDctdecodeFilterDictionary& operator=(const SkPdfDctdecodeFilterDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** ()A code specifying the transformation to be performed on the sample values:
+ * 0 No transformation.
+ * 1 If the image has three color components, transform RGB values to
+ * YUV before encoding and from YUV to RGB after decoding. If the
+ * image has four components, transform CMYK values to YUVK be-
+ * fore encoding and from YUVK to CMYK after decoding. This option
+ * is ignored if the image has one or two color components.
+ * Note: The RGB and YUV used here have nothing to do with the color spaces de-
+ * fined as part of the Adobe imaging model. The purpose of converting from RGB
+ * to YUV is to separate luminance and chrominance information (see below).
+ * The default value of ColorTransform is 1 if the image has three components
+ * and 0 otherwise. In other words, conversion between RGB and YUV is per-
+ * formed for all three-component images unless explicitly disabled by setting
+ * ColorTransform to 0. Additionally, the encoding algorithm inserts an Adobe-
+ * defined marker code in the encoded data indicating the ColorTransform value
+ * used. If present, this marker code overrides the ColorTransform value given to
+ * DCTDecode. Thus it is necessary to specify ColorTransform only when decod-
+ * ing data that does not contain the Adobe-defined marker code.
+**/
+ bool has_ColorTransform() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", NULL));
+ }
+
long ColorTransform() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfDeviceNColorSpaceDictionary_autogen.h b/experimental/PdfViewer/SkPdfDeviceNColorSpaceDictionary_autogen.h
index bf2d3dc33e..8234f81ff2 100644
--- a/experimental/PdfViewer/SkPdfDeviceNColorSpaceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfDeviceNColorSpaceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry in a DeviceN color space attributes dictionary
class SkPdfDeviceNColorSpaceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kDeviceNColorSpaceDictionary_SkPdfObjectType;}
@@ -521,6 +522,23 @@ public:
SkPdfDeviceNColorSpaceDictionary& operator=(const SkPdfDeviceNColorSpaceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A dictionary describing the individual colorants used in the DeviceN
+ * color space. For each entry in this dictionary, the key is a colorant name and the
+ * value is an array defining a Separation color space for that colorant (see "Separa-
+ * tion Color Spaces" on page 201). The key must match the colorant name given in
+ * that color space. The dictionary need not list all colorants used in the DeviceN
+ * color space and may list additional colorants.
+ * This dictionary has no effect on the operation of the DeviceN color space itself or
+ * the appearance that it produces. However, it provides information about the indi-
+ * vidual colorants that may be useful to some applications. In particular, the alter-
+ * nate color space and tint transformation function of a Separation color space
+ * describe the appearance of that colorant alone, whereas those of a DeviceN color
+ * space describe only the appearance of its colorants in combination.
+**/
+ bool has_Colorants() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", NULL));
+ }
+
SkPdfDictionary* Colorants() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfDocumentCatalogActionsDictionary_autogen.h b/experimental/PdfViewer/SkPdfDocumentCatalogActionsDictionary_autogen.h
index 0a02f88946..0cd2734edb 100644
--- a/experimental/PdfViewer/SkPdfDocumentCatalogActionsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfDocumentCatalogActionsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the document catalog's additional-actions dictionary
class SkPdfDocumentCatalogActionsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kDocumentCatalogActionsDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfDocumentCatalogActionsDictionary& operator=(const SkPdfDocumentCatalogActionsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.4) A JavaScript action to be performed before closing a document.
+ * (The name DC stands for "document close.")
+**/
+ bool has_DC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", NULL));
+ }
+
SkPdfDictionary* DC() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A JavaScript action to be performed before saving a document.
+ * (The name WS stands for "will save.")
+**/
+ bool has_WS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", NULL));
+ }
+
SkPdfDictionary* WS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A JavaScript action to be performed after saving a document. (The
+ * name DS stands for "did save.")
+**/
+ bool has_DS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", NULL));
+ }
+
SkPdfDictionary* DS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", &ret)) return ret;
@@ -542,6 +564,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A JavaScript action to be performed before printing a document.
+ * (The name WP stands for "will print.")
+**/
+ bool has_WP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", NULL));
+ }
+
SkPdfDictionary* WP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", &ret)) return ret;
@@ -549,6 +578,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A JavaScript action to be performed after printing a document.
+ * (The name DP stands for "did print.")
+**/
+ bool has_DP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", NULL));
+ }
+
SkPdfDictionary* DP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfDocumentInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfDocumentInformationDictionary_autogen.h
index c9cd146bbf..71c81fae1c 100644
--- a/experimental/PdfViewer/SkPdfDocumentInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfDocumentInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the document information dictionary
class SkPdfDocumentInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kDocumentInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfDocumentInformationDictionary& operator=(const SkPdfDocumentInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.1) The document's title.
+**/
+ bool has_Title() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", NULL));
+ }
+
std::string Title() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", &ret)) return ret;
@@ -528,6 +535,12 @@ public:
return "";
}
+/** (Optional) The name of the person who created the document.
+**/
+ bool has_Author() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author", "", NULL));
+ }
+
std::string Author() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author", "", &ret)) return ret;
@@ -535,6 +548,12 @@ public:
return "";
}
+/** (Optional; PDF 1.1) The subject of the document.
+**/
+ bool has_Subject() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject", "", NULL));
+ }
+
std::string Subject() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject", "", &ret)) return ret;
@@ -542,6 +561,12 @@ public:
return "";
}
+/** (Optional; PDF 1.1) Keywords associated with the document.
+**/
+ bool has_Keywords() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords", "", NULL));
+ }
+
std::string Keywords() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords", "", &ret)) return ret;
@@ -549,6 +574,14 @@ public:
return "";
}
+/** (Optional) If the document was converted to PDF from another format, the
+ * name of the application (for example, Adobe FrameMaker(R)) that created the
+ * original document from which it was converted.
+**/
+ bool has_Creator() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", NULL));
+ }
+
std::string Creator() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", &ret)) return ret;
@@ -556,6 +589,14 @@ public:
return "";
}
+/** (Optional) If the document was converted to PDF from another format, the
+ * name of the application (for example, Acrobat Distiller) that converted it to
+ * PDF.
+**/
+ bool has_Producer() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", NULL));
+ }
+
std::string Producer() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", &ret)) return ret;
@@ -563,6 +604,13 @@ public:
return "";
}
+/** (Optional) The date and time the document was created, in human-readable
+ * form (see Section 3.8.2, "Dates").
+**/
+ bool has_CreationDate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
+ }
+
SkPdfDate CreationDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", &ret)) return ret;
@@ -570,6 +618,13 @@ public:
return SkPdfDate();
}
+/** (Optional; PDF 1.1) The date and time the document was most recently
+ * modified, in human-readable form (see Section 3.8.2, "Dates").
+**/
+ bool has_ModDate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
+ }
+
SkPdfDate ModDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", &ret)) return ret;
@@ -577,6 +632,27 @@ public:
return SkPdfDate();
}
+/** (Optional; PDF 1.3) A name object indicating whether the document has
+ * been modified to include trapping information (see Section 9.10.5, "Trap-
+ * ping Support"):
+ * True The document has been fully trapped; no further trapping is
+ * needed. (Note that this is the name True, not the boolean
+ * value true.)
+ * False The document has not yet been trapped; any desired trap-
+ * ping must still be done. (Note that this is the name False, not
+ * the boolean value false.)
+ * Unknown Either it is unknown whether the document has been
+ * trapped or it has been partly but not yet fully trapped; some
+ * additional trapping may still be needed.
+ * Default value: Unknown.
+ * The value of this entry may be set automatically by the software creating the
+ * document's trapping information or may be known only to a human opera-
+ * tor and entered manually.
+**/
+ bool has_Trapped() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", NULL));
+ }
+
std::string Trapped() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEmbeddedFileParameterDictionary_autogen.h b/experimental/PdfViewer/SkPdfEmbeddedFileParameterDictionary_autogen.h
index 58202bee9c..ee48af86d5 100644
--- a/experimental/PdfViewer/SkPdfEmbeddedFileParameterDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEmbeddedFileParameterDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an embedded file parameter dictionary
class SkPdfEmbeddedFileParameterDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEmbeddedFileParameterDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfEmbeddedFileParameterDictionary& operator=(const SkPdfEmbeddedFileParameterDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The size of the embedded file, in bytes.
+**/
+ bool has_Size() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
+ }
+
long Size() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
@@ -528,6 +535,12 @@ public:
return 0;
}
+/** (Optional) The date and time when the embedded file was created.
+**/
+ bool has_CreationDate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
+ }
+
SkPdfDate CreationDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", &ret)) return ret;
@@ -535,6 +548,12 @@ public:
return SkPdfDate();
}
+/** (Optional) The date and time when the embedded file was last modified.
+**/
+ bool has_ModDate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
+ }
+
SkPdfDate ModDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", &ret)) return ret;
@@ -542,6 +561,13 @@ public:
return SkPdfDate();
}
+/** (Optional) A subdictionary containing additional information specific to
+ * Mac OS files (see Table 3.35).
+**/
+ bool has_Mac() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
+ }
+
SkPdfDictionary* Mac() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
@@ -549,6 +575,16 @@ public:
return NULL;
}
+/** (Optional) A 16-byte string that is the checksum of the bytes of the uncom-
+ * pressed embedded file. The checksum is calculated by applying the standard
+ * MD5 message-digest algorithm (described in Internet RFC 1321, The MD5
+ * Message-Digest Algorithm; see the Bibliography) to the bytes of the embedded
+ * file stream.
+**/
+ bool has_CheckSum() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", NULL));
+ }
+
std::string CheckSum() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEmbeddedFileStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfEmbeddedFileStreamDictionary_autogen.h
index 6682e10062..1de81c8b46 100644
--- a/experimental/PdfViewer/SkPdfEmbeddedFileStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEmbeddedFileStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries in an embedded file stream dictionary
class SkPdfEmbeddedFileStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEmbeddedFileStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfEmbeddedFileStreamDictionary& operator=(const SkPdfEmbeddedFileStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be EmbeddedFile for an embedded file stream.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,18 @@ public:
return "";
}
+/** (Optional) The subtype of the embedded file. The value of this entry must be
+ * a first-class name, as defined in Appendix E. Names without a registered pre-
+ * fix must conform to the MIME media type names defined in Internet RFC
+ * 2046, Multipurpose Internet Mail Extensions (MIME), Part Two: Media Types
+ * (see the Bibliography), with the provision that characters not allowed in
+ * names must use the 2-character hexadecimal code format described in Sec-
+ * tion 3.2.4, "Name Objects."
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -535,6 +555,13 @@ public:
return "";
}
+/** (Optional) An embedded file parameter dictionary containing additional, file-
+ * specific information (see Table 3.34).
+**/
+ bool has_Params() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", NULL));
+ }
+
SkPdfDictionary* Params() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEmbeddedFontStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfEmbeddedFontStreamDictionary_autogen.h
index 65eec117df..f131d8fb78 100644
--- a/experimental/PdfViewer/SkPdfEmbeddedFontStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEmbeddedFontStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries in an embedded font stream dictionary
class SkPdfEmbeddedFontStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEmbeddedFontStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfEmbeddedFontStreamDictionary& operator=(const SkPdfEmbeddedFontStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required for Type 1 and TrueType fonts) The length in bytes of the clear-text portion
+ * of the Type 1 font program (see below), or the entire TrueType font program, after it
+ * has been decoded using the filters specified by the stream's Filter entry, if any.
+**/
+ bool has_Length1() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", NULL));
+ }
+
long Length1() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return 0;
}
+/** (Required for Type 1 fonts) The length in bytes of the encrypted portion of the Type 1
+ * font program (see below) after it has been decoded using the filters specified by the
+ * stream's Filter entry.
+**/
+ bool has_Length2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", NULL));
+ }
+
long Length2() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", &ret)) return ret;
@@ -535,6 +552,15 @@ public:
return 0;
}
+/** (Required for Type 1 fonts) The length in bytes of the fixed-content portion of the
+ * Type 1 font program (see below), after it has been decoded using the filters specified
+ * by the stream's Filter entry. If Length3 is 0, it indicates that the 512 zeros and clearto-
+ * mark have not been included in the FontFile font program and must be added.
+**/
+ bool has_Length3() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", NULL));
+ }
+
long Length3() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", &ret)) return ret;
@@ -542,6 +568,15 @@ public:
return 0;
}
+/** (Required if referenced from FontFile3; PDF 1.2) A name specifying the format of the
+ * embedded font program. The name must be Type1C for Type 1 compact fonts or CID-
+ * FontType0C for Type 0 compact CIDFonts. When additional font formats are added
+ * to PDF, more values will be defined for Subtype.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -549,6 +584,13 @@ public:
return "";
}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the embedded font
+ * program (see Section 9.2.2, "Metadata Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEncodingDictionary_autogen.h b/experimental/PdfViewer/SkPdfEncodingDictionary_autogen.h
index 0177d1a851..86b295ddc1 100644
--- a/experimental/PdfViewer/SkPdfEncodingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEncodingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an encoding dictionary
class SkPdfEncodingDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEncodingDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfEncodingDictionary& operator=(const SkPdfEncodingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must
+ * be Encoding for an encoding dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,21 @@ public:
return "";
}
+/** (Optional) The base encoding-that is, the encoding from which the Differences
+ * entry (if present) describes differences-specified as the name of a predefined
+ * encoding MacRomanEncoding, MacExpertEncoding, or WinAnsiEncoding (see
+ * Appendix D).
+ * If this entry is absent, the Differences entry describes differences from an im-
+ * plicit base encoding. For a font program that is embedded in the PDF file, the
+ * implicit base encoding is the font program's built-in encoding, as described
+ * above and further elaborated in the sections on specific font types below. Other-
+ * wise, for a nonsymbolic font, it is StandardEncoding, and for a symbolic font, it
+ * is the font's built-in encoding.
+**/
+ bool has_BaseEncoding() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", NULL));
+ }
+
std::string BaseEncoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", &ret)) return ret;
@@ -535,6 +558,14 @@ public:
return "";
}
+/** (Optional; not recommended with TrueType fonts) An array describing the differ-
+ * ences from the encoding specified by BaseEncoding or, if BaseEncoding is ab-
+ * sent, from an implicit base encoding. The Differences array is described above.
+**/
+ bool has_Differences() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
+ }
+
SkPdfArray Differences() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h
index 8fbd252764..d87123b7ec 100644
--- a/experimental/PdfViewer/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry in an embedded file stream dictionary for an encrypted FDF file
class SkPdfEncryptedEmbeddedFileStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEncryptedEmbeddedFileStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfEncryptedEmbeddedFileStreamDictionary& operator=(const SkPdfEncryptedEmbeddedFileStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required if the FDF file is encrypted; PDF 1.4) The revision number of the
+ * FDF encryption algorithm used to encrypt the file. The only valid value
+ * defined at the time of publication is 1.
+**/
+ bool has_EncryptionRevision() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", NULL));
+ }
+
long EncryptionRevision() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfEncryptionCommonDictionary_autogen.h b/experimental/PdfViewer/SkPdfEncryptionCommonDictionary_autogen.h
index 997bd668f5..eefdc397bb 100644
--- a/experimental/PdfViewer/SkPdfEncryptionCommonDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfEncryptionCommonDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all encryption dictionaries
class SkPdfEncryptionCommonDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kEncryptionCommonDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfEncryptionCommonDictionary& operator=(const SkPdfEncryptionCommonDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The name of the security handler for this document; see below. Default value:
+ * Standard, for the built-in security handler. (Names for other security handlers can be
+ * registered using the procedure described in Appendix E.)
+**/
+ bool has_Filter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
+ }
+
std::string Filter() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
@@ -528,6 +537,23 @@ public:
return "";
}
+/** (Optional but strongly recommended) A code specifying the algorithm to be used in en-
+ * crypting and decrypting the document:
+ * 0 An algorithm that is undocumented and no longer supported, and whose use is
+ * strongly discouraged.
+ * 1 Algorithm 3.1 on page 73, with an encryption key length of 40 bits; see below.
+ * 2 (PDF 1.4) Algorithm 3.1 on page 73, but allowing encryption key lengths greater
+ * than 40 bits.
+ * 3 (PDF 1.4) An unpublished algorithm allowing encryption key lengths ranging
+ * from 40 to 128 bits. (This algorithm is unpublished as an export requirement of
+ * the U.S. Department of Commerce.)
+ * The default value if this entry is omitted is 0, but a value of 1 or greater is strongly rec-
+ * ommended. (See implementation note 15 in Appendix H.)
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
double V() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -535,6 +561,13 @@ public:
return 0;
}
+/** (Optional; PDF 1.4; only if V is 2 or 3) The length of the encryption key, in bits. The value
+ * must be a multiple of 8, in the range 40 to 128. Default value: 40.
+**/
+ bool has_Length() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", NULL));
+ }
+
long Length() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFCatalogDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFCatalogDictionary_autogen.h
index b46859dff2..4f793a25f7 100644
--- a/experimental/PdfViewer/SkPdfFDFCatalogDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFCatalogDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the FDF catalog dictionary
class SkPdfFDFCatalogDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFCatalogDictionary_SkPdfObjectType;}
@@ -521,6 +522,19 @@ public:
SkPdfFDFCatalogDictionary& operator=(const SkPdfFDFCatalogDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.4) The version of the PDF specification to which
+ * this FDF file conforms (for example, 1.4), if later than the version
+ * specified in the file's header (see "FDF Header" on page 559). If the
+ * header specifies a later version, or if this entry is absent, the docu-
+ * ment conforms to the version specified in the header.
+ * Note: The value of this entry is a name object, not a number, and so
+ * must be preceded by a slash character (/) when written in the FDF file
+ * (for example, /1.4).
+**/
+ bool has_Version() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
+ }
+
std::string Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
@@ -528,6 +542,12 @@ public:
return "";
}
+/** (Required) The FDF dictionary for this file (see Table 8.69).
+**/
+ bool has_FDF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF", "", NULL));
+ }
+
SkPdfDictionary* FDF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFDictionary_autogen.h
index 818889cde4..680d467fbe 100644
--- a/experimental/PdfViewer/SkPdfFDFDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the FDF dictionary
class SkPdfFDFDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFDFDictionary& operator=(const SkPdfFDFDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The source file or target file: the PDF document file that
+ * this FDF file was exported from or is intended to be imported into.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return SkPdfFileSpec();
}
+/** (Optional) An array of two strings constituting a file identifier (see
+ * Section 9.3, "File Identifiers") for the source or target file designated
+ * by F, taken from the ID entry in the file's trailer dictionary (see Sec-
+ * tion 3.4.4, "File Trailer").
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
SkPdfArray ID() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -535,6 +552,15 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of FDF field dictionaries (see "FDF Fields" on
+ * page 564) describing the root fields (those with no ancestors in
+ * the field hierarchy) to be exported or imported. This entry and
+ * the Pages entry may not both be present.
+**/
+ bool has_Fields() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
+ }
+
SkPdfArray Fields() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
@@ -542,6 +568,16 @@ public:
return SkPdfArray();
}
+/** (Optional) A status string to be displayed indicating the result of an
+ * action, typically a submit-form action (see "Submit-Form Actions"
+ * on page 550). The string is encoded with PDFDocEncoding. (See
+ * implementation note 91 in Appendix H.) This entry and the Pages
+ * entry may not both be present.
+**/
+ bool has_Status() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", NULL));
+ }
+
std::string Status() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", &ret)) return ret;
@@ -549,6 +585,15 @@ public:
return "";
}
+/** (Optional; PDF 1.3) An array of FDF page dictionaries (see "FDF
+ * Pages" on page 566) describing new pages to be added to a PDF
+ * target document. The Fields and Status entries may not be present
+ * together with this entry.
+**/
+ bool has_Pages() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
+ }
+
SkPdfArray Pages() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
@@ -556,6 +601,16 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.3) The encoding to be used for any FDF field
+ * value or option (V or Opt in the field dictionary; see Table 8.72 on
+ * page 564) that is a string and does not begin with the Unicode pre-
+ * fix U+FEFF. (See implementation note 92 in Appendix H.) Default
+ * value: PDFDocEncoding.
+**/
+ bool has_Encoding() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
+ }
+
std::string Encoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return ret;
@@ -563,6 +618,15 @@ public:
return "";
}
+/** (Optional; PDF 1.3) An array of FDF annotation dictionaries (see
+ * "FDF Annotation Dictionaries" on page 568). The array can in-
+ * clude annotations of any of the standard types listed in Table 8.14
+ * on page 499 except Link, Movie, Widget, PrinterMark, and TrapNet.
+**/
+ bool has_Annots() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", NULL));
+ }
+
SkPdfArray Annots() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", &ret)) return ret;
@@ -570,6 +634,29 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) A stream containing all the bytes in all incre-
+ * mental updates made to the underlying PDF document since it was
+ * opened (see Section 3.4.5, "Incremental Updates"). If a submit-
+ * form action submitting the document to a remote server in FDF
+ * format has its IncludeAppendSaves flag set (see "Submit-Form
+ * Actions" on page 550), the contents of this stream are included in
+ * the submission. This allows any digital signatures (see "Signature
+ * Fields" on page 547) to be transmitted to the server. An incremental
+ * update is automatically performed just before the submission takes
+ * place, in order to capture all changes made to the document. Note
+ * that the submission always includes the full set of incremental up-
+ * dates back to the time the document was first opened, even if some
+ * of them may already have been included in intervening submissions.
+ * Note: Although a Fields or Annots entry (or both) may be present
+ * along with Differences, there is no guarantee that their contents will be
+ * consistent with it. In particular, if Differences contains a digital signa-
+ * ture, only the values of the form fields given in the Differences stream
+ * can be considered trustworthy under that signature.
+**/
+ bool has_Differences() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
+ }
+
SkPdfStream Differences() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
@@ -577,6 +664,14 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.4) The name of a browser frame in which the un-
+ * derlying PDF document is to be opened. This mimics the behavior
+ * of the target attribute in HTML <href> tags.
+**/
+ bool has_Target() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", NULL));
+ }
+
std::string Target() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", &ret)) return ret;
@@ -584,6 +679,14 @@ public:
return "";
}
+/** (Optional; PDF 1.4) An array of file specifications (see Section 3.10,
+ * "File Specifications") representing other FDF files embedded with-
+ * in this one (Section 3.10.3, "Embedded File Streams").
+**/
+ bool has_EmbeddedFDFs() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", NULL));
+ }
+
SkPdfArray EmbeddedFDFs() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", &ret)) return ret;
@@ -591,6 +694,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) A JavaScript dictionary (see Table 8.71) defin-
+ * ing document-level JavaScript scripts.
+**/
+ bool has_JavaScript() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", NULL));
+ }
+
SkPdfDictionary* JavaScript() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h
index b4c0304736..9daada82e1 100644
--- a/experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an FDF field dictionary
class SkPdfFDFFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfFDFFieldDictionary& operator=(const SkPdfFDFFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) An array containing the immediate children of this field.
+ * Note: Unlike the children of fields in a PDF file, which must be specified as indirect
+ * object references, those of an FDF field may be either direct or indirect objects.
+**/
+ bool has_Kids() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
+ }
+
SkPdfArray Kids() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
@@ -528,6 +537,12 @@ public:
return SkPdfArray();
}
+/** (Required) The partial field name (see "Field Names" on page 532).
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return "";
}
+/** (Optional) The field's value, whose format varies depending on the field type; see
+ * the descriptions of individual field types in Section 8.6.3 for further information.
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
SkPdfObject* V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -542,6 +564,16 @@ public:
return NULL;
}
+/** (Optional) A set of flags specifying various characteristics of the field (see Tables
+ * 8.50 on page 532, 8.53 on page 538, 8.56 on page 543, and 8.58 on page 546). When
+ * imported into an interactive form, the value of this entry replaces that of the Ff
+ * entry in the form's corresponding field dictionary. If this field is present, the SetFf
+ * and ClrFf entries, if any, are ignored.
+**/
+ bool has_Ff() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
+ }
+
long Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
@@ -549,6 +581,15 @@ public:
return 0;
}
+/** (Optional) A set of flags to be set (turned on) in the Ff entry of the form's cor-
+ * responding field dictionary. Bits equal to 1 in SetFf cause the corresponding bits in
+ * Ff to be set to 1. This entry is ignored if an Ff entry is present in the FDF field
+ * dictionary.
+**/
+ bool has_SetFf() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", NULL));
+ }
+
long SetFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", &ret)) return ret;
@@ -556,6 +597,16 @@ public:
return 0;
}
+/** (Optional) A set of flags to be cleared (turned off) in the Ff entry of the form's cor-
+ * responding field dictionary. Bits equal to 1 in ClrFf cause the corresponding bits in
+ * Ff to be set to 0. If a SetFf entry is also present in the FDF field dictionary, it is
+ * applied before this entry. This entry is ignored if an Ff entry is present in the FDF
+ * field dictionary.
+**/
+ bool has_ClrFf() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", NULL));
+ }
+
long ClrFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", &ret)) return ret;
@@ -563,6 +614,16 @@ public:
return 0;
}
+/** (Optional) A set of flags specifying various characteristics of the field's widget anno-
+ * tation (see Section 8.4.2, "Annotation Flags"). When imported into an interactive
+ * form, the value of this entry replaces that of the F entry in the form's corresponding
+ * annotation dictionary. If this field is present, the SetF and ClrF entries, if any, are
+ * ignored.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -570,6 +631,15 @@ public:
return 0;
}
+/** (Optional) A set of flags to be set (turned on) in the F entry of the form's corre-
+ * sponding widget annotation dictionary. Bits equal to 1 in SetF cause the corre-
+ * sponding bits in F to be set to 1. This entry is ignored if an F entry is present in the
+ * FDF field dictionary.
+**/
+ bool has_SetF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", NULL));
+ }
+
long SetF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", &ret)) return ret;
@@ -577,6 +647,16 @@ public:
return 0;
}
+/** (Optional) A set of flags to be cleared (turned off) in the F entry of the form's corre-
+ * sponding widget annotation dictionary. Bits equal to 1 in ClrF cause the corre-
+ * sponding bits in F to be set to 0. If a SetF entry is also present in the FDF field
+ * dictionary, it is applied before this entry. This entry is ignored if an F entry is
+ * present in the FDF field dictionary.
+**/
+ bool has_ClrF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", NULL));
+ }
+
long ClrF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", &ret)) return ret;
@@ -584,6 +664,15 @@ public:
return 0;
}
+/** (Optional) An appearance dictionary specifying the appearance of a pushbutton
+ * field (see "Pushbuttons" on page 539). The appearance dictionary's contents are as
+ * shown in Table 8.13 on page 497, except that the values of the N, R, and D entries
+ * must all be streams.
+**/
+ bool has_AP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
+ }
+
SkPdfDictionary* AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
@@ -591,6 +680,16 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A dictionary holding references to external PDF files contain-
+ * ing the pages to use for the appearances of a pushbutton field. This dictionary is
+ * similar to an appearance dictionary (see Table 8.13 on page 497), except that the
+ * values of the N, R, and D entries must all be named page reference dictionaries
+ * (Table 8.76 on page 568). This entry is ignored if an AP entry is present.
+**/
+ bool has_APRef() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", NULL));
+ }
+
SkPdfDictionary* APRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", &ret)) return ret;
@@ -598,6 +697,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3; button fields only) An icon fit dictionary (see Table 8.73) speci-
+ * fying how to display a button field's icon within the annotation rectangle of its wid-
+ * get annotation.
+**/
+ bool has_IF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
+ }
+
SkPdfDictionary* IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
@@ -605,6 +712,17 @@ public:
return NULL;
}
+/** (Required; choice fields only) An array of options to be presented to the user. Each
+ * element of the array can take either of two forms:
+ * * A text string representing one of the available options
+ * * A two-element array consisting of a text string representing one of the available
+ * options and a default appearance string for constructing the item's appearance
+ * dynamically at viewing time (see "Variable Text" on page 533)
+**/
+ bool has_Opt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
+ }
+
SkPdfArray Opt() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
@@ -612,6 +730,13 @@ public:
return SkPdfArray();
}
+/** (Optional) An action to be performed when this field's widget annotation is activat-
+ * ed (see Section 8.5, "Actions").
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
SkPdfDictionary* A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
@@ -619,6 +744,13 @@ public:
return NULL;
}
+/** (Optional) An additional-actions dictionary defining the field's behavior in re-
+ * sponse to various trigger events (see Section 8.5.2, "Trigger Events").
+**/
+ bool has_AA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
+ }
+
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h
index 2511f969d9..c46deb73dc 100644
--- a/experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFFileAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry for annotation dictionaries in an FDF file
class SkPdfFDFFileAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFFileAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFDFFileAnnotationDictionary& operator=(const SkPdfFDFFileAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required for annotations in FDF files) The ordinal page number on which
+ * this annotation should appear, where page 0 is the first page.
+**/
+ bool has_Page() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", NULL));
+ }
+
long Page() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFNamedPageReferenceDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFNamedPageReferenceDictionary_autogen.h
index b4ba87d718..dab7a307e0 100644
--- a/experimental/PdfViewer/SkPdfFDFNamedPageReferenceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFNamedPageReferenceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an FDF named page reference dictionary
class SkPdfFDFNamedPageReferenceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFNamedPageReferenceDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfFDFNamedPageReferenceDictionary& operator=(const SkPdfFDFNamedPageReferenceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The name of the referenced page.
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -528,6 +535,13 @@ public:
return "";
}
+/** (Optional) The file containing the named page. If this key is absent, it is
+ * assumed that the page resides in the associated PDF file.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFPageDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFPageDictionary_autogen.h
index 33daa802bd..28a197cfee 100644
--- a/experimental/PdfViewer/SkPdfFDFPageDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFPageDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an FDF page dictionary
class SkPdfFDFPageDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFPageDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFDFPageDictionary& operator=(const SkPdfFDFPageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of FDF template dictionaries (see Table 8.75) describing the
+ * named pages that serve as templates on the page.
+**/
+ bool has_Templates() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", NULL));
+ }
+
SkPdfArray Templates() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An FDF page information dictionary containing additional informa-
+ * tion about the page. At the time of publication, no entries have been defined for
+ * this dictionary.
+**/
+ bool has_Info() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
+ }
+
SkPdfDictionary* Info() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFTemplateDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFTemplateDictionary_autogen.h
index 7ba01b3797..10b7d5527d 100644
--- a/experimental/PdfViewer/SkPdfFDFTemplateDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFTemplateDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an FDF template dictionary
class SkPdfFDFTemplateDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFTemplateDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFDFTemplateDictionary& operator=(const SkPdfFDFTemplateDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) A named page reference dictionary (see Table 8.76) specifying the
+ * location of the template.
+**/
+ bool has_TRef() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", NULL));
+ }
+
SkPdfDictionary* TRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return NULL;
}
+/** (Optional) An array of references to FDF field dictionaries (see Table 8.72 on
+ * page 564) describing the root fields to be imported (those with no ancestors in
+ * the field hierarchy).
+**/
+ bool has_Fields() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
+ }
+
SkPdfArray Fields() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
@@ -535,6 +551,14 @@ public:
return SkPdfArray();
}
+/** (Optional) A flag specifying whether fields imported from the template may be
+ * renamed in the event of name conflicts with existing fields; see below for further
+ * discussion. Default value: true.
+**/
+ bool has_Rename() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", NULL));
+ }
+
bool Rename() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFDFTrailerDictionary_autogen.h b/experimental/PdfViewer/SkPdfFDFTrailerDictionary_autogen.h
index 3c29abe8f5..058a5e8e5a 100644
--- a/experimental/PdfViewer/SkPdfFDFTrailerDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFDFTrailerDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry in the FDF trailer dictionary
class SkPdfFDFTrailerDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFDFTrailerDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFDFTrailerDictionary& operator=(const SkPdfFDFTrailerDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required; must be an indirect reference) The catalog object for this FDF file (see
+ * "FDF Catalog," below).
+**/
+ bool has_Root() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", NULL));
+ }
+
SkPdfDictionary* Root() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfFieldDictionary_autogen.h
index 5b8770af11..809cc43d01 100644
--- a/experimental/PdfViewer/SkPdfFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all field dictionaries
class SkPdfFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,22 @@ public:
SkPdfFieldDictionary& operator=(const SkPdfFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required for terminal fields; inheritable) The type of field that this dictionary
+ * describes:
+ * Btn Button (see "Button Fields" on page 538)
+ * Tx Text (see "Text Fields" on page 543)
+ * Ch Choice (see "Choice Fields" on page 545)
+ * Sig (PDF 1.3) Signature (see "Signature Fields" on page 547)
+ * Note: This entry may be present in a nonterminal field (one whose descendants
+ * are themselves fields) in order to provide an inheritable FT value. However, a
+ * nonterminal field does not logically have a type of its own; it is merely a contain-
+ * er for inheritable attributes that are intended for descendant terminal fields of
+ * any type.
+**/
+ bool has_FT() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", NULL));
+ }
+
std::string FT() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &ret)) return ret;
@@ -528,6 +545,15 @@ public:
return "";
}
+/** (Required if this field is the child of another in the field hierarchy; absent other-
+ * wise) The field that is the immediate parent of this one (the field, if any,
+ * whose Kids array includes this field). A field can have at most one parent; that
+ * is, it can be included in the Kids array of at most one other field.
+**/
+ bool has_Parent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
+ }
+
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
@@ -535,6 +561,13 @@ public:
return NULL;
}
+/** (Optional) An array of indirect references to the immediate children of this
+ * field.
+**/
+ bool has_Kids() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
+ }
+
SkPdfArray Kids() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
@@ -542,6 +575,13 @@ public:
return SkPdfArray();
}
+/** (Optional) The partial field name (see "Field Names," below; see also imple-
+ * mentation notes 82 and 83 in Appendix H).
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -549,6 +589,17 @@ public:
return "";
}
+/** (Optional; PDF 1.3) An alternate field name, to be used in place of the actual
+ * field name wherever the field must be identified in the user interface (such as
+ * in error or status messages referring to the field). This text is also useful
+ * when extracting the document's contents in support of accessibility to dis-
+ * abled users or for other purposes (see Section 9.8.2, "Alternate Descrip-
+ * tions").
+**/
+ bool has_TU() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", NULL));
+ }
+
std::string TU() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", &ret)) return ret;
@@ -556,6 +607,13 @@ public:
return "";
}
+/** (Optional; PDF 1.3) The mapping name to be used when exporting inter-
+ * active form field data from the document.
+**/
+ bool has_TM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", NULL));
+ }
+
std::string TM() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", &ret)) return ret;
@@ -563,6 +621,13 @@ public:
return "";
}
+/** (Optional; inheritable) A set of flags specifying various characteristics of the
+ * field (see Table 8.50). Default value: 0.
+**/
+ bool has_Ff() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
+ }
+
long Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
@@ -570,6 +635,14 @@ public:
return 0;
}
+/** (Optional; inheritable) The field's value, whose format varies depending on
+ * the field type; see the descriptions of individual field types for further infor-
+ * mation.
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
SkPdfObject* V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -577,6 +650,14 @@ public:
return NULL;
}
+/** (Optional; inheritable) The default value to which the field reverts when a
+ * reset-form action is executed (see "Reset-Form Actions" on page 554). The
+ * format of this value is the same as that of V.
+**/
+ bool has_DV() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", NULL));
+ }
+
SkPdfObject* DV() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", &ret)) return ret;
@@ -584,6 +665,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An additional-actions dictionary defining the field's
+ * behavior in response to various trigger events (see Section 8.5.2, "Trigger
+ * Events"). This entry has exactly the same meaning as the AA entry in an
+ * annotation dictionary (see Section 8.4.1, "Annotation Dictionaries").
+**/
+ bool has_AA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
+ }
+
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFileAttachmentAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfFileAttachmentAnnotationDictionary_autogen.h
index d484cc3fdf..6e803d75e4 100644
--- a/experimental/PdfViewer/SkPdfFileAttachmentAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFileAttachmentAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a file attachment annotation
class SkPdfFileAttachmentAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFileAttachmentAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFileAttachmentAnnotationDictionary& operator=(const SkPdfFileAttachmentAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be
+ * FileAttachment for a file attachment annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The file associated with this annotation.
+**/
+ bool has_FS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", NULL));
+ }
+
SkPdfFileSpec FS() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", &ret)) return ret;
@@ -535,6 +549,14 @@ public:
return SkPdfFileSpec();
}
+/** (Required) The text to be displayed in the pop-up window when the annota-
+ * tion is opened. Carriage returns may be used to separate the text into para-
+ * graphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -542,6 +564,20 @@ public:
return "";
}
+/** (Optional) The name of an icon to be used in displaying the annotation.
+ * Viewer applications should provide predefined icon appearances for at least
+ * the following standard names:
+ * Graph PushPin
+ * Paperclip Tag
+ * Additional names may be supported as well. Default value: PushPin.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over
+ * the Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance
+ * Streams."
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFileSpecificationDictionary_autogen.h b/experimental/PdfViewer/SkPdfFileSpecificationDictionary_autogen.h
index eb78f5e843..8eb25d6a91 100644
--- a/experimental/PdfViewer/SkPdfFileSpecificationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFileSpecificationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a file specification dictionary
class SkPdfFileSpecificationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFileSpecificationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFileSpecificationDictionary& operator=(const SkPdfFileSpecificationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required if an EF or RF entry is present; recommended always) The type of PDF object
+ * that this dictionary describes; must be Filespec for a file specification dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,17 @@ public:
return "";
}
+/** (Optional) The name of the file system to be used to interpret this file specification. If
+ * this entry is present, all other entries in the dictionary are interpreted by the desig-
+ * nated file system. PDF defines only one standard file system, URL (see Section 3.10.4,
+ * "URL Specifications"); a viewer application or plug-in extension can register a differ-
+ * ent one (see Appendix E). Note that this entry is independent of the F, DOS, Mac, and
+ * Unix entries.
+**/
+ bool has_FS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", NULL));
+ }
+
std::string FS() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", &ret)) return ret;
@@ -535,6 +554,15 @@ public:
return "";
}
+/** (Required if the DOS, Mac, and Unix entries are all absent) A file specification string of
+ * the form described in Section 3.10.1, "File Specification Strings," or (if the file system
+ * is URL) a uniform resource locator, as described in Section 3.10.4, "URL Specifica-
+ * tions."
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
std::string F() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -542,6 +570,13 @@ public:
return "";
}
+/** (Optional) A file specification string (see Section 3.10.1, "File Specification Strings")
+ * representing a DOS file name.
+**/
+ bool has_DOS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DOS", "", NULL));
+ }
+
std::string DOS() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DOS", "", &ret)) return ret;
@@ -549,6 +584,13 @@ public:
return "";
}
+/** (Optional) A file specification string (see Section 3.10.1, "File Specification Strings")
+ * representing a Mac OS file name.
+**/
+ bool has_Mac() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
+ }
+
std::string Mac() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
@@ -556,6 +598,13 @@ public:
return "";
}
+/** (Optional) A file specification string (see Section 3.10.1, "File Specification Strings")
+ * representing a UNIX file name.
+**/
+ bool has_Unix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "", NULL));
+ }
+
std::string Unix() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "", &ret)) return ret;
@@ -563,6 +612,15 @@ public:
return "";
}
+/** (Optional) An array of two strings constituting a file identifier (see Section 9.3, "File
+ * Identifiers") that is also included in the referenced file. The use of this entry improves
+ * a viewer application's chances of finding the intended file and allows it to warn the
+ * user if the file has changed since the link was made.
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
SkPdfArray ID() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -570,6 +628,16 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) A flag indicating whether the file referenced by the file specifica-
+ * tion is volatile (changes frequently with time). If the value is true, viewer applications
+ * should never cache a copy of the file. For example, a movie annotation referencing a
+ * URL to a live video camera could set this flag to true, notifying the application that it
+ * should reacquire the movie each time it is played. Default value: false.
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
bool V() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -577,6 +645,17 @@ public:
return false;
}
+/** (Required if RF is present; PDF 1.3) A dictionary containing a subset of the keys F,
+ * DOS, Mac, and Unix, corresponding to the entries by those names in the file specifica-
+ * tion dictionary. The value of each such key is an embedded file stream (see Section
+ * 3.10.3, "Embedded File Streams") containing the corresponding file. If this entry is
+ * present, the Type entry is required and the file specification dictionary must be indi-
+ * rectly referenced.
+**/
+ bool has_EF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EF", "", NULL));
+ }
+
SkPdfDictionary* EF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EF", "", &ret)) return ret;
@@ -584,6 +663,17 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A dictionary with the same structure as the EF dictionary, which
+ * must also be present. Each key in the RF dictionary must also be present in the EF dic-
+ * tionary. Each value is a related files array (see "Related Files Arrays" on page 125)
+ * identifying files that are related to the corresponding file in the EF dictionary. If this
+ * entry is present, the Type entry is required and the file specification dictionary must
+ * be indirectly referenced.
+**/
+ bool has_RF() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RF", "", NULL));
+ }
+
SkPdfDictionary* RF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RF", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFileTrailerDictionary_autogen.h b/experimental/PdfViewer/SkPdfFileTrailerDictionary_autogen.h
index 1bfc2838ae..460fe78467 100644
--- a/experimental/PdfViewer/SkPdfFileTrailerDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFileTrailerDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the file trailer dictionary
class SkPdfFileTrailerDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFileTrailerDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfFileTrailerDictionary& operator=(const SkPdfFileTrailerDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The total number of entries in the file's cross-reference table, as defined
+ * by the combination of the original section and all update sections. Equivalently, this
+ * value is 1 greater than the highest object number used in the file.
+**/
+ bool has_Size() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
+ }
+
long Size() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
@@ -528,6 +537,13 @@ public:
return 0;
}
+/** (Present only if the file has more than one cross-reference section) The byte offset from
+ * the beginning of the file to the beginning of the previous cross-reference section.
+**/
+ bool has_Prev() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", NULL));
+ }
+
long Prev() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", &ret)) return ret;
@@ -535,6 +551,13 @@ public:
return 0;
}
+/** (Required; must be an indirect reference) The catalog dictionary for the PDF docu-
+ * ment contained in the file (see Section 3.6.1, "Document Catalog").
+**/
+ bool has_Root() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", NULL));
+ }
+
SkPdfDictionary* Root() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", &ret)) return ret;
@@ -542,6 +565,13 @@ public:
return NULL;
}
+/** (Required if document is encrypted; PDF 1.1) The document's encryption dictionary
+ * (see Section 3.5, "Encryption").
+**/
+ bool has_Encrypt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encrypt", "", NULL));
+ }
+
SkPdfDictionary* Encrypt() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encrypt", "", &ret)) return ret;
@@ -549,6 +579,13 @@ public:
return NULL;
}
+/** (Optional; must be an indirect reference) The document's information dictionary
+ * (see Section 9.2.1, "Document Information Dictionary").
+**/
+ bool has_Info() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
+ }
+
SkPdfDictionary* Info() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", &ret)) return ret;
@@ -556,6 +593,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.1) An array of two strings constituting a file identifier (see Section
+ * 9.3, "File Identifiers") for the file.
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
SkPdfArray ID() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFontDescriptorDictionary_autogen.h b/experimental/PdfViewer/SkPdfFontDescriptorDictionary_autogen.h
index 64662b9691..f67241ad13 100644
--- a/experimental/PdfViewer/SkPdfFontDescriptorDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFontDescriptorDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all font descriptors
class SkPdfFontDescriptorDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFontDescriptorDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFontDescriptorDictionary& operator=(const SkPdfFontDescriptorDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * FontDescriptor for a font descriptor.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Required) The PostScript name of the font. This should be the same as the
+ * value of BaseFont in the font or CIDFont dictionary that refers to this font
+ * descriptor.
+**/
+ bool has_FontName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontName", "", NULL));
+ }
+
std::string FontName() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontName", "", &ret)) return ret;
@@ -535,6 +551,13 @@ public:
return "";
}
+/** (Required) A collection of flags defining various characteristics of the font
+ * (see Section 5.7.1, "Font Descriptor Flags").
+**/
+ bool has_Flags() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", NULL));
+ }
+
long Flags() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", &ret)) return ret;
@@ -542,6 +565,15 @@ public:
return 0;
}
+/** (Required) A rectangle (see Section 3.8.3, "Rectangles"), expressed in the
+ * glyph coordinate system, specifying the font bounding box. This is the small-
+ * est rectangle enclosing the shape that would result if all of the glyphs of the
+ * font were placed with their origins coincident and then filled.
+**/
+ bool has_FontBBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontBBox", "", NULL));
+ }
+
SkRect FontBBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontBBox", "", &ret)) return ret;
@@ -549,6 +581,15 @@ public:
return SkRect();
}
+/** (Required) The angle, expressed in degrees counterclockwise from the verti-
+ * cal, of the dominant vertical strokes of the font. (For example, the 9-o'clock
+ * position is 90 degrees, and the 3-o'clock position is '90 degrees.) The value is
+ * negative for fonts that slope to the right, as almost all italic fonts do.
+**/
+ bool has_ItalicAngle() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ItalicAngle", "", NULL));
+ }
+
double ItalicAngle() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ItalicAngle", "", &ret)) return ret;
@@ -556,6 +597,13 @@ public:
return 0;
}
+/** (Required) The maximum height above the baseline reached by glyphs in this
+ * font, excluding the height of glyphs for accented characters.
+**/
+ bool has_Ascent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ascent", "", NULL));
+ }
+
double Ascent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ascent", "", &ret)) return ret;
@@ -563,6 +611,13 @@ public:
return 0;
}
+/** (Required) The maximum depth below the baseline reached by glyphs in this
+ * font. The value is a negative number.
+**/
+ bool has_Descent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Descent", "", NULL));
+ }
+
double Descent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Descent", "", &ret)) return ret;
@@ -570,6 +625,13 @@ public:
return 0;
}
+/** (Optional) The desired spacing between baselines of consecutive lines of text.
+ * Default value: 0.
+**/
+ bool has_Leading() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Leading", "", NULL));
+ }
+
double Leading() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Leading", "", &ret)) return ret;
@@ -577,6 +639,13 @@ public:
return 0;
}
+/** (Required) The vertical coordinate of the top of flat capital letters, measured
+ * from the baseline.
+**/
+ bool has_CapHeight() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CapHeight", "", NULL));
+ }
+
double CapHeight() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CapHeight", "", &ret)) return ret;
@@ -584,6 +653,14 @@ public:
return 0;
}
+/** (Optional) The font's x height: the vertical coordinate of the top of flat non-
+ * ascending lowercase letters (like the letter x), measured from the baseline.
+ * Default value: 0.
+**/
+ bool has_XHeight() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XHeight", "", NULL));
+ }
+
double XHeight() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XHeight", "", &ret)) return ret;
@@ -591,6 +668,13 @@ public:
return 0;
}
+/** (Required) The thickness, measured horizontally, of the dominant vertical
+ * stems of glyphs in the font.
+**/
+ bool has_StemV() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StemV", "", NULL));
+ }
+
double StemV() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StemV", "", &ret)) return ret;
@@ -598,6 +682,13 @@ public:
return 0;
}
+/** (Optional) The thickness, measured invertically, of the dominant horizontal
+ * stems of glyphs in the font. Default value: 0.
+**/
+ bool has_StemH() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StemH", "", NULL));
+ }
+
double StemH() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StemH", "", &ret)) return ret;
@@ -605,6 +696,12 @@ public:
return 0;
}
+/** (Optional) The average width of glyphs in the font. Default value: 0.
+**/
+ bool has_AvgWidth() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AvgWidth", "", NULL));
+ }
+
double AvgWidth() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AvgWidth", "", &ret)) return ret;
@@ -612,6 +709,12 @@ public:
return 0;
}
+/** (Optional) The maximum width of glyphs in the font. Default value: 0.
+**/
+ bool has_MaxWidth() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxWidth", "", NULL));
+ }
+
double MaxWidth() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxWidth", "", &ret)) return ret;
@@ -619,6 +722,15 @@ public:
return 0;
}
+/** (Optional) The width to use for character codes whose widths are not speci-
+ * fied in a font dictionary's Widths array. This has a predictable effect only if all
+ * such codes map to glyphs whose actual widths are the same as the Missing-
+ * Width value. Default value: 0.
+**/
+ bool has_MissingWidth() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MissingWidth", "", NULL));
+ }
+
double MissingWidth() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MissingWidth", "", &ret)) return ret;
@@ -626,6 +738,13 @@ public:
return 0;
}
+/** (Optional) A stream containing a Type 1 font program (see Section 5.8,
+ * "Embedded Font Programs").
+**/
+ bool has_FontFile() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile", "", NULL));
+ }
+
SkPdfStream FontFile() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile", "", &ret)) return ret;
@@ -633,6 +752,13 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.1) A stream containing a TrueType font program (see Sec-
+ * tion 5.8, "Embedded Font Programs").
+**/
+ bool has_FontFile2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile2", "", NULL));
+ }
+
SkPdfStream FontFile2() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile2", "", &ret)) return ret;
@@ -640,6 +766,17 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.2) A stream containing a font program other than Type 1 or
+ * TrueType. The format of the font program is specified by the Subtype entry
+ * in the stream dictionary (see Section 5.8, "Embedded Font Programs," and
+ * implementation note 49 in Appendix H).
+ * At most, only one of the FontFile, FontFile2, and FontFile3 entries may be
+ * present.
+**/
+ bool has_FontFile3() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile3", "", NULL));
+ }
+
SkPdfStream FontFile3() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFile3", "", &ret)) return ret;
@@ -647,6 +784,17 @@ public:
return SkPdfStream();
}
+/** (Optional; meaningful only in Type 1 fonts; PDF 1.1) A string listing the char-
+ * acter names defined in a font subset. The names in this string must be in PDF
+ * syntax-that is, each name preceded by a slash (/). The names can appear in
+ * any order. The name .notdef should be omitted; it is assumed to exist in the
+ * font subset. If this entry is absent, the only indication of a font subset is the
+ * subset tag in the FontName entry (see Section 5.5.3, "Font Subsets").
+**/
+ bool has_CharSet() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharSet", "", NULL));
+ }
+
std::string CharSet() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CharSet", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFormFieldActionsDictionary_autogen.h b/experimental/PdfViewer/SkPdfFormFieldActionsDictionary_autogen.h
index 0b78bf7178..9523052a03 100644
--- a/experimental/PdfViewer/SkPdfFormFieldActionsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFormFieldActionsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a form field's additional-actions dictionary
class SkPdfFormFieldActionsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFormFieldActionsDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfFormFieldActionsDictionary& operator=(const SkPdfFormFieldActionsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.3) A JavaScript action to be performed when the user types a key-
+ * stroke into a text field or combo box or modifies the selection in a scrollable list box.
+ * This allows the keystroke to be checked for validity and rejected or modified.
+**/
+ bool has_K() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
+ }
+
SkPdfDictionary* K() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A JavaScript action to be performed before the field is formatted
+ * to display its current value. This allows the field's value to be modified before format-
+ * ting.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfDictionary* F() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +552,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A JavaScript action to be performed when the field's value is
+ * changed. This allows the new value to be checked for validity. (The name V stands for
+ * "validate.")
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
SkPdfDictionary* V() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -542,6 +567,16 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A JavaScript action to be performed in order to recalculate the
+ * value of this field when that of another field changes. (The name C stands for
+ * "calculate.") The order in which the document's fields are recalculated is defined by the
+ * CO entry in the interactive form dictionary (see Section 8.6.1, "Interactive Form
+ * Dictionary").
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfDictionary* C() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFreeTextAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfFreeTextAnnotationDictionary_autogen.h
index d91fddb414..8b2a7dbc76 100644
--- a/experimental/PdfViewer/SkPdfFreeTextAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFreeTextAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a free text annotation
class SkPdfFreeTextAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFreeTextAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfFreeTextAnnotationDictionary& operator=(const SkPdfFreeTextAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be
+ * FreeText for a free text annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The text to be displayed.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +549,15 @@ public:
return "";
}
+/** (Required) The default appearance string to be used in formatting the text (see
+ * "Variable Text" on page 533).
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the DA
+ * entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams."
+**/
+ bool has_DA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", NULL));
+ }
+
std::string DA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", &ret)) return ret;
@@ -542,6 +565,17 @@ public:
return "";
}
+/** (Optional; PDF 1.4) A code specifying the form of quadding (justification) to be
+ * used in displaying the annotation's text:
+ * 0 Left-justified
+ * 1 Centered
+ * 2 Right-justified
+ * Default value: 0 (left-justified).
+**/
+ bool has_Q() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", NULL));
+ }
+
long Q() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfFunctionCommonDictionary_autogen.h b/experimental/PdfViewer/SkPdfFunctionCommonDictionary_autogen.h
index 88c3eefd6d..4b182527e4 100644
--- a/experimental/PdfViewer/SkPdfFunctionCommonDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfFunctionCommonDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all function dictionaries
class SkPdfFunctionCommonDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kFunctionCommonDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfFunctionCommonDictionary& operator=(const SkPdfFunctionCommonDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The function type:
+ * 0 Sampled function
+ * 2 Exponential interpolation function
+ * 3 Stitching function
+ * 4 PostScript calculator function
+**/
+ bool has_FunctionType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FunctionType", "", NULL));
+ }
+
long FunctionType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FunctionType", "", &ret)) return ret;
@@ -528,6 +539,16 @@ public:
return 0;
}
+/** (Required) An array of 2 x m numbers, where m is the number of input
+ * values. For each i from 0 to m - 1, Domain2i must be less than or equal to
+ * Domain2i+1 , and the ith input value, xi , must lie in the interval
+ * Domain2i <= xi <= Domain2i+1 . Input values outside the declared domain are
+ * clipped to the nearest boundary value.
+**/
+ bool has_Domain() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", NULL));
+ }
+
SkPdfArray Domain() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", &ret)) return ret;
@@ -535,6 +556,17 @@ public:
return SkPdfArray();
}
+/** (Required for type 0 and type 4 functions, optional otherwise; see below) An
+ * array of 2 x n numbers, where n is the number of output values. For each j
+ * from 0 to n - 1, Range2j must be less than or equal to Range2j+1 , and the jth
+ * output value, yj , must lie in the interval Range2j <= yj <= Range2j+1 . Output
+ * values outside the declared range are clipped to the nearest boundary value.
+ * If this entry is absent, no clipping is done.
+**/
+ bool has_Range() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", NULL));
+ }
+
SkPdfArray Range() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfGoToActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfGoToActionDictionary_autogen.h
index 62782a6171..133912cd9c 100644
--- a/experimental/PdfViewer/SkPdfGoToActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfGoToActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a go-to action
class SkPdfGoToActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kGoToActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfGoToActionDictionary& operator=(const SkPdfGoToActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be GoTo for a
+ * go-to action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The destination to jump to (see Section 8.2.1, "Destinations").
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
bool isDAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h b/experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h
index 22da3fb9ca..6734c0d1fc 100644
--- a/experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a graphics state parameter dictionary
class SkPdfGraphicsStateDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kGraphicsStateDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfGraphicsStateDictionary& operator=(const SkPdfGraphicsStateDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; must be
+ * ExtGState for a graphics state parameter dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Optional; PDF 1.3) The line width (see "Line Width" on page 152).
+**/
+ bool has_LW() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LW", "", NULL));
+ }
+
double LW() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LW", "", &ret)) return ret;
@@ -535,6 +549,12 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) The line cap style (see "Line Cap Style" on page 153).
+**/
+ bool has_LC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LC", "", NULL));
+ }
+
long LC() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LC", "", &ret)) return ret;
@@ -542,6 +562,12 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) The line join style (see "Line Join Style" on page 153).
+**/
+ bool has_LJ() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LJ", "", NULL));
+ }
+
long LJ() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LJ", "", &ret)) return ret;
@@ -549,6 +575,12 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) The miter limit (see "Miter Limit" on page 153).
+**/
+ bool has_ML() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ML", "", NULL));
+ }
+
double ML() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ML", "", &ret)) return ret;
@@ -556,6 +588,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) The line dash pattern, expressed as an array of the form
+ * [dashArray dashPhase], where dashArray is itself an array and dashPhase is an
+ * integer (see "Line Dash Pattern" on page 155).
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
SkPdfArray D() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
@@ -563,6 +603,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.3) The name of the rendering intent (see "Rendering
+ * Intents" on page 197).
+**/
+ bool has_RI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
+ }
+
std::string RI() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret;
@@ -570,6 +617,18 @@ public:
return "";
}
+/** (Optional) A flag specifying whether to apply overprint (see Section 4.5.6,
+ * "Overprint Control"). In PDF 1.2 and earlier, there is a single overprint
+ * parameter that applies to all painting operations. Beginning with PDF 1.3,
+ * there are two separate overprint parameters: one for stroking and one for all
+ * other painting operations. Specifying an OP entry sets both parameters un-
+ * less there is also an op entry in the same graphics state parameter dictionary,
+ * in which case the OP entry sets only the overprint parameter for stroking.
+**/
+ bool has_OP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OP", "", NULL));
+ }
+
bool OP() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OP", "", &ret)) return ret;
@@ -577,6 +636,14 @@ public:
return false;
}
+/** (Optional; PDF 1.3) A flag specifying whether to apply overprint (see Section
+ * 4.5.6, "Overprint Control") for painting operations other than stroking. If
+ * this entry is absent, the OP entry, if any, sets this parameter.
+**/
+ bool has_op() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "op", "", NULL));
+ }
+
bool op() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "op", "", &ret)) return ret;
@@ -584,6 +651,13 @@ public:
return false;
}
+/** (Optional; PDF 1.3) The overprint mode (see Section 4.5.6, "Overprint Con-
+ * trol").
+**/
+ bool has_OPM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPM", "", NULL));
+ }
+
long OPM() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPM", "", &ret)) return ret;
@@ -591,6 +665,16 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) An array of the form [font size], where font is an indirect
+ * reference to a font dictionary and size is a number expressed in text space
+ * units. These two objects correspond to the operands of the Tf operator (see
+ * Section 5.2, "Text State Parameters and Operators"); however, the first oper-
+ * and is an indirect object reference instead of a resource name.
+**/
+ bool has_Font() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font", "", NULL));
+ }
+
SkPdfArray Font() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font", "", &ret)) return ret;
@@ -598,6 +682,14 @@ public:
return SkPdfArray();
}
+/** (Optional) The black-generation function, which maps the interval [0.0 1.0]
+ * to the interval [0.0 1.0] (see Section 6.2.3, "Conversion from DeviceRGB to
+ * DeviceCMYK").
+**/
+ bool has_BG() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
+ }
+
SkPdfFunction BG() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", &ret)) return ret;
@@ -605,6 +697,15 @@ public:
return SkPdfFunction();
}
+/** (Optional; PDF 1.3) Same as BG except that the value may also be the name
+ * Default, denoting the black-generation function that was in effect at the start
+ * of the page. If both BG and BG2 are present in the same graphics state param-
+ * eter dictionary, BG2 takes precedence.
+**/
+ bool has_BG2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "", NULL));
+ }
+
bool isBG2AFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "", &ret)) return false;
@@ -631,6 +732,14 @@ public:
return "";
}
+/** (Optional) The undercolor-removal function, which maps the interval
+ * [0.0 1.0] to the interval [-1.0 1.0] (see Section 6.2.3, "Conversion from
+ * DeviceRGB to DeviceCMYK").
+**/
+ bool has_UCR() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR", "", NULL));
+ }
+
SkPdfFunction UCR() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR", "", &ret)) return ret;
@@ -638,6 +747,15 @@ public:
return SkPdfFunction();
}
+/** (Optional; PDF 1.3) Same as UCR except that the value may also be the name
+ * Default, denoting the undercolor-removal function that was in effect at the
+ * start of the page. If both UCR and UCR2 are present in the same graphics state
+ * parameter dictionary, UCR2 takes precedence.
+**/
+ bool has_UCR2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", "", NULL));
+ }
+
bool isUCR2AFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", "", &ret)) return false;
@@ -664,6 +782,16 @@ public:
return "";
}
+/** (Optional) The transfer function, which maps the interval [0.0 1.0] to the
+ * interval [0.0 1.0] (see Section 6.3, "Transfer Functions"). The value is either
+ * a single function (which applies to all process colorants) or an array of four
+ * functions (which apply to the process colorants individually). The name
+ * Identity may be used to represent the identity function.
+**/
+ bool has_TR() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", NULL));
+ }
+
bool isTRAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &ret)) return false;
@@ -703,6 +831,15 @@ public:
return "";
}
+/** (Optional; PDF 1.3) Same as TR except that the value may also be the name
+ * Default, denoting the transfer function that was in effect at the start of the
+ * page. If both TR and TR2 are present in the same graphics state parameter dic-
+ * tionary, TR2 takes precedence.
+**/
+ bool has_TR2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "", NULL));
+ }
+
bool isTR2AFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "", &ret)) return false;
@@ -742,6 +879,14 @@ public:
return "";
}
+/** (Optional) The halftone dictionary or stream (see Section 6.4, "Halftones")
+ * or the name Default, denoting the halftone that was in effect at the start of the
+ * page.
+**/
+ bool has_HT() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", NULL));
+ }
+
bool isHTADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return false;
@@ -781,6 +926,13 @@ public:
return "";
}
+/** (Optional; PDF 1.3) The flatness tolerance (see Section 6.5.1, "Flatness Toler-
+ * ance").
+**/
+ bool has_FL() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FL", "", NULL));
+ }
+
double FL() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FL", "", &ret)) return ret;
@@ -788,6 +940,13 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) The smoothness tolerance (see Section 6.5.2, "Smooth-
+ * ness Tolerance").
+**/
+ bool has_SM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SM", "", NULL));
+ }
+
double SM() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SM", "", &ret)) return ret;
@@ -795,6 +954,13 @@ public:
return 0;
}
+/** (Optional) A flag specifying whether to apply automatic stroke adjustment
+ * (see Section 6.5.4, "Automatic Stroke Adjustment").
+**/
+ bool has_SA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SA", "", NULL));
+ }
+
bool SA() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SA", "", &ret)) return ret;
@@ -802,6 +968,14 @@ public:
return false;
}
+/** (Optional; PDF 1.4) The current blend mode to be used in the transparent
+ * imaging model (see Sections 7.2.4, "Blend Mode," and 7.5.2, "Specifying
+ * Blending Color Space and Blend Mode").
+**/
+ bool has_BM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", NULL));
+ }
+
bool isBMAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", &ret)) return false;
@@ -828,6 +1002,19 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) The current soft mask, specifying the mask shape or
+ * mask opacity values to be used in the transparent imaging model (see
+ * "Source Shape and Opacity" on page 421 and "Mask Shape and Opacity" on
+ * page 443).
+ * Note: Although the current soft mask is sometimes referred to as a "soft clip,"
+ * altering it with the gs operator completely replaces the old value with the new
+ * one, rather than intersecting the two as is done with the current clipping path
+ * parameter (see Section 4.4.3, "Clipping Path Operators").
+**/
+ bool has_SMask() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", NULL));
+ }
+
bool isSMaskADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", &ret)) return false;
@@ -854,6 +1041,15 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The current stroking alpha constant, specifying the con-
+ * stant shape or constant opacity value to be used for stroking operations in the
+ * transparent imaging model (see "Source Shape and Opacity" on page 421
+ * and "Constant Shape and Opacity" on page 444).
+**/
+ bool has_CA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
+ }
+
double CA() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
@@ -861,6 +1057,12 @@ public:
return 0;
}
+/** (Optional; PDF 1.4) Same as CA, but for nonstroking operations.
+**/
+ bool has_ca() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ca", "", NULL));
+ }
+
double ca() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ca", "", &ret)) return ret;
@@ -868,6 +1070,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.4) The alpha source flag ("alpha is shape"), specifying
+ * whether the current soft mask and alpha constant are to be interpreted as
+ * shape values (true) or opacity values (false).
+**/
+ bool has_AIS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AIS", "", NULL));
+ }
+
bool AIS() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AIS", "", &ret)) return ret;
@@ -875,6 +1085,14 @@ public:
return false;
}
+/** (Optional; PDF 1.4) The text knockout flag, which determines the behavior
+ * of overlapping glyphs within a text object in the transparent imaging model
+ * (see Section 5.2.7, "Text Knockout").
+**/
+ bool has_TK() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TK", "", NULL));
+ }
+
bool TK() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TK", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfGroupAttributesDictionary_autogen.h b/experimental/PdfViewer/SkPdfGroupAttributesDictionary_autogen.h
index b306a0de78..c1f7e7fa1a 100644
--- a/experimental/PdfViewer/SkPdfGroupAttributesDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfGroupAttributesDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all group attributes dictionaries
class SkPdfGroupAttributesDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kGroupAttributesDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfGroupAttributesDictionary& operator=(const SkPdfGroupAttributesDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must
+ * be Group for a group attributes dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,17 @@ public:
return "";
}
+/** (Required) The group subtype, which identifies the type of group whose at-
+ * tributes this dictionary describes and determines the format and meaning of the
+ * dictionary's remaining entries. The only group subtype defined in PDF 1.4 is
+ * Transparency; see Section 7.5.5, "Transparency Group XObjects," for the re-
+ * maining contents of this type of dictionary. Other group subtypes may be added
+ * in the future.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfHideActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfHideActionDictionary_autogen.h
index 8c5d1c9bfe..47b9bfd64d 100644
--- a/experimental/PdfViewer/SkPdfHideActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfHideActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a hide action
class SkPdfHideActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kHideActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfHideActionDictionary& operator=(const SkPdfHideActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Hide for a hide
+ * action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,18 @@ public:
return "";
}
+/** (Required) The annotation or annotations to be hidden or shown, specified in any
+ * of the following forms:
+ * * An indirect reference to an annotation dictionary
+ * * A string giving the fully qualified field name of an interactive form field whose
+ * associated widget annotation or annotations are to be affected (see "Field
+ * Names" on page 532)
+ * * An array of such dictionaries or strings
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
bool isTADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return false;
@@ -567,6 +587,13 @@ public:
return SkPdfArray();
}
+/** (Optional) A flag indicating whether to hide the annotation (true) or show it (false).
+ * Default value: true.
+**/
+ bool has_H() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
+ }
+
bool H() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfIccProfileStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfIccProfileStreamDictionary_autogen.h
index 0adceda5a1..5fc6e2ca25 100644
--- a/experimental/PdfViewer/SkPdfIccProfileStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfIccProfileStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to an ICC profile stream dictionary
class SkPdfIccProfileStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kIccProfileStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfIccProfileStreamDictionary& operator=(const SkPdfIccProfileStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The number of color components in the color space described by the ICC
+ * profile data. This number must match the number of components actually in the ICC
+ * profile. As of PDF 1.4, N must be 1, 3, or 4.
+**/
+ bool has_N() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
+ }
+
long N() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
@@ -528,6 +537,22 @@ public:
return 0;
}
+/** (Optional) An alternate color space to be used in case the one specified in the stream
+ * data is not supported (for example, by viewer applications designed for earlier
+ * versions of PDF). The alternate space may be any valid color space (except a Pattern
+ * color space) that has the number of components specified by N. If this entry is omit-
+ * ted and the viewer application does not understand the ICC profile data, the color
+ * space used will be DeviceGray, DeviceRGB, or DeviceCMYK, depending on whether
+ * the value of N is 1, 3, or 4, respectively.
+ * Note: Note that there is no conversion of source color values, such as a tint transforma-
+ * tion, when using the alternate color space. Color values that are within the range of the
+ * ICCBased color space might not be within the range of the alternate color space. In this
+ * case, the nearest values within the range of the alternate space will be substituted.
+**/
+ bool has_Alternate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alternate", "", NULL));
+ }
+
bool isAlternateAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alternate", "", &ret)) return false;
@@ -554,6 +579,15 @@ public:
return "";
}
+/** (Optional) An array of 2 x N numbers [min0 max0 min1 max1 ... ] specifying the
+ * minimum and maximum valid values of the corresponding color components.
+ * These values must match the information in the ICC profile. Default value:
+ * [0.0 1.0 0.0 1.0 ...].
+**/
+ bool has_Range() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", NULL));
+ }
+
SkPdfArray Range() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", &ret)) return ret;
@@ -561,6 +595,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the color space (see
+ * Section 9.2.2, "Metadata Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfIconFitDictionary_autogen.h b/experimental/PdfViewer/SkPdfIconFitDictionary_autogen.h
index af3d4b7e3f..1946aadb21 100644
--- a/experimental/PdfViewer/SkPdfIconFitDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfIconFitDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an icon fit dictionary
class SkPdfIconFitDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kIconFitDictionary_SkPdfObjectType;}
@@ -521,6 +522,18 @@ public:
SkPdfIconFitDictionary& operator=(const SkPdfIconFitDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The circumstances under which the icon should be scaled inside the annota-
+ * tion rectangle:
+ * A Always scale.
+ * B Scale only when the icon is bigger than the annotation rectangle.
+ * S Scale only when the icon is smaller than the annotation rectangle.
+ * N Never scale.
+ * Default value: A.
+**/
+ bool has_SW() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", NULL));
+ }
+
std::string SW() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SW", "", &ret)) return ret;
@@ -528,6 +541,19 @@ public:
return "";
}
+/** (Required) The type of scaling to use:
+ * A Anamorphic scaling: scale the icon to fill the annotation rectangle exactly, with-
+ * out regard to its original aspect ratio (ratio of width to height).
+ * P Proportional scaling: scale the icon to fit the width or height of the annotation
+ * rectangle while maintaining the icon's original aspect ratio. If the required hori-
+ * zontal and vertical scaling factors are different, use the smaller of the two, cen-
+ * tering the icon within the annotation rectangle in the other dimension.
+ * Default value: P.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +561,16 @@ public:
return "";
}
+/** (Required) An array of two numbers between 0.0 and 1.0 indicating the fraction of left-
+ * over space to allocate at the left and bottom of the icon. A value of [0.0 0.0] positions the
+ * icon at the bottom-left corner of the annotation rectangle; a value of [0.5 0.5] centers it
+ * within the rectangle. This entry is used only if the icon is scaled proportionally. Default
+ * value: [0.5 0.5].
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
SkPdfArray A() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfImageDictionary_autogen.h b/experimental/PdfViewer/SkPdfImageDictionary_autogen.h
index 07a3973a44..b7e4c5d0a3 100644
--- a/experimental/PdfViewer/SkPdfImageDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfImageDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfXObjectDictionary_autogen.h"
+// Additional entries specific to an image dictionary
class SkPdfImageDictionary : public SkPdfXObjectDictionary {
public:
virtual SkPdfObjectType getType() const { return kImageDictionary_SkPdfObjectType;}
@@ -26,6 +27,13 @@ public:
SkPdfImageDictionary& operator=(const SkPdfImageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be XObject for an image XObject.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -33,6 +41,13 @@ public:
return "";
}
+/** (Required) The type of XObject that this dictionary describes; must be
+ * Image for an image XObject.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -40,6 +55,12 @@ public:
return "";
}
+/** (Required) The width of the image, in samples.
+**/
+ bool has_Width() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", NULL));
+ }
+
long Width() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
@@ -47,6 +68,12 @@ public:
return 0;
}
+/** (Required) The height of the image, in samples.
+**/
+ bool has_Height() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", NULL));
+ }
+
long Height() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
@@ -54,6 +81,14 @@ public:
return 0;
}
+/** (Required except for image masks; not allowed for image masks) The color
+ * space in which image samples are specified. This may be any type of color
+ * space except Pattern.
+**/
+ bool has_ColorSpace() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", NULL));
+ }
+
bool isColorSpaceAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", &ret)) return false;
@@ -80,6 +115,22 @@ public:
return SkPdfArray();
}
+/** (Required except for image masks; optional for image masks) The number of
+ * bits used to represent each color component. Only a single value may be
+ * specified; the number of bits is the same for all color components. Valid
+ * values are 1, 2, 4, and 8. If ImageMask is true, this entry is optional, and if
+ * specified, its value must be 1.
+ * If the image stream uses a filter, the value of BitsPerComponent must be
+ * consistent with the size of the data samples that the filter delivers. In par-
+ * ticular, a CCITTFaxDecode or JBIG2Decode filter always delivers 1-bit sam-
+ * ples, a RunLengthDecode or DCTDecode filter delivers 8-bit samples, and
+ * an LZWDecode or FlateDecode filter delivers samples of a specified size if
+ * a predictor function is used.
+**/
+ bool has_BitsPerComponent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", NULL));
+ }
+
long BitsPerComponent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", &ret)) return ret;
@@ -87,6 +138,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.1) The name of a color rendering intent to be used in
+ * rendering the image (see "Rendering Intents" on page 197). Default value:
+ * the current rendering intent in the graphics state.
+**/
+ bool has_Intent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Intent", "", NULL));
+ }
+
std::string Intent() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Intent", "", &ret)) return ret;
@@ -94,6 +153,16 @@ public:
return "";
}
+/** (Optional) A flag indicating whether the image is to be treated as an image
+ * mask (see Section 4.8.5, "Masked Images"). If this flag is true, the value of
+ * BitsPerComponent must be 1 and Mask and ColorSpace should not be
+ * specified; unmasked areas will be painted using the current nonstroking
+ * color. Default value: false.
+**/
+ bool has_ImageMask() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ImageMask", "", NULL));
+ }
+
bool ImageMask() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ImageMask", "", &ret)) return ret;
@@ -101,6 +170,17 @@ public:
return false;
}
+/** (Optional except for image masks; not allowed for image masks; PDF 1.3) An
+ * image XObject defining an image mask to be applied to this image (see
+ * "Explicit Masking" on page 277), or an array specifying a range of colors
+ * to be applied to it as a color key mask (see "Color Key Masking" on page
+ * 277). If ImageMask is true, this entry must not be present. (See
+ * implementation note 35 in Appendix H.)
+**/
+ bool has_Mask() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mask", "", NULL));
+ }
+
bool isMaskAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mask", "", &ret)) return false;
@@ -127,6 +207,21 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) A subsidiary image XObject defining a soft-mask
+ * image (see "Soft-Mask Images" on page 447) to be used as a source of
+ * mask shape or mask opacity values in the transparent imaging model. The
+ * alpha source parameter in the graphics state determines whether the mask
+ * values are interpreted as shape or opacity.
+ * If present, this entry overrides the current soft mask in the graphics state,
+ * as well as the image's Mask entry, if any. (However, the other transparency-
+ * related graphics state parameters-blend mode and alpha constant-
+ * remain in effect.) If SMask is absent, the image has no associated soft mask
+ * (although the current soft mask in the graphics state may still apply).
+**/
+ bool has_SMask() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", NULL));
+ }
+
SkPdfStream SMask() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", &ret)) return ret;
@@ -134,6 +229,17 @@ public:
return SkPdfStream();
}
+/** (Optional) An array of numbers describing how to map image samples
+ * into the range of values appropriate for the image's color space (see
+ * "Decode Arrays" on page 271). If ImageMask is true, the array must be
+ * either [0 1] or [1 0]; otherwise, its length must be twice the number of
+ * color components required by ColorSpace. Default value: see "Decode
+ * Arrays" on page 271.
+**/
+ bool has_Decode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", NULL));
+ }
+
SkPdfArray Decode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", &ret)) return ret;
@@ -141,6 +247,13 @@ public:
return SkPdfArray();
}
+/** (Optional) A flag indicating whether image interpolation is to be per-
+ * formed (see "Image Interpolation" on page 273). Default value: false.
+**/
+ bool has_Interpolate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Interpolate", "", NULL));
+ }
+
bool Interpolate() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Interpolate", "", &ret)) return ret;
@@ -148,6 +261,15 @@ public:
return false;
}
+/** (Optional; PDF 1.3) An array of alternate image dictionaries for this image
+ * (see "Alternate Images" on page 273). The order of elements within the
+ * array has no significance. This entry may not be present in an image
+ * XObject that is itself an alternate image.
+**/
+ bool has_Alternates() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alternates", "", NULL));
+ }
+
SkPdfArray Alternates() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alternates", "", &ret)) return ret;
@@ -155,6 +277,16 @@ public:
return SkPdfArray();
}
+/** (Required in PDF 1.0; optional otherwise) The name by which this image
+ * XObject is referenced in the XObject subdictionary of the current resource
+ * dictionary (see Section 3.7.2, "Resource Dictionaries").
+ * Note: This entry is obsolescent and its use is no longer recommended. (See
+ * implementation note 36 in Appendix H.)
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -162,6 +294,14 @@ public:
return "";
}
+/** (Required if the image is a structural content item; PDF 1.3) The integer key
+ * of the image's entry in the structural parent tree (see "Finding Structure
+ * Elements from Content Items" on page 600).
+**/
+ bool has_StructParent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
+ }
+
long StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
@@ -169,6 +309,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.3; indirect reference preferred) The digital identifier of the
+ * image's parent Web Capture content set (see Section 9.9.5, "Object At-
+ * tributes Related to Web Capture").
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
std::string ID() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -176,6 +324,14 @@ public:
return "";
}
+/** (Optional; PDF 1.2) An OPI version dictionary for the image (see Section
+ * 9.10.6, "Open Prepress Interface (OPI)"). If ImageMask is true, this entry
+ * is ignored.
+**/
+ bool has_OPI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPI", "", NULL));
+ }
+
SkPdfDictionary* OPI() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPI", "", &ret)) return ret;
@@ -183,6 +339,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the image
+ * (see Section 9.2.2, "Metadata Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfImportDataActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfImportDataActionDictionary_autogen.h
index f4d465b984..e299942f8f 100644
--- a/experimental/PdfViewer/SkPdfImportDataActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfImportDataActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to an import-data action
class SkPdfImportDataActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kImportDataActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfImportDataActionDictionary& operator=(const SkPdfImportDataActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be ImportData
+ * for an import-data action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The FDF file from which to import the data. (See implementation
+ * notes 87 and 88 in Appendix H.)
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h
index d6941e9266..fa67791f11 100644
--- a/experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfInkAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to an ink annotation
class SkPdfInkAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kInkAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfInkAnnotationDictionary& operator=(const SkPdfInkAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Ink for
+ * an ink annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annotation
+ * is opened. Carriage returns may be used to separate the text into paragraphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +550,16 @@ public:
return "";
}
+/** (Required) An array of n arrays, each representing a stroked path. Each array is a
+ * series of alternating horizontal and vertical coordinates in default user space,
+ * specifying points along the path. When drawn, the points are connected by
+ * straight lines or curves in an implementation-dependent way. (See implementa-
+ * tion note 68 in Appendix H.)
+**/
+ bool has_InkList() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkList", "", NULL));
+ }
+
SkPdfArray InkList() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InkList", "", &ret)) return ret;
@@ -542,6 +567,16 @@ public:
return SkPdfArray();
}
+/** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
+ * line width and dash pattern to be used in drawing the paths.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * InkList and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance
+ * Streams."
+**/
+ bool has_BS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
+ }
+
SkPdfDictionary* BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfInlineLevelStructureElementsDictionary_autogen.h b/experimental/PdfViewer/SkPdfInlineLevelStructureElementsDictionary_autogen.h
index b593beba18..5d80f16011 100644
--- a/experimental/PdfViewer/SkPdfInlineLevelStructureElementsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfInlineLevelStructureElementsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Standard layout attributes specific to inline-level structure elements
class SkPdfInlineLevelStructureElementsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kInlineLevelStructureElementsDictionary_SkPdfObjectType;}
@@ -521,6 +522,22 @@ public:
SkPdfInlineLevelStructureElementsDictionary& operator=(const SkPdfInlineLevelStructureElementsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The element's preferred height, measured in default user space
+ * units in the block-progression direction. The height of a line is deter-
+ * mined by the largest LineHeight value for any complete or partial ILSE
+ * that it contains.
+ * The name Normal or Auto in place of a numeric value indicates that no
+ * specific height constraint is to be imposed; the element's height is set to a
+ * reasonable value based on the content's font size:
+ * Normal Adjust the line height to include any nonzero value
+ * specified for BaselineShift (see below).
+ * Auto Do not adjust for the value of BaselineShift.
+ * Default value: Normal.
+**/
+ bool has_LineHeight() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeight", "", NULL));
+ }
+
bool isLineHeightANumber() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LineHeight", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfInteractiveFormDictionary_autogen.h b/experimental/PdfViewer/SkPdfInteractiveFormDictionary_autogen.h
index c9bdb58a35..f52cddabf4 100644
--- a/experimental/PdfViewer/SkPdfInteractiveFormDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfInteractiveFormDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the interactive form dictionary
class SkPdfInteractiveFormDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kInteractiveFormDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfInteractiveFormDictionary& operator=(const SkPdfInteractiveFormDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of references to the document's root fields (those with
+ * no ancestors in the field hierarchy).
+**/
+ bool has_Fields() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
+ }
+
SkPdfArray Fields() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return SkPdfArray();
}
+/** (Optional) A flag specifying whether to construct appearance streams and
+ * appearance dictionaries for all widget annotations in the document (see
+ * "Variable Text" on page 533). Default value: false.
+**/
+ bool has_NeedAppearances() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedAppearances", "", NULL));
+ }
+
bool NeedAppearances() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedAppearances", "", &ret)) return ret;
@@ -535,6 +551,14 @@ public:
return false;
}
+/** (Optional; PDF 1.3) A set of flags specifying various document-level char-
+ * acteristics related to signature fields (see Table 8.48, below, and "Signature
+ * Fields" on page 547). Default value: 0.
+**/
+ bool has_SigFlags() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFlags", "", NULL));
+ }
+
long SigFlags() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFlags", "", &ret)) return ret;
@@ -542,6 +566,16 @@ public:
return 0;
}
+/** (Required if any fields in the document have additional-actions dictionaries
+ * containing a C entry; PDF 1.3) An array of indirect references to field dic-
+ * tionaries with calculation actions, defining the calculation order in which
+ * their values will be recalculated when the value of any field changes (see
+ * Section 8.5.2, "Trigger Events").
+**/
+ bool has_CO() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", NULL));
+ }
+
SkPdfArray CO() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", &ret)) return ret;
@@ -549,6 +583,13 @@ public:
return SkPdfArray();
}
+/** (Optional) A document-wide default value for the DR attribute of variable
+ * text fields (see "Variable Text" on page 533).
+**/
+ bool has_DR() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", NULL));
+ }
+
SkPdfDictionary* DR() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", &ret)) return ret;
@@ -556,6 +597,13 @@ public:
return NULL;
}
+/** (Optional) A document-wide default value for the DA attribute of variable
+ * text fields (see "Variable Text" on page 533).
+**/
+ bool has_DA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", NULL));
+ }
+
std::string DA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", &ret)) return ret;
@@ -563,6 +611,13 @@ public:
return "";
}
+/** (Optional) A document-wide default value for the Q attribute of variable
+ * text fields (see "Variable Text" on page 533).
+**/
+ bool has_Q() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", NULL));
+ }
+
long Q() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfJavascriptActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfJavascriptActionDictionary_autogen.h
index b711bf976a..9d7f06d54f 100644
--- a/experimental/PdfViewer/SkPdfJavascriptActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfJavascriptActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a JavaScript action
class SkPdfJavascriptActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kJavascriptActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfJavascriptActionDictionary& operator=(const SkPdfJavascriptActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be JavaScript
+ * for a JavaScript action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Required) A string or stream containing the JavaScript script to be executed.
+ * Note: PDFDocEncoding or Unicode encoding (the latter identified by the Unicode
+ * prefix U+ FEFF) is used to encode the contents of the string or stream. (See imple-
+ * mentation note 89 in Appendix H.)
+**/
+ bool has_JS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JS", "", NULL));
+ }
+
bool isJSAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JS", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfJavascriptDictionary_autogen.h b/experimental/PdfViewer/SkPdfJavascriptDictionary_autogen.h
index 1660a05407..f033bf6f5a 100644
--- a/experimental/PdfViewer/SkPdfJavascriptDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfJavascriptDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the JavaScript dictionary
class SkPdfJavascriptDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kJavascriptDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfJavascriptDictionary& operator=(const SkPdfJavascriptDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A string or stream containing a JavaScript script to be executed
+ * just before the FDF file is imported.
+**/
+ bool has_Before() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Before", "", NULL));
+ }
+
bool isBeforeAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Before", "", &ret)) return false;
@@ -547,6 +555,13 @@ public:
return SkPdfStream();
}
+/** (Optional) A string or stream containing a JavaScript script to be executed
+ * just after the FDF file is imported.
+**/
+ bool has_After() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "After", "", NULL));
+ }
+
bool isAfterAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "After", "", &ret)) return false;
@@ -573,6 +588,20 @@ public:
return SkPdfStream();
}
+/** (Optional) An array defining additional JavaScript scripts to be added to
+ * those defined in the JavaScript entry of the document's name dictionary (see
+ * Section 3.6.3, "Name Dictionary"). The array contains an even number of
+ * elements, organized in pairs. The first element of each pair is a name and the
+ * second is a string or stream defining the script corresponding to that name.
+ * Each of the defined scripts will be added to those already defined in the name
+ * dictionary and then executed before the script defined in the Before entry is
+ * executed. As described in "JavaScript Actions" on page 556, these scripts are
+ * used to define JavaScript functions for use by other scripts in the document.
+**/
+ bool has_Doc() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Doc", "", NULL));
+ }
+
SkPdfArray Doc() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Doc", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfJbig2DecodeFilterDictionary_autogen.h b/experimental/PdfViewer/SkPdfJbig2DecodeFilterDictionary_autogen.h
index 8cc72db275..610c5ed77f 100644
--- a/experimental/PdfViewer/SkPdfJbig2DecodeFilterDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfJbig2DecodeFilterDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Optional parameter for the JBIG2Decode filter
class SkPdfJbig2DecodeFilterDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kJbig2DecodeFilterDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfJbig2DecodeFilterDictionary& operator=(const SkPdfJbig2DecodeFilterDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** ()A stream containing the JBIG2 global (page 0) segments. Global segments
+ * must be placed in this stream even if only a single JBIG2 image XObject refers
+ * to it.
+**/
+ bool has_JBIG2Globals() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JBIG2Globals", "", NULL));
+ }
+
SkPdfStream JBIG2Globals() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JBIG2Globals", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfLabColorSpaceDictionary_autogen.h b/experimental/PdfViewer/SkPdfLabColorSpaceDictionary_autogen.h
index eaebf5c151..12dfe62d3a 100644
--- a/experimental/PdfViewer/SkPdfLabColorSpaceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfLabColorSpaceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a Lab color space dictionary
class SkPdfLabColorSpaceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kLabColorSpaceDictionary_SkPdfObjectType;}
@@ -521,6 +522,15 @@ public:
SkPdfLabColorSpaceDictionary& operator=(const SkPdfLabColorSpaceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of three numbers [ XW YW ZW ] specifying the tristimulus value,
+ * in the CIE 1931 XYZ space, of the diffuse white point; see "CalRGB Color Spaces" on
+ * page 184 for further discussion. The numbers XW and ZW must be positive, and YW
+ * must be equal to 1.0.
+**/
+ bool has_WhitePoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
+ }
+
SkPdfArray WhitePoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
@@ -528,6 +538,15 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus value, in
+ * the CIE 1931 XYZ space, of the diffuse black point; see "CalRGB Color Spaces" on
+ * page 184 for further discussion. All three of these numbers must be nonnegative.
+ * Default value: [0.0 0.0 0.0].
+**/
+ bool has_BlackPoint() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
+ }
+
SkPdfArray BlackPoint() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
@@ -535,6 +554,18 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of four numbers [ amin amax bmin bmax ] specifying the range of
+ * valid values for the a* and b* (B and C) components of the color space-that is,
+ * a min <= a* <= a max
+ * and
+ * b min <= b* <= b max
+ * Component values falling outside the specified range will be adjusted to the nearest
+ * valid value without error indication. Default value: [ -100 100 -100 100].
+**/
+ bool has_Range() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", NULL));
+ }
+
SkPdfArray Range() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Range", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfLaunchActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfLaunchActionDictionary_autogen.h
index 9128695673..c8a5ffbb79 100644
--- a/experimental/PdfViewer/SkPdfLaunchActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfLaunchActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a launch action
class SkPdfLaunchActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kLaunchActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfLaunchActionDictionary& operator=(const SkPdfLaunchActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Launch
+ * for a launch action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Required if none of the entries Win, Mac, or Unix is present) The application to
+ * be launched or the document to be opened or printed. If this entry is absent
+ * and the viewer application does not understand any of the alternative entries,
+ * it should do nothing.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +552,13 @@ public:
return SkPdfFileSpec();
}
+/** (Optional) A dictionary containing Windows-specific launch parameters (see
+ * the Table 8.38; see also implementation note 73 in Appendix H).
+**/
+ bool has_Win() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win", "", NULL));
+ }
+
SkPdfDictionary* Win() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win", "", &ret)) return ret;
@@ -542,6 +566,12 @@ public:
return NULL;
}
+/** (Optional) Mac OS'specific launch parameters; not yet defined.
+**/
+ bool has_Mac() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
+ }
+
SkPdfObject* Mac() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
@@ -549,6 +579,12 @@ public:
return NULL;
}
+/** (Optional) UNIX-specific launch parameters; not yet defined.
+**/
+ bool has_Unix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "", NULL));
+ }
+
SkPdfObject* Unix() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "", &ret)) return ret;
@@ -556,6 +592,17 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) A flag specifying whether to open the destination docu-
+ * ment in a new window. If this flag is false, the destination document will
+ * replace the current document in the same window. If this entry is absent, the
+ * viewer application should behave in accordance with the current user prefer-
+ * ence. This entry is ignored if the file designated by the F entry is not a PDF
+ * document.
+**/
+ bool has_NewWindow() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", NULL));
+ }
+
bool NewWindow() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfLineAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfLineAnnotationDictionary_autogen.h
index 4c8595d042..4ad697b2da 100644
--- a/experimental/PdfViewer/SkPdfLineAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfLineAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a line annotation
class SkPdfLineAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kLineAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfLineAnnotationDictionary& operator=(const SkPdfLineAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Line
+ * for a line annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annotation
+ * is opened. Carriage returns may be used to separate the text into paragraphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return "";
}
+/** (Required) An array of four numbers, [x1 y1 x2 y2 ], specifying the starting and
+ * ending coordinates of the line in default user space.
+**/
+ bool has_L() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", NULL));
+ }
+
SkPdfArray L() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &ret)) return ret;
@@ -542,6 +564,15 @@ public:
return SkPdfArray();
}
+/** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
+ * width and dash pattern to be used in drawing the line.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the L
+ * and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams."
+**/
+ bool has_BS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
+ }
+
SkPdfDictionary* BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
@@ -549,6 +580,16 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An array of two names specifying the line ending styles to be
+ * used in drawing the line. The first and second elements of the array specify the
+ * line ending styles for the endpoints defined, respectively, by the first and second
+ * pairs of coordinates, (x1 , y1 ) and (x2 , y2 ), in the L array. Table 8.19 shows the
+ * possible values. Default value: [/None /None].
+**/
+ bool has_LE() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", NULL));
+ }
+
SkPdfArray LE() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LE", "", &ret)) return ret;
@@ -556,6 +597,15 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specifying
+ * the components, in the DeviceRGB color space, of the interior color with which to
+ * fill the annotation's line endings (see Table 8.19). If this entry is absent, the inte-
+ * riors of the line endings are left transparent.
+**/
+ bool has_IC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", NULL));
+ }
+
SkPdfArray IC() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfListAttributeDictionary_autogen.h b/experimental/PdfViewer/SkPdfListAttributeDictionary_autogen.h
index e793fb7675..6935b69404 100644
--- a/experimental/PdfViewer/SkPdfListAttributeDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfListAttributeDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Standard list attribute
class SkPdfListAttributeDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kListAttributeDictionary_SkPdfObjectType;}
@@ -521,6 +522,29 @@ public:
SkPdfListAttributeDictionary& operator=(const SkPdfListAttributeDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The numbering system used to generate the content of the Lbl (Label)
+ * elements in an autonumbered list, or the symbol used to identify each item in an
+ * unnumbered list:
+ * None No autonumbering; Lbl elements (if present) contain arbi-
+ * trary text not subject to any numbering scheme
+ * Disc Solid circular bullet
+ * Circle Open circular bullet
+ * Square Solid square bullet
+ * Decimal Decimal arabic numerals (1'9, 10'99, ...)
+ * UpperRoman Uppercase roman numerals (I, II, III, IV, ...)
+ * LowerRoman Lowercase roman numerals (i, ii, iii, iv, ...)
+ * UpperAlpha Uppercase letters (A, B, C, ...)
+ * LowerAlpha Lowercase letters (a, b, c, ...)
+ * Default value: None.
+ * Note: The alphabet used for UpperAlpha and LowerAlpha is determined by the pre-
+ * vailing Lang entry (see Section 9.8.1, "Natural Language Specification").
+ * Note: The set of possible values may be expanded as Unicode identifies additional
+ * numbering systems.
+**/
+ bool has_ListNumbering() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ListNumbering", "", NULL));
+ }
+
std::string ListNumbering() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ListNumbering", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h b/experimental/PdfViewer/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h
index 587f0c0c51..4863a7a4d0 100644
--- a/experimental/PdfViewer/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfLzwdecodeAndFlatedecodeFiltersDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Optional parameters for LZWDecode and FlateDecode filters
class SkPdfLzwdecodeAndFlatedecodeFiltersDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kLzwdecodeAndFlatedecodeFiltersDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfLzwdecodeAndFlatedecodeFiltersDictionary& operator=(const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** ()A code that selects the predictor algorithm, if any. If the value of this entry
+ * is 1, the filter assumes that the normal algorithm was used to encode the data,
+ * without prediction. If the value is greater than 1, the filter assumes that the
+ * data was differenced before being encoded, and Predictor selects the predic-
+ * tor algorithm. For more information regarding Predictor values greater
+ * than 1, see "LZW and Flate Predictor Functions," below. Default value: 1.
+**/
+ bool has_Predictor() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Predictor", "", NULL));
+ }
+
long Predictor() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Predictor", "", &ret)) return ret;
@@ -528,6 +540,14 @@ public:
return 0;
}
+/** (Used only if Predictor is greater than 1) The number of interleaved color com-
+ * ponents per sample. Valid values are 1 to 4 in PDF 1.2 or earlier, and 1 or
+ * greater in PDF 1.3 or later. Default value: 1.
+**/
+ bool has_Colors() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colors", "", NULL));
+ }
+
long Colors() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colors", "", &ret)) return ret;
@@ -535,6 +555,14 @@ public:
return 0;
}
+/** (Used only if Predictor is greater than 1) The number of bits used to represent
+ * each color component in a sample. Valid values are 1, 2, 4, and 8. Default
+ * value: 8.
+**/
+ bool has_BitsPerComponent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", NULL));
+ }
+
long BitsPerComponent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", &ret)) return ret;
@@ -542,6 +570,13 @@ public:
return 0;
}
+/** (Used only if Predictor is greater than 1) The number of samples in each row.
+ * Default value: 1.
+**/
+ bool has_Columns() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", NULL));
+ }
+
long Columns() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", &ret)) return ret;
@@ -549,6 +584,16 @@ public:
return 0;
}
+/** (LZWDecode only) An indication of when to increase the code length. If the
+ * value of this entry is 0, code length increases are postponed as long as pos-
+ * sible. If it is 1, they occur one code early. This parameter is included because
+ * LZW sample code distributed by some vendors increases the code length one
+ * code earlier than necessary. Default value: 1.
+**/
+ bool has_EarlyChange() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EarlyChange", "", NULL));
+ }
+
long EarlyChange() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EarlyChange", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMacOsFileInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfMacOsFileInformationDictionary_autogen.h
index 6b7d13f6a4..e476173a90 100644
--- a/experimental/PdfViewer/SkPdfMacOsFileInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMacOsFileInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a Mac OS file information dictionary
class SkPdfMacOsFileInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMacOsFileInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfMacOsFileInformationDictionary& operator=(const SkPdfMacOsFileInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The embedded file's file type.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +535,12 @@ public:
return "";
}
+/** (Optional) The embedded file's creator signature.
+**/
+ bool has_Creator() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", NULL));
+ }
+
std::string Creator() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", &ret)) return ret;
@@ -535,6 +548,12 @@ public:
return "";
}
+/** (Optional) The binary contents of the embedded file's resource fork.
+**/
+ bool has_ResFork() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ResFork", "", NULL));
+ }
+
SkPdfStream ResFork() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ResFork", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMarkInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfMarkInformationDictionary_autogen.h
index 6d5805d442..1a15e22420 100644
--- a/experimental/PdfViewer/SkPdfMarkInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMarkInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry in the mark information dictionary
class SkPdfMarkInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMarkInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfMarkInformationDictionary& operator=(const SkPdfMarkInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A flag indicating whether the document conforms to Tagged PDF
+ * conventions. Default value: false.
+**/
+ bool has_Marked() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Marked", "", NULL));
+ }
+
bool Marked() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Marked", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMarkedContentReferenceDictionary_autogen.h b/experimental/PdfViewer/SkPdfMarkedContentReferenceDictionary_autogen.h
index 5ab745bbc5..3ada571a53 100644
--- a/experimental/PdfViewer/SkPdfMarkedContentReferenceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMarkedContentReferenceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a marked-content reference dictionary
class SkPdfMarkedContentReferenceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMarkedContentReferenceDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfMarkedContentReferenceDictionary& operator=(const SkPdfMarkedContentReferenceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be MCR
+ * for a marked-content reference.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; must be an indirect reference) The page object representing the page on
+ * which the graphics objects in the marked-content sequence are rendered. This
+ * entry overrides any Pg entry in the structure element containing the marked-
+ * content reference; it is required if the structure element has no such entry.
+**/
+ bool has_Pg() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", NULL));
+ }
+
SkPdfDictionary* Pg() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", &ret)) return ret;
@@ -535,6 +552,17 @@ public:
return NULL;
}
+/** (Optional; must be an indirect reference) The content stream containing the
+ * marked-content sequence. This entry is needed only if the marked-content
+ * sequence resides in some other content stream associated with the page-for
+ * example, in a form XObject (see Section 4.9, "Form XObjects") or an annota-
+ * tion's appearance stream (Section 8.4.4, "Appearance Streams"). Default value:
+ * the content stream of the page identified by Pg.
+**/
+ bool has_Stm() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Stm", "", NULL));
+ }
+
SkPdfStream Stm() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Stm", "", &ret)) return ret;
@@ -542,6 +570,14 @@ public:
return SkPdfStream();
}
+/** (Optional; must be an indirect reference) The PDF object owning the stream
+ * identified by Stm-for example, the annotation to which an appearance stream
+ * belongs.
+**/
+ bool has_StmOwn() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StmOwn", "", NULL));
+ }
+
SkPdfObject* StmOwn() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StmOwn", "", &ret)) return ret;
@@ -549,6 +585,13 @@ public:
return NULL;
}
+/** (Required) The marked-content identifier of the marked-content sequence with-
+ * in its content stream.
+**/
+ bool has_MCID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MCID", "", NULL));
+ }
+
long MCID() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MCID", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_autogen.h b/experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_autogen.h
index 588891c419..77f4460f24 100644
--- a/experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMarkupAnnotationsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to markup annotations
class SkPdfMarkupAnnotationsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMarkupAnnotationsDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfMarkupAnnotationsDictionary& operator=(const SkPdfMarkupAnnotationsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be
+ * Highlight, Underline, Squiggly, or StrikeOut for a highlight, underline,
+ * squiggly-underline, or strikeout annotation, respectively.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annota-
+ * tion is opened. Carriage returns may be used to separate the text into para-
+ * graphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +552,30 @@ public:
return "";
}
+/** (Required) An array of 8 x n numbers specifying the coordinates of n quadri-
+ * laterals in default user space. Each quadrilateral encompasses a word or
+ * group of contiguous words in the text underlying the annotation. The coor-
+ * dinates for each quadrilateral are given in the order
+ * x1 y1 x2 y2 x3 y3 x4 y4
+ * specifying the quadrilateral's four vertices in counterclockwise order (see
+ * Figure 8.5). The text is oriented with respect to the edge connecting points
+ * (x1 , y1) and (x2 , y2). (See implementation note 67 in Appendix H.)
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * QuadPoints entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance
+ * Streams."
+ * (x3 , y3 )
+ * ter
+ * (x2 , y2 )
+ * pi
+ * (x4 , y4 )
+ * Ju
+ * (x1 , y1 )
+ * FIGURE 8.5 QuadPoints specification
+**/
+ bool has_QuadPoints() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadPoints", "", NULL));
+ }
+
SkPdfArray QuadPoints() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "QuadPoints", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMetadataStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfMetadataStreamDictionary_autogen.h
index 22a366298c..d861ef8c8f 100644
--- a/experimental/PdfViewer/SkPdfMetadataStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMetadataStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries in a metadata stream dictionary
class SkPdfMetadataStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMetadataStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfMetadataStreamDictionary& operator=(const SkPdfMetadataStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be Metadata
+ * for a metadata stream.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The type of metadata stream that this dictionary describes; must be
+ * XML.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMovieActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfMovieActionDictionary_autogen.h
index 396cf1e160..32fab6ffb1 100644
--- a/experimental/PdfViewer/SkPdfMovieActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMovieActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a movie action
class SkPdfMovieActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMovieActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfMovieActionDictionary& operator=(const SkPdfMovieActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Movie
+ * for a movie action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Optional) An indirect reference to a movie annotation identifying the movie
+ * to be played.
+**/
+ bool has_Annot() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot", "", NULL));
+ }
+
SkPdfDictionary* Annot() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annot", "", &ret)) return ret;
@@ -535,6 +550,14 @@ public:
return NULL;
}
+/** (Optional) The title of a movie annotation identifying the movie to be
+ * played.
+ * Note: The dictionary must include either an Annot or a T entry, but not both.
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -542,6 +565,21 @@ public:
return "";
}
+/** (Optional) The operation to be performed on the movie:
+ * Play Start playing the movie, using the play mode specified by the
+ * dictionary's Mode entry (see Table 8.79 on page 571). If the
+ * movie is currently paused, it is repositioned to the beginning
+ * before playing (or to the starting point specified by the dic-
+ * tionary's Start entry, if present).
+ * Stop Stop playing the movie.
+ * Pause Pause a playing movie.
+ * Resume Resume a paused movie.
+ * Default value: Play.
+**/
+ bool has_Operation() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Operation", "", NULL));
+ }
+
std::string Operation() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Operation", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMovieActivationDictionary_autogen.h b/experimental/PdfViewer/SkPdfMovieActivationDictionary_autogen.h
index f07cc1a142..d917e5c185 100644
--- a/experimental/PdfViewer/SkPdfMovieActivationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMovieActivationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a movie activation dictionary
class SkPdfMovieActivationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMovieActivationDictionary_SkPdfObjectType;}
@@ -521,6 +522,25 @@ public:
SkPdfMovieActivationDictionary& operator=(const SkPdfMovieActivationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The starting time of the movie segment to be played. Movie time
+ * values are expressed in units of time based on a time scale, which defines the
+ * number of units per second; the default time scale is defined in the movie
+ * data itself. The starting time is nominally a 64-bit integer, specified as follows:
+ * * If it is representable as an integer (subject to the implementation limit for
+ * integers, as described in Appendix C), it should be specified as such.
+ * * If it is not representable as an integer, it should be specified as an 8-byte
+ * string representing a 64-bit twos-complement integer, most significant
+ * byte first.
+ * * If it is expressed in a time scale different from that of the movie itself, it is
+ * represented as an array of two values: an integer or string denoting the
+ * starting time, as above, followed by an integer specifying the time scale in
+ * units per second.
+ * If this entry is omitted, the movie is played from the beginning.
+**/
+ bool has_Start() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start", "", NULL));
+ }
+
SkPdfObject* Start() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start", "", &ret)) return ret;
@@ -528,6 +548,14 @@ public:
return NULL;
}
+/** (Optional) The duration of the movie segment to be played, specified in the
+ * same form as Start. Negative values specify that the movie is to be played
+ * backward. If this entry is omitted, the movie is played to the end.
+**/
+ bool has_Duration() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Duration", "", NULL));
+ }
+
SkPdfObject* Duration() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Duration", "", &ret)) return ret;
@@ -535,6 +563,14 @@ public:
return NULL;
}
+/** (Optional) The initial speed at which to play the movie. If the value of this
+ * entry is negative, the movie is played backward with respect to Start and
+ * Duration. Default value: 1.0.
+**/
+ bool has_Rate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate", "", NULL));
+ }
+
double Rate() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate", "", &ret)) return ret;
@@ -542,6 +578,14 @@ public:
return 0;
}
+/** (Optional) The initial sound volume at which to play the movie, in the range
+ * -1.0 to 1.0. Higher values denote greater volume; negative values mute the
+ * sound. Default value: 1.0.
+**/
+ bool has_Volume() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", NULL));
+ }
+
double Volume() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", &ret)) return ret;
@@ -549,6 +593,13 @@ public:
return 0;
}
+/** (Optional) A flag specifying whether to display a movie controller bar while
+ * playing the movie. Default value: false.
+**/
+ bool has_ShowControls() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowControls", "", NULL));
+ }
+
bool ShowControls() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowControls", "", &ret)) return ret;
@@ -556,6 +607,17 @@ public:
return false;
}
+/** (Optional) The play mode for playing the movie:
+ * Once Play once and stop.
+ * Open Play and leave the movie controller bar open.
+ * Repeat Play repeatedly from beginning to end until stopped.
+ * Palindrome Play continuously forward and backward until stopped.
+ * Default value: Once.
+**/
+ bool has_Mode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode", "", NULL));
+ }
+
std::string Mode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode", "", &ret)) return ret;
@@ -563,6 +625,16 @@ public:
return "";
}
+/** (Optional) A flag specifying whether to play the movie synchronously or
+ * asynchronously. If this value is true, the movie player will retain control until
+ * the movie is completed or dismissed by the user; if false, it will return control
+ * to the viewer application immediately after starting the movie. Default value:
+ * false.
+**/
+ bool has_Synchronous() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous", "", NULL));
+ }
+
bool Synchronous() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous", "", &ret)) return ret;
@@ -570,6 +642,19 @@ public:
return false;
}
+/** (Optional) The magnification (zoom) factor at which to play the movie. The
+ * presence of this entry implies that the movie is to be played in a floating win-
+ * dow; if the entry is absent, it will be played in the annotation rectangle.
+ * The value of the entry is an array of two integers, [numerator denominator],
+ * denoting a rational magnification factor for the movie. The final window
+ * size, in pixels, is
+ * (numerator / denominator) x Aspect
+ * where the value of Aspect is taken from the movie dictionary (see Table 8.79).
+**/
+ bool has_FWScale() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWScale", "", NULL));
+ }
+
SkPdfArray FWScale() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWScale", "", &ret)) return ret;
@@ -577,6 +662,18 @@ public:
return SkPdfArray();
}
+/** (Optional) For floating play windows, the relative position of the window on
+ * the screen. The value is an array of two numbers
+ * [horiz vert]
+ * each in the range 0.0 to 1.0, denoting the relative horizontal and vertical posi-
+ * tion of the movie window with respect to the screen. For example, the value
+ * [0.5 0.5] centers the window on the screen. Default value: [0.5 0.5].
+ * CHAPTER 9
+**/
+ bool has_FWPosition() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPosition", "", NULL));
+ }
+
SkPdfArray FWPosition() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPosition", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfMovieAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfMovieAnnotationDictionary_autogen.h
index 012ed62123..2b200f6068 100644
--- a/experimental/PdfViewer/SkPdfMovieAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMovieAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a movie annotation
class SkPdfMovieAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMovieAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfMovieAnnotationDictionary& operator=(const SkPdfMovieAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Movie
+ * for a movie annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A movie dictionary describing the movie's static characteristics (see
+ * Section 8.8, "Movies").
+**/
+ bool has_Movie() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Movie", "", NULL));
+ }
+
SkPdfDictionary* Movie() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Movie", "", &ret)) return ret;
@@ -535,6 +550,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An alternate representation of the annotation's contents in
+ * human-readable form, useful when extracting the document's contents in sup-
+ * port of accessibility to disabled users or for other purposes (see Section 9.8.2,
+ * "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -542,6 +566,17 @@ public:
return "";
}
+/** (Optional) A flag or dictionary specifying whether and how to play the movie
+ * when the annotation is activated. If this value is a dictionary, it is a movie activa-
+ * tion dictionary (see Section 8.8, "Movies") specifying how to play the movie; if it
+ * is the boolean value true, the movie should be played using default activation
+ * parameters; if it is false, the movie should not be played at all. Default value:
+ * true.
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
bool isAABoolean() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfMovieDictionary_autogen.h b/experimental/PdfViewer/SkPdfMovieDictionary_autogen.h
index a1a6135521..2362b683a0 100644
--- a/experimental/PdfViewer/SkPdfMovieDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMovieDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a movie dictionary
class SkPdfMovieDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kMovieDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfMovieDictionary& operator=(const SkPdfMovieDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) A file specification identifying a self-describing movie file.
+ * Note: The format of a "self-describing movie file" is left unspecified, and there is
+ * no guarantee of portability.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return SkPdfFileSpec();
}
+/** (Optional) The width and height of the movie's bounding box, in pixels,
+ * specified as [width height]. This entry should be omitted for a movie consist-
+ * ing entirely of sound with no visible images.
+**/
+ bool has_Aspect() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Aspect", "", NULL));
+ }
+
SkPdfArray Aspect() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Aspect", "", &ret)) return ret;
@@ -535,6 +552,13 @@ public:
return SkPdfArray();
}
+/** (Optional) The number of degrees by which the movie is rotated clockwise
+ * relative to the page. The value must be a multiple of 90. Default value: 0.
+**/
+ bool has_Rotate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", NULL));
+ }
+
long Rotate() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", &ret)) return ret;
@@ -542,6 +566,16 @@ public:
return 0;
}
+/** (Optional) A flag or stream specifying whether and how to display a poster
+ * image representing the movie. If this value is a stream, it contains an image
+ * XObject (see Section 4.8, "Images") to be displayed as the poster; if it is the
+ * boolean value true, the poster image should be retrieved from the movie file
+ * itself; if it is false, no poster should be displayed. Default value: false.
+**/
+ bool has_Poster() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", NULL));
+ }
+
bool isPosterABoolean() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h b/experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h
index 609e1586b4..2f67bdf098 100644
--- a/experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h
@@ -23,6 +23,10 @@ public:
SkPdfMultiMasterFontDictionary& operator=(const SkPdfMultiMasterFontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfNameDictionary_autogen.h b/experimental/PdfViewer/SkPdfNameDictionary_autogen.h
index 43d4ae28de..154c05924e 100644
--- a/experimental/PdfViewer/SkPdfNameDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfNameDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the name dictionary
class SkPdfNameDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kNameDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfNameDictionary& operator=(const SkPdfNameDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.2) A name tree mapping name strings to destinations (see
+ * "Named Destinations" on page 476).
+**/
+ bool has_Dests() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", NULL));
+ }
+
bool isDestsAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", &ret)) return false;
@@ -547,6 +555,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping name strings to annotation
+ * appearance streams (see Section 8.4.4, "Appearance Streams").
+**/
+ bool has_AP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
+ }
+
bool isAPAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return false;
@@ -573,6 +588,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping name strings to document-level
+ * JavaScript(R) actions (see "JavaScript Actions" on page 556).
+**/
+ bool has_JavaScript() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", NULL));
+ }
+
bool isJavaScriptAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", &ret)) return false;
@@ -599,6 +621,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping name strings to visible pages for
+ * use in interactive forms (see Section 8.6.5, "Named Pages").
+**/
+ bool has_Pages() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
+ }
+
bool isPagesAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return false;
@@ -625,6 +654,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping name strings to invisible (tem-
+ * plate) pages for use in interactive forms (see Section 8.6.5, "Named Pages").
+**/
+ bool has_Templates() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", NULL));
+ }
+
bool isTemplatesAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", &ret)) return false;
@@ -651,6 +687,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping digital identifiers to Web Capture
+ * content sets (see Section 9.9.3, "Content Sets").
+**/
+ bool has_IDS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IDS", "", NULL));
+ }
+
bool isIDSAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IDS", "", &ret)) return false;
@@ -677,6 +720,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A name tree mapping uniform resource locators (URLs)
+ * to Web Capture content sets (see Section 9.9.3, "Content Sets").
+**/
+ bool has_URLS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URLS", "", NULL));
+ }
+
bool isURLSAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URLS", "", &ret)) return false;
@@ -703,6 +753,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A name tree mapping name strings to embedded file
+ * streams (see Section 3.10.3, "Embedded File Streams").
+**/
+ bool has_EmbeddedFiles() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFiles", "", NULL));
+ }
+
bool isEmbeddedFilesAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFiles", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfNameTreeNodeDictionary_autogen.h b/experimental/PdfViewer/SkPdfNameTreeNodeDictionary_autogen.h
index 1b412aa204..f480b4a5d6 100644
--- a/experimental/PdfViewer/SkPdfNameTreeNodeDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfNameTreeNodeDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a name tree node dictionary
class SkPdfNameTreeNodeDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kNameTreeNodeDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfNameTreeNodeDictionary& operator=(const SkPdfNameTreeNodeDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Root and intermediate nodes only; required in intermediate nodes; present in the root node
+ * if and only if Names is not present) An array of indirect references to the immediate chil-
+ * dren of this node. The children may be intermediate or leaf nodes.
+**/
+ bool has_Kids() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
+ }
+
SkPdfArray Kids() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
@@ -528,6 +537,16 @@ public:
return SkPdfArray();
}
+/** (Root and leaf nodes only; required in leaf nodes; present in the root node if and only if Kids
+ * is not present) An array of the form
+ * [key1 value1 key2 value2 ... keyn valuen ]
+ * where each keyi is a string and the corresponding valuei is an indirect reference to the
+ * object associated with that key. The keys are sorted in lexical order, as described below.
+**/
+ bool has_Names() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", NULL));
+ }
+
SkPdfArray Names() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", &ret)) return ret;
@@ -535,6 +554,14 @@ public:
return SkPdfArray();
}
+/** (Intermediate and leaf nodes only; required) An array of two strings, specifying the (lexi-
+ * cally) least and greatest keys included in the Names array of a leaf node or in the Names
+ * arrays of any leaf nodes that are descendants of an intermediate node.
+**/
+ bool has_Limits() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "", NULL));
+ }
+
SkPdfArray Limits() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfNamedActionsDictionary_autogen.h b/experimental/PdfViewer/SkPdfNamedActionsDictionary_autogen.h
index 73dd877444..63ccbe2bd8 100644
--- a/experimental/PdfViewer/SkPdfNamedActionsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfNamedActionsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to named actions
class SkPdfNamedActionsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kNamedActionsDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfNamedActionsDictionary& operator=(const SkPdfNamedActionsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Named for a named
+ * action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The name of the action to be performed (see Table 8.45).
+**/
+ bool has_N() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
+ }
+
std::string N() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfNumberTreeNodeDictionary_autogen.h b/experimental/PdfViewer/SkPdfNumberTreeNodeDictionary_autogen.h
index b11ca9ba4d..083a968a3d 100644
--- a/experimental/PdfViewer/SkPdfNumberTreeNodeDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfNumberTreeNodeDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a number tree node dictionary
class SkPdfNumberTreeNodeDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kNumberTreeNodeDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfNumberTreeNodeDictionary& operator=(const SkPdfNumberTreeNodeDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Root and intermediate nodes only; required in intermediate nodes; present in the root node
+ * if and only if Nums is not present) An array of indirect references to the immediate chil-
+ * dren of this node. The children may be intermediate or leaf nodes.
+**/
+ bool has_Kids() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
+ }
+
SkPdfArray Kids() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
@@ -528,6 +537,17 @@ public:
return SkPdfArray();
}
+/** (Root and leaf nodes only; required in leaf nodes; present in the root node if and only if Kids
+ * is not present) An array of the form
+ * [key1 value1 key2 value2 ... keyn valuen ]
+ * where each keyi is an integer and the corresponding valuei is an indirect reference to the
+ * object associated with that key. The keys are sorted in numerical order, analogously to
+ * the arrangement of keys in a name tree as described in Section 3.8.4, "Name Trees."
+**/
+ bool has_Nums() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Nums", "", NULL));
+ }
+
SkPdfArray Nums() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Nums", "", &ret)) return ret;
@@ -535,6 +555,14 @@ public:
return SkPdfArray();
}
+/** (Intermediate and leaf nodes only; required) An array of two integers, specifying the
+ * (numerically) least and greatest keys included in the Nums array of a leaf node or in the
+ * Nums arrays of any leaf nodes that are descendants of an intermediate node.
+**/
+ bool has_Limits() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "", NULL));
+ }
+
SkPdfArray Limits() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfObjectReferenceDictionary_autogen.h b/experimental/PdfViewer/SkPdfObjectReferenceDictionary_autogen.h
index a7369557e9..de91beeaeb 100644
--- a/experimental/PdfViewer/SkPdfObjectReferenceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfObjectReferenceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an object reference dictionary
class SkPdfObjectReferenceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kObjectReferenceDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfObjectReferenceDictionary& operator=(const SkPdfObjectReferenceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be OBJR for an
+ * object reference.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; must be an indirect reference) The page object representing the page on
+ * which the object is rendered. This entry overrides any Pg entry in the structure ele-
+ * ment containing the object reference; it is required if the structure element has no such
+ * entry.
+**/
+ bool has_Pg() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", NULL));
+ }
+
SkPdfDictionary* Pg() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", &ret)) return ret;
@@ -535,6 +552,12 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) The referenced object.
+**/
+ bool has_Obj() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Obj", "", NULL));
+ }
+
SkPdfObject* Obj() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Obj", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfOpiVersionDictionary_autogen.h b/experimental/PdfViewer/SkPdfOpiVersionDictionary_autogen.h
index 8d5ebef069..3d23d0f1fe 100644
--- a/experimental/PdfViewer/SkPdfOpiVersionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfOpiVersionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry in an OPI version dictionary
class SkPdfOpiVersionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kOpiVersionDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfOpiVersionDictionary& operator=(const SkPdfOpiVersionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required; PDF 1.2) An OPI dictionary specifying the attributes of this proxy
+ * (see Tables 9.50 and 9.51). The key for this entry must be the name 1.3 or 2.0,
+ * identifying the version of OPI to which the proxy corresponds.
+**/
+ bool has_version_number() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "version_number", "", NULL));
+ }
+
SkPdfDictionary* version_number() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "version_number", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfOutlineDictionary_autogen.h b/experimental/PdfViewer/SkPdfOutlineDictionary_autogen.h
index 2f1c007141..1add0b5d6f 100644
--- a/experimental/PdfViewer/SkPdfOutlineDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfOutlineDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the outline dictionary
class SkPdfOutlineDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kOutlineDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfOutlineDictionary& operator=(const SkPdfOutlineDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Outlines for an outline dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required; must be an indirect reference) An outline item dictionary represent-
+ * ing the first top-level item in the outline.
+**/
+ bool has_First() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First", "", NULL));
+ }
+
SkPdfDictionary* First() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return NULL;
}
+/** (Required; must be an indirect reference) An outline item dictionary represent-
+ * ing the last top-level item in the outline.
+**/
+ bool has_Last() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last", "", NULL));
+ }
+
SkPdfDictionary* Last() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last", "", &ret)) return ret;
@@ -542,6 +564,14 @@ public:
return NULL;
}
+/** (Required if the document has any open outline entries) The total number of
+ * open items at all levels of the outline. This entry should be omitted if there
+ * are no open outline items.
+**/
+ bool has_Count() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", NULL));
+ }
+
long Count() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfOutlineItemDictionary_autogen.h b/experimental/PdfViewer/SkPdfOutlineItemDictionary_autogen.h
index 1fc60b6280..4021f0d62a 100644
--- a/experimental/PdfViewer/SkPdfOutlineItemDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfOutlineItemDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in an outline item dictionary
class SkPdfOutlineItemDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kOutlineItemDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfOutlineItemDictionary& operator=(const SkPdfOutlineItemDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The text to be displayed on the screen for this item.
+**/
+ bool has_Title() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", NULL));
+ }
+
std::string Title() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", &ret)) return ret;
@@ -528,6 +535,13 @@ public:
return "";
}
+/** (Required; must be an indirect reference) The parent of this item in the outline
+ * hierarchy. The parent of a top-level item is the outline dictionary itself.
+**/
+ bool has_Parent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
+ }
+
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
@@ -535,6 +549,13 @@ public:
return NULL;
}
+/** (Required for all but the first item at each level; must be an indirect reference)
+ * The previous item at this outline level.
+**/
+ bool has_Prev() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", NULL));
+ }
+
SkPdfDictionary* Prev() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Prev", "", &ret)) return ret;
@@ -542,6 +563,13 @@ public:
return NULL;
}
+/** (Required for all but the last item at each level; must be an indirect reference)
+ * The next item at this outline level.
+**/
+ bool has_Next() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", NULL));
+ }
+
SkPdfDictionary* Next() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return ret;
@@ -549,6 +577,13 @@ public:
return NULL;
}
+/** (Required if the item has any descendants; must be an indirect reference) The
+ * first of this item's immediate children in the outline hierarchy.
+**/
+ bool has_First() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First", "", NULL));
+ }
+
SkPdfDictionary* First() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "First", "", &ret)) return ret;
@@ -556,6 +591,13 @@ public:
return NULL;
}
+/** (Required if the item has any descendants; must be an indirect reference) The
+ * last of this item's immediate children in the outline hierarchy.
+**/
+ bool has_Last() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last", "", NULL));
+ }
+
SkPdfDictionary* Last() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Last", "", &ret)) return ret;
@@ -563,6 +605,15 @@ public:
return NULL;
}
+/** (Required if the item has any descendants) If the item is open, the total num-
+ * ber of its open descendants at all lower levels of the outline hierarchy. If the
+ * item is closed, a negative integer whose absolute value specifies how many
+ * descendants would appear if the item were reopened.
+**/
+ bool has_Count() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", NULL));
+ }
+
long Count() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", &ret)) return ret;
@@ -570,6 +621,14 @@ public:
return 0;
}
+/** (Optional; not permitted if an A entry is present) The destination to be
+ * displayed when this item is activated (see Section 8.2.1, "Destinations"; see
+ * also implementation note 56 in Appendix H).
+**/
+ bool has_Dest() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", NULL));
+ }
+
bool isDestAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
@@ -609,6 +668,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.1; not permitted if a Dest entry is present) The action to be
+ * performed when this item is activated (see Section 8.5, "Actions").
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
SkPdfDictionary* A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
@@ -616,6 +682,18 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3; must be an indirect reference) The structure element to
+ * which the item refers (see Section 9.6.1, "Structure Hierarchy").
+ * Note: The ability to associate an outline item with a structure element (such as
+ * the beginning of a chapter) is a PDF 1.3 feature. For backward compatibility
+ * with earlier PDF versions, such an item should also specify a destination (Dest)
+ * corresponding to an area of a page where the contents of the designated structure
+ * element are displayed.
+**/
+ bool has_SE() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SE", "", NULL));
+ }
+
SkPdfDictionary* SE() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SE", "", &ret)) return ret;
@@ -623,6 +701,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0, repre-
+ * senting the components in the DeviceRGB color space of the color to be used
+ * for the outline entry's text. Default value: [0.0 0.0 0.0].
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfArray C() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
@@ -630,6 +716,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.4) A set of flags specifying style characteristics for display-
+ * ing the outline item's text (see Table 8.5). Default value: 0.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPDF_XOutputIntentDictionary_autogen.h b/experimental/PdfViewer/SkPdfPDF_XOutputIntentDictionary_autogen.h
index 85b469c7db..31fc50300a 100644
--- a/experimental/PdfViewer/SkPdfPDF_XOutputIntentDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPDF_XOutputIntentDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a PDF/X output intent dictionary
class SkPdfPDF_XOutputIntentDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPDF_XOutputIntentDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPDF_XOutputIntentDictionary& operator=(const SkPdfPDF_XOutputIntentDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes;
+ * if present, must be OutputIntent for an output intent dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The output intent subtype; must be GTS_PDFX for a
+ * PDF/X output intent.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +550,15 @@ public:
return "";
}
+/** (Optional) A text string concisely identifying the intended out-
+ * put device or production condition in human-readable form.
+ * This is the preferred method of defining such a string for pre-
+ * sentation to the user.
+**/
+ bool has_OutputCondition() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputCondition", "", NULL));
+ }
+
std::string OutputCondition() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputCondition", "", &ret)) return ret;
@@ -542,6 +566,25 @@ public:
return "";
}
+/** (Required) A string identifying the intended output device or
+ * production condition in human- or machine-readable form. If
+ * human-readable, this string may be used in lieu of an Output-
+ * Condition string for presentation to the user.
+ * A typical value for this entry would be the name of a production
+ * condition maintained in an industry-standard registry such as
+ * the ICC Characterization Data Registry (see the Bibliography). If
+ * the designated condition matches that in effect at production
+ * time, it is the responsibility of the production software to pro-
+ * vide the corresponding ICC profile as defined in the registry.
+ * If the intended production condition is not a recognized
+ * standard, the value Custom is recommended for this entry; the
+ * DestOutputProfile entry defines the ICC profile and the Info
+ * entry is used for further human-readable identification.
+**/
+ bool has_OutputConditionIdentifier() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputConditionIdentifier", "", NULL));
+ }
+
std::string OutputConditionIdentifier() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputConditionIdentifier", "", &ret)) return ret;
@@ -549,6 +592,14 @@ public:
return "";
}
+/** (Optional) A string (conventionally a uniform resource identifi-
+ * er, or URI) identifying the registry in which the condition desig-
+ * nated by OutputConditionIdentifier is defined.
+**/
+ bool has_RegistryName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RegistryName", "", NULL));
+ }
+
std::string RegistryName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RegistryName", "", &ret)) return ret;
@@ -556,6 +607,15 @@ public:
return "";
}
+/** (Required if OutputConditionIdentifier does not specify a standard
+ * production condition; optional otherwise) A human-readable text
+ * string containing additional information or comments about
+ * the intended target device or production condition.
+**/
+ bool has_Info() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
+ }
+
std::string Info() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", &ret)) return ret;
@@ -563,6 +623,23 @@ public:
return "";
}
+/** (Required if OutputConditionIdentifier does not specify a standard
+ * production condition; optional otherwise) An ICC profile stream
+ * defining the transformation from the PDF document's source
+ * colors to output device colorants.
+ * The format of the profile stream is the same as that used in speci-
+ * fying an ICCBased color space (see "ICCBased Color Spaces" on
+ * page 189). The output transformation uses the profile's "from
+ * CIE" information (BToA in ICC terminology); the "to CIE"
+ * (AToB) information can optionally be used to remap source
+ * color values to some other destination color space, such as for
+ * screen preview or hardcopy proofing. (See implementation note
+ * 111 in Appendix H.)
+**/
+ bool has_DestOutputProfile() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DestOutputProfile", "", NULL));
+ }
+
SkPdfStream DestOutputProfile() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DestOutputProfile", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPSXobjectDictionary_autogen.h b/experimental/PdfViewer/SkPdfPSXobjectDictionary_autogen.h
index 157ff866bd..5715f0f94b 100644
--- a/experimental/PdfViewer/SkPdfPSXobjectDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPSXobjectDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a PostScript XObject dictionary
class SkPdfPSXobjectDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPSXobjectDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPSXobjectDictionary& operator=(const SkPdfPSXobjectDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * XObject for a PostScript XObject.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The type of XObject that this dictionary describes; must be PS for a
+ * PostScript XObject.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -535,6 +550,14 @@ public:
return "";
}
+/** (Optional) A stream whose contents are to be used in place of the PostScript
+ * XObject's stream when the target PostScript interpreter is known to support only
+ * LanguageLevel 1.
+**/
+ bool has_Level1() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Level1", "", NULL));
+ }
+
SkPdfStream Level1() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Level1", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPageLabelDictionary_autogen.h b/experimental/PdfViewer/SkPdfPageLabelDictionary_autogen.h
index b3189e1ae7..9fe1462e62 100644
--- a/experimental/PdfViewer/SkPdfPageLabelDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPageLabelDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a page label dictionary
class SkPdfPageLabelDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPageLabelDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPageLabelDictionary& operator=(const SkPdfPageLabelDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * PageLabel for a page label dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,21 @@ public:
return "";
}
+/** (Optional) The numbering style to be used for the numeric portion of each page label:
+ * D Decimal arabic numerals
+ * R Uppercase roman numerals
+ * r Lowercase roman numerals
+ * A Uppercase letters (A to Z for the first 26 pages, AA to ZZ for the next 26, and so on)
+ * a Lowercase letters (a to z for the first 26 pages, aa to zz for the next 26, and so on)
+ * There is no default numbering style; if no S entry is present, page labels will consist solely
+ * of a label prefix with no numeric portion. For example, if the P entry (below) specifies the
+ * label prefix Contents, each page will simply be labeled Contents with no page number. (If
+ * the P entry is also missing or empty, the page label will be an empty string.)
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +558,12 @@ public:
return "";
}
+/** (Optional) The label prefix for page labels in this range.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
std::string P() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
@@ -542,6 +571,14 @@ public:
return "";
}
+/** (Optional) The value of the numeric portion for the first page label in the range. Sub-
+ * sequent pages will be numbered sequentially from this value, which must be greater than
+ * or equal to 1. Default value: 1.
+**/
+ bool has_St() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "St", "", NULL));
+ }
+
long St() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "St", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPageObjectActionsDictionary_autogen.h b/experimental/PdfViewer/SkPdfPageObjectActionsDictionary_autogen.h
index 0e306be9b0..849f12dc72 100644
--- a/experimental/PdfViewer/SkPdfPageObjectActionsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPageObjectActionsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a page object's additional-actions dictionary
class SkPdfPageObjectActionsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPageObjectActionsDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfPageObjectActionsDictionary& operator=(const SkPdfPageObjectActionsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.2) An action to be performed when the page is opened (for example,
+ * when the user navigates to it from the next or previous page or via a link annotation or
+ * outline item). This action is independent of any that may be defined by the Open-
+ * Action entry in the document catalog (see Section 3.6.1, "Document Catalog"), and is
+ * executed after such an action. (See implementation note 72 in Appendix H.)
+**/
+ bool has_O() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
+ }
+
SkPdfDictionary* O() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
@@ -528,6 +539,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) An action to be performed when the page is closed (for example,
+ * when the user navigates to the next or previous page or follows a link annotation or an
+ * outline item). This action applies to the page being closed, and is executed before any
+ * other page is opened. (See implementation note 72 in Appendix H.)
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfDictionary* C() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPageObjectDictionary_autogen.h b/experimental/PdfViewer/SkPdfPageObjectDictionary_autogen.h
index 2248835849..fb7f2889fd 100644
--- a/experimental/PdfViewer/SkPdfPageObjectDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPageObjectDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a page object
class SkPdfPageObjectDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPageObjectDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPageObjectDictionary& operator=(const SkPdfPageObjectDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Page for a page object.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required; must be an indirect reference) The page tree node that is the im-
+ * mediate parent of this page object.
+**/
+ bool has_Parent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
+ }
+
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
@@ -535,6 +550,17 @@ public:
return NULL;
}
+/** (Required if PieceInfo is present; optional otherwise; PDF 1.3) The date and
+ * time (see Section 3.8.2, "Dates") when the page's contents were most re-
+ * cently modified. If a page-piece dictionary (PieceInfo) is present, the
+ * modification date is used to ascertain which of the application data dic-
+ * tionaries that it contains correspond to the current content of the page
+ * (see Section 9.4, "Page-Piece Dictionaries").
+**/
+ bool has_LastModified() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
+ }
+
SkPdfDate LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
@@ -542,6 +568,16 @@ public:
return SkPdfDate();
}
+/** (Required; inheritable) A dictionary containing any resources required by
+ * the page (see Section 3.7.2, "Resource Dictionaries"). If the page requires
+ * no resources, the value of this entry should be an empty dictionary; omit-
+ * ting the entry entirely indicates that the resources are to be inherited from
+ * an ancestor node in the page tree.
+**/
+ bool has_Resources() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", NULL));
+ }
+
SkPdfDictionary* Resources() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", &ret)) return ret;
@@ -549,6 +585,15 @@ public:
return NULL;
}
+/** (Required; inheritable) A rectangle (see Section 3.8.3, "Rectangles"), ex-
+ * pressed in default user space units, defining the boundaries of the physical
+ * medium on which the page is intended to be displayed or printed (see
+ * Section 9.10.1, "Page Boundaries").
+**/
+ bool has_MediaBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MediaBox", "", NULL));
+ }
+
SkRect MediaBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MediaBox", "", &ret)) return ret;
@@ -556,6 +601,17 @@ public:
return SkRect();
}
+/** (Optional; inheritable) A rectangle, expressed in default user space units,
+ * defining the visible region of default user space. When the page is dis-
+ * played or printed, its contents are to be clipped (cropped) to this rectangle
+ * and then imposed on the output medium in some implementation-
+ * defined manner (see Section 9.10.1, "Page Boundaries"). Default value:
+ * the value of MediaBox.
+**/
+ bool has_CropBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
+ }
+
SkRect CropBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", &ret)) return ret;
@@ -563,6 +619,15 @@ public:
return SkRect();
}
+/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
+ * fining the region to which the contents of the page should be clipped
+ * when output in a production environment (see Section 9.10.1, "Page
+ * Boundaries"). Default value: the value of CropBox.
+**/
+ bool has_BleedBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
+ }
+
SkRect BleedBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", &ret)) return ret;
@@ -570,6 +635,14 @@ public:
return SkRect();
}
+/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
+ * fining the intended dimensions of the finished page after trimming (see
+ * Section 9.10.1, "Page Boundaries"). Default value: the value of CropBox.
+**/
+ bool has_TrimBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
+ }
+
SkRect TrimBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", &ret)) return ret;
@@ -577,6 +650,15 @@ public:
return SkRect();
}
+/** (Optional; PDF 1.3) A rectangle, expressed in default user space units, de-
+ * fining the extent of the page's meaningful content (including potential
+ * white space) as intended by the page's creator (see Section 9.10.1, "Page
+ * Boundaries"). Default value: the value of CropBox.
+**/
+ bool has_ArtBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
+ }
+
SkRect ArtBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", &ret)) return ret;
@@ -584,6 +666,16 @@ public:
return SkRect();
}
+/** (Optional) A box color information dictionary specifying the colors and
+ * other visual characteristics to be used in displaying guidelines on the
+ * screen for the various page boundaries (see "Display of Page Boundaries"
+ * on page 679). If this entry is absent, the viewer application should use its
+ * own current default settings.
+**/
+ bool has_BoxColorInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BoxColorInfo", "", NULL));
+ }
+
SkPdfDictionary* BoxColorInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BoxColorInfo", "", &ret)) return ret;
@@ -591,6 +683,23 @@ public:
return NULL;
}
+/** (Optional) A content stream (see Section 3.7.1, "Content Streams") de-
+ * scribing the contents of this page. If this entry is absent, the page is empty.
+ * The value may be either a single stream or an array of streams. If it is an
+ * array, the effect is as if all of the streams in the array were concatenated, in
+ * order, to form a single stream. This allows a program generating a PDF
+ * file to create image objects and other resources as they occur, even though
+ * they interrupt the content stream. The division between streams may
+ * occur only at the boundaries between lexical tokens (see Section 3.1, "Lex-
+ * ical Conventions"), but is unrelated to the page's logical content or orga-
+ * nization. Applications that consume or produce PDF files are not required
+ * to preserve the existing structure of the Contents array. (See implementa-
+ * tion note 22 in Appendix H.)
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
bool isContentsAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return false;
@@ -617,6 +726,14 @@ public:
return SkPdfArray();
}
+/** (Optional; inheritable) The number of degrees by which the page should
+ * be rotated clockwise when displayed or printed. The value must be a mul-
+ * tiple of 90. Default value: 0.
+**/
+ bool has_Rotate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", NULL));
+ }
+
long Rotate() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "", &ret)) return ret;
@@ -624,6 +741,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.4) A group attributes dictionary specifying the attributes
+ * of the page's page group for use in the transparent imaging model (see
+ * Sections 7.3.6, "Page Group," and 7.5.5, "Transparency Group XObjects").
+**/
+ bool has_Group() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", NULL));
+ }
+
SkPdfDictionary* Group() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", &ret)) return ret;
@@ -631,6 +756,13 @@ public:
return NULL;
}
+/** (Optional) A stream object defining the page's thumbnail image (see Sec-
+ * tion 8.2.3, "Thumbnail Images").
+**/
+ bool has_Thumb() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Thumb", "", NULL));
+ }
+
SkPdfStream Thumb() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Thumb", "", &ret)) return ret;
@@ -638,6 +770,15 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.1; recommended if the page contains article beads) An ar-
+ * ray of indirect references to article beads appearing on the page (see Sec-
+ * tion 8.3.2, "Articles"; see also implementation note 23 in Appendix H).
+ * The beads are listed in the array in natural reading order.
+**/
+ bool has_B() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", NULL));
+ }
+
SkPdfArray B() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", &ret)) return ret;
@@ -645,6 +786,16 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.1) The page's display duration (also called its advance
+ * timing): the maximum length of time, in seconds, that the page will be
+ * displayed during presentations before the viewer application automati-
+ * cally advances to the next page (see Section 8.3.3, "Presentations"). By
+ * default, the viewer does not advance automatically.
+**/
+ bool has_Dur() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dur", "", NULL));
+ }
+
double Dur() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dur", "", &ret)) return ret;
@@ -652,6 +803,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.1) A transition dictionary describing the transition effect
+ * to be used when displaying the page during presentations (see Section
+ * 8.3.3, "Presentations").
+**/
+ bool has_Trans() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans", "", NULL));
+ }
+
SkPdfDictionary* Trans() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trans", "", &ret)) return ret;
@@ -659,6 +818,13 @@ public:
return NULL;
}
+/** (Optional) An array of annotation dictionaries representing annotations
+ * associated with the page (see Section 8.4, "Annotations").
+**/
+ bool has_Annots() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", NULL));
+ }
+
SkPdfArray Annots() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", &ret)) return ret;
@@ -666,6 +832,14 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) An additional-actions dictionary defining actions to
+ * be performed when the page is opened or closed (see Section 8.5.2, "Trig-
+ * ger Events"; see also implementation note 24 in Appendix H).
+**/
+ bool has_AA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
+ }
+
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
@@ -673,6 +847,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the page
+ * (see Section 9.2.2, "Metadata Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
@@ -680,6 +861,13 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.3) A page-piece dictionary associated with the page (see
+ * Section 9.4, "Page-Piece Dictionaries").
+**/
+ bool has_PieceInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", NULL));
+ }
+
SkPdfDictionary* PieceInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", &ret)) return ret;
@@ -687,6 +875,14 @@ public:
return NULL;
}
+/** (Required if the page contains structural content items; PDF 1.3) The inte-
+ * ger key of the page's entry in the structural parent tree (see "Finding Struc-
+ * ture Elements from Content Items" on page 600).
+**/
+ bool has_StructParents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", NULL));
+ }
+
long StructParents() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", &ret)) return ret;
@@ -694,6 +890,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.3; indirect reference preferred) The digital identifier of the
+ * page's parent Web Capture content set (see Section 9.9.5, "Object At-
+ * tributes Related to Web Capture").
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
std::string ID() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -701,6 +905,14 @@ public:
return "";
}
+/** (Optional; PDF 1.3) The page's preferred zoom (magnification) factor: the
+ * factor by which it should be scaled to achieve the "natural" display magni-
+ * fication (see Section 9.9.5, "Object Attributes Related to Web Capture").
+**/
+ bool has_PZ() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PZ", "", NULL));
+ }
+
double PZ() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PZ", "", &ret)) return ret;
@@ -708,6 +920,14 @@ public:
return 0;
}
+/** (Optional; PDF 1.3) A separation dictionary containing information need-
+ * ed to generate color separations for the page (see Section 9.10.3, "Separa-
+ * tion Dictionaries").
+**/
+ bool has_SeparationInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationInfo", "", NULL));
+ }
+
SkPdfDictionary* SeparationInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationInfo", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPagePieceDictionary_autogen.h b/experimental/PdfViewer/SkPdfPagePieceDictionary_autogen.h
index f2aec8f262..e59ce8fe70 100644
--- a/experimental/PdfViewer/SkPdfPagePieceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPagePieceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a page-piece dictionary
class SkPdfPagePieceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPagePieceDictionary_SkPdfObjectType;}
@@ -521,10 +522,13 @@ public:
SkPdfPagePieceDictionary& operator=(const SkPdfPagePieceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** ()An application data dictionary (see Table 9.7).
+**/
/*
bool has_[any_application_name_or_well_known_data_type]() const {
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "[any_application_name_or_well_known_data_type]", "", NULL));
}
+
SkPdfDictionary* [any_application_name_or_well_known_data_type]() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "[any_application_name_or_well_known_data_type]", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPageTreeNodeDictionary_autogen.h b/experimental/PdfViewer/SkPdfPageTreeNodeDictionary_autogen.h
index d6cf2a0a97..4c60c6c24a 100644
--- a/experimental/PdfViewer/SkPdfPageTreeNodeDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPageTreeNodeDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Required entries in a page tree node
class SkPdfPageTreeNodeDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPageTreeNodeDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPageTreeNodeDictionary& operator=(const SkPdfPageTreeNodeDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be Pages for
+ * a page tree node.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required except in root node; must be an indirect reference) The page tree node that
+ * is the immediate parent of this one.
+**/
+ bool has_Parent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
+ }
+
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return NULL;
}
+/** (Required) An array of indirect references to the immediate children of this node.
+ * The children may be page objects or other page tree nodes.
+**/
+ bool has_Kids() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
+ }
+
SkPdfArray Kids() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
@@ -542,6 +564,13 @@ public:
return SkPdfArray();
}
+/** (Required) The number of leaf nodes (page objects) that are descendants of this
+ * node within the page tree.
+**/
+ bool has_Count() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", NULL));
+ }
+
long Count() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_autogen.h
index 843b57d2e3..6aeb014fb7 100644
--- a/experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPopUpAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a pop-up annotation
class SkPdfPopUpAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPopUpAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPopUpAnnotationDictionary& operator=(const SkPdfPopUpAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be
+ * Popup for a pop-up annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; PDF 1.4) An alternate representation of the annotation's contents
+ * in human-readable form, useful when extracting the document's contents in
+ * support of accessibility to disabled users or for other purposes (see Section
+ * 9.8.2, "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +552,16 @@ public:
return "";
}
+/** (Optional; must be an indirect reference) The parent annotation with which
+ * this pop-up annotation is associated.
+ * Note: If this entry is present, the parent annotation's Contents, M, C, and T
+ * entries (see Table 8.10 on page 490) override those of the pop-up annotation
+ * itself.
+**/
+ bool has_Parent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
+ }
+
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
@@ -542,6 +569,13 @@ public:
return NULL;
}
+/** (Optional) A flag specifying whether the pop-up annotation should initially
+ * be displayed open. Default value: false (closed).
+**/
+ bool has_Open() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", NULL));
+ }
+
bool Open() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPrinterMarkAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfPrinterMarkAnnotationDictionary_autogen.h
index 240802e3af..af614b95b4 100644
--- a/experimental/PdfViewer/SkPdfPrinterMarkAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPrinterMarkAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a printer's mark annotation
class SkPdfPrinterMarkAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPrinterMarkAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPrinterMarkAnnotationDictionary& operator=(const SkPdfPrinterMarkAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Printer-
+ * Mark for a printer's mark annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Optional) An arbitrary name identifying the type of printer's mark, such as Color-
+ * Bar or RegistrationTarget.
+**/
+ bool has_MN() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MN", "", NULL));
+ }
+
std::string MN() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MN", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfPrinterMarkFormDictionary_autogen.h b/experimental/PdfViewer/SkPdfPrinterMarkFormDictionary_autogen.h
index 113359d41b..9029834ed9 100644
--- a/experimental/PdfViewer/SkPdfPrinterMarkFormDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfPrinterMarkFormDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a printer's mark form dictionary
class SkPdfPrinterMarkFormDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kPrinterMarkFormDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfPrinterMarkFormDictionary& operator=(const SkPdfPrinterMarkFormDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.4) A text string representing the printer's mark in
+ * human-readable form, suitable for presentation to the user on the screen.
+**/
+ bool has_MarkStyle() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkStyle", "", NULL));
+ }
+
std::string MarkStyle() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkStyle", "", &ret)) return ret;
@@ -528,6 +536,17 @@ public:
return "";
}
+/** (Optional; PDF 1.4) A dictionary identifying the individual colorants
+ * associated with a printer's mark such as a color bar. For each entry in this
+ * dictionary, the key is a colorant name and the value is an array defining a
+ * Separation color space for that colorant (see "Separation Color Spaces"
+ * on page 201). The key must match the colorant name given in that color
+ * space.
+**/
+ bool has_Colorants() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", NULL));
+ }
+
SkPdfDictionary* Colorants() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfRadioButtonFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfRadioButtonFieldDictionary_autogen.h
index b0ccbb3331..5b6b0ed2eb 100644
--- a/experimental/PdfViewer/SkPdfRadioButtonFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfRadioButtonFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry specific to a radio button field
class SkPdfRadioButtonFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kRadioButtonFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfRadioButtonFieldDictionary& operator=(const SkPdfRadioButtonFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; inheritable; PDF 1.4) An array of text strings to be used in
+ * place of the V entries for the values of the widget annotations repre-
+ * senting the individual radio buttons. Each element in the array repre-
+ * sents the export value of the corresponding widget annotation in the
+ * Kids array of the radio button field.
+**/
+ bool has_Opt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
+ }
+
SkPdfArray Opt() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfReferenceDictionary_autogen.h b/experimental/PdfViewer/SkPdfReferenceDictionary_autogen.h
index 33226c0271..d84896256c 100644
--- a/experimental/PdfViewer/SkPdfReferenceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfReferenceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a reference dictionary
class SkPdfReferenceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kReferenceDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfReferenceDictionary& operator=(const SkPdfReferenceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The file containing the target document.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -528,6 +535,16 @@ public:
return SkPdfFileSpec();
}
+/** (Required) A page index or page label (see Section 8.3.1, "Page Labels")
+ * identifying the page of the target document containing the content to be
+ * imported. Note that the reference is a weak one and can be inadvertently in-
+ * validated if the referenced page is changed or replaced in the target document
+ * after the reference is created.
+**/
+ bool has_Page() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", NULL));
+ }
+
bool isPageAInteger() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", &ret)) return false;
@@ -554,6 +571,15 @@ public:
return "";
}
+/** (Optional) An array of two strings constituting a file identifier (see Section 9.3,
+ * "File Identifiers") for the file containing the target document. The use of this
+ * entry improves a viewer application's chances of finding the intended file and
+ * allows it to warn the user if the file has changed since the reference was created.
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
SkPdfArray ID() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_autogen.h
index 53ead2c452..7471ba53ba 100644
--- a/experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfRemoteGoToActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a remote go-to action
class SkPdfRemoteGoToActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kRemoteGoToActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfRemoteGoToActionDictionary& operator=(const SkPdfRemoteGoToActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be GoToR
+ * for a remote go-to action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The file in which the destination is located.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +549,16 @@ public:
return SkPdfFileSpec();
}
+/** (Required) The destination to jump to (see Section 8.2.1, "Destinations"). If
+ * the value is an array defining an explicit destination (as described under
+ * "Explicit Destinations" on page 474), its first element must be a page number
+ * within the remote document rather than an indirect reference to a page ob-
+ * ject in the current document. The first page is numbered 0.
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
bool isDAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
@@ -574,6 +598,16 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) A flag specifying whether to open the destination docu-
+ * ment in a new window. If this flag is false, the destination document will
+ * replace the current document in the same window. If this entry is absent,
+ * the viewer application should behave in accordance with the current user
+ * preference.
+**/
+ bool has_NewWindow() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", NULL));
+ }
+
bool NewWindow() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfResetFormActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfResetFormActionDictionary_autogen.h
index b454f09afb..529fa83e44 100644
--- a/experimental/PdfViewer/SkPdfResetFormActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfResetFormActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a reset-form action
class SkPdfResetFormActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kResetFormActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfResetFormActionDictionary& operator=(const SkPdfResetFormActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be
+ * ResetForm for a reset-form action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,19 @@ public:
return "";
}
+/** (Optional) An array identifying which fields to reset or which to exclude
+ * from resetting, depending on the setting of the Include/Exclude flag in
+ * the Flags entry (see Table 8.64). Each element of the array is either an in-
+ * direct reference to a field dictionary or (PDF 1.3) a string representing
+ * the fully qualified name of a field. Elements of both kinds may be mixed
+ * in the same array.
+ * If this entry is omitted, the Include/Exclude flag is ignored; all fields in
+ * the document's interactive form are reset.
+**/
+ bool has_Fields() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
+ }
+
SkPdfArray Fields() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
@@ -535,6 +556,13 @@ public:
return SkPdfArray();
}
+/** (Optional; inheritable) A set of flags specifying various characteristics of
+ * the action (see Table 8.64). Default value: 0.
+**/
+ bool has_Flags() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", NULL));
+ }
+
long Flags() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfResourceDictionary_autogen.h b/experimental/PdfViewer/SkPdfResourceDictionary_autogen.h
index 4bb3c94c4b..6bed6c0af7 100644
--- a/experimental/PdfViewer/SkPdfResourceDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfResourceDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a resource dictionary
class SkPdfResourceDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kResourceDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfResourceDictionary& operator=(const SkPdfResourceDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A dictionary mapping resource names to graphics state parameter
+ * dictionaries (see Section 4.3.4, "Graphics State Parameter Dictionaries").
+**/
+ bool has_ExtGState() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGState", "", NULL));
+ }
+
SkPdfDictionary* ExtGState() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGState", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return NULL;
}
+/** (Optional) A dictionary mapping each resource name to either the name of a
+ * device-dependent color space or an array describing a color space (see Sec-
+ * tion 4.5, "Color Spaces").
+**/
+ bool has_ColorSpace() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", NULL));
+ }
+
SkPdfDictionary* ColorSpace() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", &ret)) return ret;
@@ -535,6 +551,13 @@ public:
return NULL;
}
+/** (Optional) A dictionary mapping resource names to pattern objects (see Sec-
+ * tion 4.6, "Patterns").
+**/
+ bool has_Pattern() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pattern", "", NULL));
+ }
+
SkPdfDictionary* Pattern() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pattern", "", &ret)) return ret;
@@ -542,6 +565,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.3) A dictionary mapping resource names to shading dic-
+ * tionaries (see "Shading Dictionaries" on page 233).
+**/
+ bool has_Shading() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shading", "", NULL));
+ }
+
SkPdfDictionary* Shading() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shading", "", &ret)) return ret;
@@ -549,6 +579,13 @@ public:
return NULL;
}
+/** (Optional) A dictionary mapping resource names to external objects (see Sec-
+ * tion 4.7, "External Objects").
+**/
+ bool has_XObject() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObject", "", NULL));
+ }
+
SkPdfDictionary* XObject() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "XObject", "", &ret)) return ret;
@@ -556,6 +593,13 @@ public:
return NULL;
}
+/** (Optional) A dictionary mapping resource names to font dictionaries (see
+ * Chapter 5).
+**/
+ bool has_Font() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font", "", NULL));
+ }
+
SkPdfDictionary* Font() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font", "", &ret)) return ret;
@@ -563,6 +607,13 @@ public:
return NULL;
}
+/** (Optional) An array of predefined procedure set names (see Section 9.1,
+ * "Procedure Sets").
+**/
+ bool has_ProcSet() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcSet", "", NULL));
+ }
+
SkPdfArray ProcSet() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ProcSet", "", &ret)) return ret;
@@ -570,6 +621,13 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) A dictionary mapping resource names to property list
+ * dictionaries for marked content (see Section 9.5.1, "Property Lists").
+**/
+ bool has_Properties() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Properties", "", NULL));
+ }
+
SkPdfDictionary* Properties() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Properties", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfRubberStampAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfRubberStampAnnotationDictionary_autogen.h
index d578054021..ec7a746bce 100644
--- a/experimental/PdfViewer/SkPdfRubberStampAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfRubberStampAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a rubber stamp annotation
class SkPdfRubberStampAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kRubberStampAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfRubberStampAnnotationDictionary& operator=(const SkPdfRubberStampAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Stamp
+ * for a rubber stamp annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annotation
+ * is opened. Carriage returns may be used to separate the text into paragraphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +550,22 @@ public:
return "";
}
+/** (Optional) The name of an icon to be used in displaying the annotation. Viewer
+ * applications should provide predefined icon appearances for at least the follow-
+ * ing standard names:
+ * Approved Experimental NotApproved
+ * AsIs Expired NotForPublicRelease
+ * Confidential Final Sold
+ * Departmental ForComment TopSecret
+ * Draft ForPublicRelease
+ * Additional names may be supported as well. Default value: Draft.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams."
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSeparationDictionary_autogen.h b/experimental/PdfViewer/SkPdfSeparationDictionary_autogen.h
index 28dccb1074..d8dc459047 100644
--- a/experimental/PdfViewer/SkPdfSeparationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSeparationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a separation dictionary
class SkPdfSeparationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSeparationDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfSeparationDictionary& operator=(const SkPdfSeparationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of indirect references to page objects representing separa-
+ * tions of the same document page. One of the page objects in the array must be
+ * the one with which this separation dictionary is associated, and all of them must
+ * have separation dictionaries (SeparationInfo entries) containing Pages arrays
+ * identical to this one.
+**/
+ bool has_Pages() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
+ }
+
SkPdfArray Pages() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
@@ -528,6 +539,13 @@ public:
return SkPdfArray();
}
+/** (Required) The name of the device colorant to be used in rendering this
+ * separation, such as Cyan or PANTONE 35 CV.
+**/
+ bool has_DeviceColorant() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DeviceColorant", "", NULL));
+ }
+
bool isDeviceColorantAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DeviceColorant", "", &ret)) return false;
@@ -554,6 +572,21 @@ public:
return "";
}
+/** (Optional) An array defining a Separation or DeviceN color space (see "Separa-
+ * tion Color Spaces" on page 201 and "DeviceN Color Spaces" on page 205). This
+ * provides additional information about the color specified by DeviceColorant-
+ * in particular, the alternate color space and tint transformation function that
+ * would be used to represent the colorant as a process color. This information
+ * enables a viewer application to preview the separation in a color that approxi-
+ * mates the device colorant.
+ * The value of DeviceColorant must match the space's colorant name (if it is a
+ * Separation space) or be one of the space's colorant names (if it is a DeviceN
+ * space).
+**/
+ bool has_ColorSpace() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", NULL));
+ }
+
SkPdfArray ColorSpace() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfShadingDictionary_autogen.h
index cf0e871a57..01e62ff571 100644
--- a/experimental/PdfViewer/SkPdfShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all shading dictionaries
class SkPdfShadingDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kShadingDictionary_SkPdfObjectType;}
@@ -503,6 +504,19 @@ public:
SkPdfShadingDictionary& operator=(const SkPdfShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The shading type:
+ * 1 Function-based shading
+ * 2 Axial shading
+ * 3 Radial shading
+ * 4 Free-form Gouraud-shaded triangle mesh
+ * 5 Lattice-form Gouraud-shaded triangle mesh
+ * 6 Coons patch mesh
+ * 7 Tensor-product patch mesh
+**/
+ bool has_ShadingType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShadingType", "", NULL));
+ }
+
long ShadingType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShadingType", "", &ret)) return ret;
@@ -510,6 +524,14 @@ public:
return 0;
}
+/** (Required) The color space in which color values are expressed. This may be
+ * any device, CIE-based, or special color space except a Pattern space. See
+ * "Color Space: Special Considerations," below, for further information.
+**/
+ bool has_ColorSpace() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", NULL));
+ }
+
bool isColorSpaceAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorSpace", "", &ret)) return false;
@@ -536,6 +558,20 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of color components appropriate to the color space,
+ * specifying a single background color value. If present, this color is used be-
+ * fore any painting operation involving the shading, to fill those portions of the
+ * area to be painted that lie outside the bounds of the shading object itself. In
+ * the opaque imaging model, the effect is as if the painting operation were
+ * performed twice: first with the background color and then again with the
+ * shading.
+ * Note: The background color is applied only when the shading is used as part of a
+ * shading pattern, not when it is painted directly with the sh operator.
+**/
+ bool has_Background() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Background", "", NULL));
+ }
+
SkPdfArray Background() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Background", "", &ret)) return ret;
@@ -543,6 +579,17 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of four numbers giving the left, bottom, right, and top
+ * coordinates, respectively, of the shading's bounding box. The coordinates are
+ * interpreted in the shading's target coordinate space. If present, this bounding
+ * box is applied as a temporary clipping boundary when the shading is painted,
+ * in addition to the current clipping path and any other clipping boundaries in
+ * effect at that time.
+**/
+ bool has_BBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
+ }
+
SkRect BBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
@@ -550,6 +597,20 @@ public:
return SkRect();
}
+/** (Optional) A flag indicating whether to filter the shading function to prevent
+ * aliasing artifacts. The shading operators sample shading functions at a rate
+ * determined by the resolution of the output device. Aliasing can occur if the
+ * function is not smooth-that is, if it has a high spatial frequency relative to
+ * the sampling rate. Anti-aliasing can be computationally expensive and is usu-
+ * ally unnecessary, since most shading functions are smooth enough, or are
+ * sampled at a high enough frequency, to avoid aliasing effects. Anti-aliasing
+ * may not be implemented on some output devices, in which case this flag is
+ * ignored. Default value: false.
+**/
+ bool has_AntiAlias() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AntiAlias", "", NULL));
+ }
+
bool AntiAlias() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AntiAlias", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSignatureDictionary_autogen.h b/experimental/PdfViewer/SkPdfSignatureDictionary_autogen.h
index 80eb1926f0..994c6ff385 100644
--- a/experimental/PdfViewer/SkPdfSignatureDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSignatureDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a signature dictionary
class SkPdfSignatureDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSignatureDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSignatureDictionary& operator=(const SkPdfSignatureDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Sig for a signature dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Required; inheritable) The name of the signature handler to be used for
+ * authenticating the field's contents, such as Adobe.PPKLite, Entrust.PPKEF,
+ * CICI.SignIt, or VeriSign.PPKVS.
+**/
+ bool has_Filter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
+ }
+
std::string Filter() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
@@ -535,6 +551,12 @@ public:
return "";
}
+/** (Optional) The name of a specific submethod of the specified handler.
+**/
+ bool has_SubFilter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFilter", "", NULL));
+ }
+
std::string SubFilter() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFilter", "", &ret)) return ret;
@@ -542,6 +564,15 @@ public:
return "";
}
+/** (Required) An array of pairs of integers (starting byte offset, length in bytes)
+ * describing the exact byte range for the digest calculation. Multiple discontig-
+ * uous byte ranges may be used to describe a digest that does not include the
+ * signature token itself.
+**/
+ bool has_ByteRange() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteRange", "", NULL));
+ }
+
SkPdfArray ByteRange() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteRange", "", &ret)) return ret;
@@ -549,6 +580,12 @@ public:
return SkPdfArray();
}
+/** (Required) The encrypted signature token.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -556,6 +593,12 @@ public:
return "";
}
+/** (Optional) The name of the person or authority signing the document.
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -563,6 +606,14 @@ public:
return "";
}
+/** (Optional) The time of signing. Depending on the signature handler, this
+ * may be a normal unverified computer time or a time generated in a verifiable
+ * way from a secure time server.
+**/
+ bool has_M() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", NULL));
+ }
+
SkPdfDate M() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
@@ -570,6 +621,12 @@ public:
return SkPdfDate();
}
+/** (Optional) The CPU host name or physical location of the signing.
+**/
+ bool has_Location() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Location", "", NULL));
+ }
+
std::string Location() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Location", "", &ret)) return ret;
@@ -577,6 +634,12 @@ public:
return "";
}
+/** (Optional) The reason for the signing, such as (I agree...).
+**/
+ bool has_Reason() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reason", "", NULL));
+ }
+
std::string Reason() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reason", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h b/experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h
index 0b516b798c..43ebc8c171 100644
--- a/experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a soft-mask dictionary
class SkPdfSoftMaskDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSoftMaskDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSoftMaskDictionary& operator=(const SkPdfSoftMaskDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Mask for a soft-mask dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,18 @@ public:
return "";
}
+/** (Required) A subtype specifying the method to be used in deriving the mask
+ * values from the transparency group specified by the G entry:
+ * Alpha Use the group's computed alpha, disregarding its color (see
+ * Section 7.4.1, "Deriving a Soft Mask from Group Alpha").
+ * Luminosity Convert the group's computed color to a single-component
+ * luminosity value (see Section 7.4.2, "Deriving a Soft Mask
+ * from Group Luminosity").
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +555,16 @@ public:
return "";
}
+/** (Required) A transparency group XObject (see Section 7.5.5, "Transparency
+ * Group XObjects") to be used as the source of alpha or color values for deriv-
+ * ing the mask. If the subtype S is Luminosity, the group attributes dictionary
+ * must contain a CS entry defining the color space in which the compositing
+ * computation is to be performed.
+**/
+ bool has_G() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "G", "", NULL));
+ }
+
SkPdfStream G() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "G", "", &ret)) return ret;
@@ -542,6 +572,18 @@ public:
return SkPdfStream();
}
+/** (Optional) An array of component values specifying the color to be used as
+ * the backdrop against which to composite the transparency group XObject G.
+ * This entry is consulted only if the subtype S is Luminosity. The array consists
+ * of n numbers, where n is the number of components in the color space speci-
+ * fied by the CS entry in the group attributes dictionary (see Section 7.5.5,
+ * "Transparency Group XObjects"). Default value: the color space's initial
+ * value, representing black.
+**/
+ bool has_BC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
+ }
+
SkPdfArray BC() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", &ret)) return ret;
@@ -549,6 +591,19 @@ public:
return SkPdfArray();
}
+/** (Optional) A function object (see Section 3.9, "Functions") specifying the
+ * transfer function to be used in deriving the mask values. The function ac-
+ * cepts one input, the computed group alpha or luminosity (depending on the
+ * value of the subtype S), and returns one output, the resulting mask value.
+ * Both the input and output must be in the range 0.0 to 1.0; if the computed
+ * output falls outside this range, it is forced to the nearest valid value. The
+ * name Identity may be specified in place of a function object to designate the
+ * identity function. Default value: Identity.
+**/
+ bool has_TR() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", NULL));
+ }
+
bool isTRAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfSoftMaskImageDictionary_autogen.h b/experimental/PdfViewer/SkPdfSoftMaskImageDictionary_autogen.h
index bc20f9dda5..d2122b11b6 100644
--- a/experimental/PdfViewer/SkPdfSoftMaskImageDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSoftMaskImageDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry in a soft-mask image dictionary
class SkPdfSoftMaskImageDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSoftMaskImageDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfSoftMaskImageDictionary& operator=(const SkPdfSoftMaskImageDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; PDF 1.4) An array of component values specifying the matte color with
+ * which the image data in the parent image has been preblended. The array consists of n
+ * numbers, where n is the number of components in the color space specified by the
+ * ColorSpace entry in the parent image's image dictionary; the numbers must be valid
+ * color components in that color space. If this entry is absent, the image data is not pre-
+ * blended.
+**/
+ bool has_Matte() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matte", "", NULL));
+ }
+
SkPdfArray Matte() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matte", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h
index 2acc411f5e..83e3194ec6 100644
--- a/experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a sound action
class SkPdfSoundActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSoundActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSoundActionDictionary& operator=(const SkPdfSoundActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Sound
+ * for a sound action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A sound object defining the sound to be played (see Section 8.7,
+ * "Sounds"; see also implementation note 76 in Appendix H).
+**/
+ bool has_Sound() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "", NULL));
+ }
+
SkPdfStream Sound() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "", &ret)) return ret;
@@ -535,6 +550,14 @@ public:
return SkPdfStream();
}
+/** (Optional) The volume at which to play the sound, in the range -1.0 to 1.0.
+ * Higher values denote greater volume; negative values mute the sound.
+ * Default value: 1.0.
+**/
+ bool has_Volume() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", NULL));
+ }
+
double Volume() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", &ret)) return ret;
@@ -542,6 +565,15 @@ public:
return 0;
}
+/** (Optional) A flag specifying whether to play the sound synchronously or
+ * asynchronously. If this flag is true, the viewer application will retain control,
+ * allowing no further user interaction other than canceling the sound, until the
+ * sound has been completely played. Default value: false.
+**/
+ bool has_Synchronous() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous", "", NULL));
+ }
+
bool Synchronous() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous", "", &ret)) return ret;
@@ -549,6 +581,13 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to repeat the sound indefinitely. If this
+ * entry is present, the Synchronous entry is ignored. Default value: false.
+**/
+ bool has_Repeat() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repeat", "", NULL));
+ }
+
bool Repeat() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repeat", "", &ret)) return ret;
@@ -556,6 +595,15 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to mix this sound with any other sound
+ * already playing. If this flag is false, any previously playing sound will be
+ * stopped before starting this sound; this can be used to stop a repeating sound
+ * (see Repeat, above). Default value: false.
+**/
+ bool has_Mix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", NULL));
+ }
+
bool Mix() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSoundAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfSoundAnnotationDictionary_autogen.h
index 84fbf464af..1cb53527e3 100644
--- a/experimental/PdfViewer/SkPdfSoundAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSoundAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a sound annotation
class SkPdfSoundAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSoundAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSoundAnnotationDictionary& operator=(const SkPdfSoundAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Sound
+ * for a sound annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A sound object defining the sound to be played when the annotation
+ * is activated (see Section 8.7, "Sounds").
+**/
+ bool has_Sound() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "", NULL));
+ }
+
SkPdfStream Sound() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "", &ret)) return ret;
@@ -535,6 +550,15 @@ public:
return SkPdfStream();
}
+/** (Optional) Text to be displayed in a pop-up window for the annotation in place
+ * of the sound, useful when extracting the document's contents in support of
+ * accessibility to disabled users or for other purposes (see Section 9.8.2, "Alternate
+ * Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -542,6 +566,17 @@ public:
return "";
}
+/** (Optional) The name of an icon to be used in displaying the annotation. Viewer
+ * applications should provide predefined icon appearances for at least the stan-
+ * dard names Speaker and Microphone; additional names may be supported as
+ * well. Default value: Speaker.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams."
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSoundObjectDictionary_autogen.h b/experimental/PdfViewer/SkPdfSoundObjectDictionary_autogen.h
index 0b71158e2c..358688cb06 100644
--- a/experimental/PdfViewer/SkPdfSoundObjectDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSoundObjectDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a sound object
class SkPdfSoundObjectDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSoundObjectDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSoundObjectDictionary& operator=(const SkPdfSoundObjectDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * Sound for a sound object.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The sampling rate, in samples per second.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
double R() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
@@ -535,6 +549,13 @@ public:
return 0;
}
+/** (Optional) The number of sound channels. Default value: 1. (See implementation
+ * note 101 in Appendix H.)
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
long C() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
@@ -542,6 +563,12 @@ public:
return 0;
}
+/** (Optional) The number of bits per sample value per channel. Default value: 8.
+**/
+ bool has_B() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", NULL));
+ }
+
long B() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", &ret)) return ret;
@@ -549,6 +576,17 @@ public:
return 0;
}
+/** (Optional) The encoding format for the sample data:
+ * Raw Unspecified or unsigned values in the range 0 to 2B - 1
+ * Signed Twos-complement values
+ * muLaw mu-law'encoded samples
+ * ALaw A-law'encoded samples
+ * Default value: Raw.
+**/
+ bool has_E() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
+ }
+
std::string E() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &ret)) return ret;
@@ -556,6 +594,16 @@ public:
return "";
}
+/** (Optional) The sound compression format used on the sample data. (Note that this is
+ * separate from any stream compression specified by the sound object's Filter entry; see
+ * Table 3.4 on page 38 and Section 3.3, "Filters.") If this entry is absent, then no sound
+ * compression has been used; the data contains sampled waveforms to be played at R
+ * samples per second per channel.
+**/
+ bool has_CO() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", NULL));
+ }
+
std::string CO() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", &ret)) return ret;
@@ -563,6 +611,14 @@ public:
return "";
}
+/** (Optional) Optional parameters specific to the sound compression format used.
+ * Note: At the time of publication, no standard values have been defined for the CO and CP
+ * entries.
+**/
+ bool has_CP() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CP", "", NULL));
+ }
+
SkPdfObject* CP() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CP", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSourceInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfSourceInformationDictionary_autogen.h
index 52d04be2b3..af723cbb8b 100644
--- a/experimental/PdfViewer/SkPdfSourceInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSourceInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a source information dictionary
class SkPdfSourceInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSourceInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSourceInformationDictionary& operator=(const SkPdfSourceInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) A string or URL alias dictionary (see "URL Alias Dictionaries," below)
+ * identifying the URLs from which the source data was retrieved.
+**/
+ bool has_AU() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", NULL));
+ }
+
bool isAUAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return false;
@@ -547,6 +555,13 @@ public:
return NULL;
}
+/** (Optional) A time stamp giving the most recent date and time at which the content
+ * set's contents were known to be up to date with the source data.
+**/
+ bool has_TS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", NULL));
+ }
+
SkPdfDate TS() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &ret)) return ret;
@@ -554,6 +569,13 @@ public:
return SkPdfDate();
}
+/** (Optional) An expiration stamp giving the date and time at which the content set's
+ * contents should be considered out of date with the source data.
+**/
+ bool has_E() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
+ }
+
SkPdfDate E() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &ret)) return ret;
@@ -561,6 +583,18 @@ public:
return SkPdfDate();
}
+/** (Optional) A code indicating the type of form submission, if any, by which the source
+ * data was accessed (see "Submit-Form Actions" on page 550):
+ * 0 Not accessed via a form submission
+ * 1 Accessed via an HTTP GET request
+ * 2 Accessed via an HTTP POST request
+ * This entry should be present only in source information dictionaries associated with
+ * page sets. Default value: 0.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
long S() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -568,6 +602,15 @@ public:
return 0;
}
+/** (Optional; must be an indirect reference) A command dictionary (see "Command Dic-
+ * tionaries" on page 672) describing the command that caused the source data to be
+ * retrieved. This entry should be present only in source information dictionaries associ-
+ * ated with page sets.
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfDictionary* C() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSquareOrCircleAnnotation_autogen.h b/experimental/PdfViewer/SkPdfSquareOrCircleAnnotation_autogen.h
index d135dd87ff..89a800f10e 100644
--- a/experimental/PdfViewer/SkPdfSquareOrCircleAnnotation_autogen.h
+++ b/experimental/PdfViewer/SkPdfSquareOrCircleAnnotation_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a square or circle annotation
class SkPdfSquareOrCircleAnnotation : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSquareOrCircleAnnotation_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSquareOrCircleAnnotation& operator=(const SkPdfSquareOrCircleAnnotation& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Square
+ * or Circle for a square or circle annotation, respectively.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annotation
+ * is opened. Carriage returns may be used to separate the text into paragraphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +550,16 @@ public:
return "";
}
+/** (Optional) A border style dictionary (see Table 8.12 on page 495) specifying the
+ * line width and dash pattern to be used in drawing the rectangle or ellipse.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * Rect and BS entries; see Table 8.10 on page 490 and Section 8.4.4, "Appearance
+ * Streams."
+**/
+ bool has_BS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
+ }
+
SkPdfDictionary* BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
@@ -542,6 +567,15 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) An array of three numbers in the range 0.0 to 1.0 specifying
+ * the components, in the DeviceRGB color space, of the interior color with which to
+ * fill the annotation's rectangle or ellipse (see Table 8.19). If this entry is absent,
+ * the interior of the annotation is left transparent.
+**/
+ bool has_IC() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", NULL));
+ }
+
SkPdfArray IC() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IC", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfStandardSecurityHandlerDictionary_autogen.h b/experimental/PdfViewer/SkPdfStandardSecurityHandlerDictionary_autogen.h
index 4537479bf1..1cf0d6543e 100644
--- a/experimental/PdfViewer/SkPdfStandardSecurityHandlerDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStandardSecurityHandlerDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional encryption dictionary entries for the standard security handler
class SkPdfStandardSecurityHandlerDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStandardSecurityHandlerDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfStandardSecurityHandlerDictionary& operator=(const SkPdfStandardSecurityHandlerDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) A number specifying which revision of the standard security handler should
+ * be used to interpret this dictionary. The revision number should be 2 if the document is
+ * encrypted with a V value less than 2 (see Table 3.13) and does not have any of the access
+ * permissions set (via the P entry, below) that are designated "Revision 3" in Table 3.15;
+ * otherwise (that is, if the document is encrypted with a V value greater than 2 or has any
+ * "Revision 3" access permissions set), this value should be 3.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
double R() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
@@ -528,6 +540,15 @@ public:
return 0;
}
+/** (Required) A 32-byte string, based on both the owner and user passwords, that is used in
+ * computing the encryption key and in determining whether a valid owner password was
+ * entered. For more information, see "Encryption Key Algorithm" on page 78 and "Pass-
+ * word Algorithms" on page 79.
+**/
+ bool has_O() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
+ }
+
std::string O() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
@@ -535,6 +556,14 @@ public:
return "";
}
+/** (Required) A 32-byte string, based on the user password, that is used in determining
+ * whether to prompt the user for a password and, if so, whether a valid user or owner pass-
+ * word was entered. For more information, see "Password Algorithms" on page 79.
+**/
+ bool has_U() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", NULL));
+ }
+
std::string U() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &ret)) return ret;
@@ -542,6 +571,13 @@ public:
return "";
}
+/** (Required) A set of flags specifying which operations are permitted when the document is
+ * opened with user access (see Table 3.15).
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
long P() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfStandardStructureDictionary_autogen.h b/experimental/PdfViewer/SkPdfStandardStructureDictionary_autogen.h
index eac8eefd9a..2899804539 100644
--- a/experimental/PdfViewer/SkPdfStandardStructureDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStandardStructureDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Standard layout attributes common to all standard structure types
class SkPdfStandardStructureDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStandardStructureDictionary_SkPdfObjectType;}
@@ -521,6 +522,50 @@ public:
SkPdfStandardStructureDictionary& operator=(const SkPdfStandardStructureDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The positioning of the element with respect to the enclosing refer-
+ * ence area and other content:
+ * Block Stacked in the block-progression direction within an enclos-
+ * ing reference area or parent BLSE.
+ * Inline Packed in the inline-progression direction within an enclos-
+ * ing BLSE.
+ * Before Placed so that the before edge of the element's allocation rec-
+ * tangle (see "Content and Allocation Rectangles" on page
+ * 648) coincides with that of the nearest enclosing reference
+ * area. The element may float, if necessary, to achieve the speci-
+ * fied placement (see note below). The element is treated as a
+ * block occupying the full extent of the enclosing reference
+ * area in the inline direction; other content is stacked so as to
+ * begin at the after edge of the element's allocation rectangle.
+ * Start Placed so that the start edge of the element's allocation rec-
+ * tangle (see "Content and Allocation Rectangles" on page
+ * 648) coincides with that of the nearest enclosing reference
+ * area. The element may float, if necessary, to achieve the speci-
+ * fied placement (see note below). Other content that would
+ * intrude into the element's allocation rectangle is laid out as a
+ * runaround.
+ * End Placed so that the end edge of the element's allocation rec-
+ * tangle (see "Content and Allocation Rectangles" on page
+ * 648) coincides with that of the nearest enclosing reference
+ * area. The element may float, if necessary, to achieve the speci-
+ * fied placement (see note below). Other content that would
+ * intrude into the element's allocation rectangle is laid out as a
+ * runaround.
+ * When applied to an ILSE, any value except Inline causes the element to be
+ * treated as a BLSE instead. Default value: Inline.
+ * Note: Elements with Placement values of Before, Start, or End are removed from
+ * the normal stacking or packing process and allowed to "float" to the specified
+ * edge of the enclosing reference area or parent BLSE. Multiple such floating ele-
+ * ments may be positioned adjacent to one another against the specified edge of the
+ * reference area, or placed serially against the edge, in the order encountered.
+ * Complex cases such as floating elements that interfere with each other or do not
+ * fit on the same page may be handled differently by different layout applications;
+ * Tagged PDF merely identifies the elements as floating and indicates their desired
+ * placement.
+**/
+ bool has_Placement() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Placement", "", NULL));
+ }
+
std::string Placement() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Placement", "", &ret)) return ret;
@@ -528,6 +573,35 @@ public:
return "";
}
+/** (Optional) The directions of layout progression for packing of ILSEs (inline
+ * progression) and stacking of BLSEs (block progression):
+ * LrTb Inline progression from left to right; block progression from
+ * top to bottom. This is the typical writing mode for Western
+ * writing systems.
+ * RlTb Inline progression from right to left; block progression from
+ * top to bottom. This is the typical writing mode for Arabic
+ * and Hebrew writing systems.
+ * TbRl Inline progression from top to bottom; block progression
+ * from right to left. This is the typical writing mode for Chi-
+ * nese and Japanese writing systems.
+ * The specified layout directions apply to the given structure element and all of
+ * its descendants to any level of nesting. Default value: LrTb.
+ * For elements that produce multiple columns, the writing mode defines the
+ * direction of column progression within the reference area: the inline direc-
+ * tion determines the stacking direction for columns and the default flow
+ * order of text from column to column. For tables, the writing mode controls
+ * the layout of rows and columns: table rows (structure type TR) are stacked
+ * in the block direction, cells within a row (structure type TD) in the inline
+ * direction.
+ * Note: The inline-progression direction specified by the writing mode is subject to
+ * local override within the text being laid out, as described in Unicode Standard
+ * Annex #9, The Bidirectional Algorithm, available from the Unicode Consor-
+ * tium (see the Bibliography).
+**/
+ bool has_WritingMode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WritingMode", "", NULL));
+ }
+
std::string WritingMode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WritingMode", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfStreamCommonDictionary_autogen.h b/experimental/PdfViewer/SkPdfStreamCommonDictionary_autogen.h
index 46afecf96e..fa65bb1722 100644
--- a/experimental/PdfViewer/SkPdfStreamCommonDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStreamCommonDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all stream dictionaries
class SkPdfStreamCommonDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStreamCommonDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfStreamCommonDictionary& operator=(const SkPdfStreamCommonDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The number of bytes from the beginning of the line fol-
+ * lowing the keyword stream to the last byte just before the keyword
+ * endstream. (There may be an additional EOL marker, preceding
+ * endstream, that is not included in the count and is not logically part
+ * of the stream data.) See "Stream Extent," above, for further discus-
+ * sion.
+**/
+ bool has_Length() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", NULL));
+ }
+
long Length() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", &ret)) return ret;
@@ -528,6 +540,15 @@ public:
return 0;
}
+/** (Optional) The name of a filter to be applied in processing the stream
+ * data found between the keywords stream and endstream, or an array
+ * of such names. Multiple filters should be specified in the order in
+ * which they are to be applied.
+**/
+ bool has_Filter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
+ }
+
bool isFilterAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return false;
@@ -554,6 +575,23 @@ public:
return SkPdfArray();
}
+/** (Optional) A parameter dictionary, or an array of such dictionaries,
+ * used by the filters specified by Filter. If there is only one filter and that
+ * filter has parameters, DecodeParms must be set to the filter's parame-
+ * ter dictionary unless all the filter's parameters have their default
+ * values, in which case the DecodeParms entry may be omitted. If there
+ * are multiple filters and any of the filters has parameters set to non-
+ * default values, DecodeParms must be an array with one entry for
+ * each filter: either the parameter dictionary for that filter, or the null
+ * object if that filter has no parameters (or if all of its parameters have
+ * their default values). If none of the filters have parameters, or if all
+ * their parameters have default values, the DecodeParms entry may be
+ * omitted. (See implementation note 7 in Appendix H.)
+**/
+ bool has_DecodeParms() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DecodeParms", "", NULL));
+ }
+
bool isDecodeParmsADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DecodeParms", "", &ret)) return false;
@@ -580,6 +618,17 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) The file containing the stream data. If this entry
+ * is present, the bytes between stream and endstream are ignored, the
+ * filters are specified by FFilter rather than Filter, and the filter parame-
+ * ters are specified by FDecodeParms rather than DecodeParms. How-
+ * ever, the Length entry should still specify the number of those bytes.
+ * (Usually there are no bytes and Length is 0.)
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -587,6 +636,14 @@ public:
return SkPdfFileSpec();
}
+/** (Optional; PDF 1.2) The name of a filter to be applied in processing
+ * the data found in the stream's external file, or an array of such names.
+ * The same rules apply as for Filter.
+**/
+ bool has_FFilter() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FFilter", "", NULL));
+ }
+
bool isFFilterAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FFilter", "", &ret)) return false;
@@ -613,6 +670,14 @@ public:
return SkPdfArray();
}
+/** (Optional; PDF 1.2) A parameter dictionary, or an array of such dic-
+ * tionaries, used by the filters specified by FFilter. The same rules apply
+ * as for DecodeParms.
+**/
+ bool has_FDecodeParms() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDecodeParms", "", NULL));
+ }
+
bool isFDecodeParmsADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDecodeParms", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfStructureElementAccessDictionary_autogen.h b/experimental/PdfViewer/SkPdfStructureElementAccessDictionary_autogen.h
index eccd07b9ce..a0da30adbb 100644
--- a/experimental/PdfViewer/SkPdfStructureElementAccessDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStructureElementAccessDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional dictionary entries for structure element access
class SkPdfStructureElementAccessDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStructureElementAccessDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfStructureElementAccessDictionary& operator=(const SkPdfStructureElementAccessDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required for all objects that are structural content items; PDF 1.3) The integer key
+ * of this object's entry in the structural parent tree.
+**/
+ bool has_StructParent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
+ }
+
long StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
@@ -528,6 +536,17 @@ public:
return 0;
}
+/** (Required for all content streams containing marked-content sequences that are
+ * structural content items; PDF 1.3) The integer key of this object's entry in the
+ * structural parent tree.
+ * Note: At most one of these two entries may be present in a given object. An object
+ * can be either a content item in its entirety or a container for marked-content
+ * sequences that are content items, but not both.
+**/
+ bool has_StructParents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", NULL));
+ }
+
long StructParents() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfStructureElementDictionary_autogen.h b/experimental/PdfViewer/SkPdfStructureElementDictionary_autogen.h
index bf46678735..05fe253e41 100644
--- a/experimental/PdfViewer/SkPdfStructureElementDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStructureElementDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a structure element dictionary
class SkPdfStructureElementDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStructureElementDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfStructureElementDictionary& operator=(const SkPdfStructureElementDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be StructElem for a structure element.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Required) The structure type, a name object identifying the nature of the
+ * structure element and its role within the document, such as a chapter,
+ * paragraph, or footnote (see Section 9.6.2, "Structure Types"). Names of
+ * structure types must conform to the guidelines described in Appendix E.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +552,13 @@ public:
return "";
}
+/** (Required; must be an indirect reference) The structure element that is the
+ * immediate parent of this one in the structure hierarchy.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
SkPdfDictionary* P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
@@ -542,6 +566,16 @@ public:
return NULL;
}
+/** (Optional) The element identifier, a string designating this structure
+ * element. The string must be unique among all elements in the docu-
+ * ment's structure hierarchy. The IDTree entry in the structure tree root
+ * (see Table 9.9) defines the correspondence between element identifiers
+ * and the structure elements they denote.
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
std::string ID() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -549,6 +583,14 @@ public:
return "";
}
+/** (Optional; must be an indirect reference) A page object representing a
+ * page on which some or all of the content items designated by the K entry
+ * are rendered.
+**/
+ bool has_Pg() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", NULL));
+ }
+
SkPdfDictionary* Pg() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pg", "", &ret)) return ret;
@@ -556,6 +598,23 @@ public:
return NULL;
}
+/** (Optional) The contents of this structure element, which may consist of
+ * one or more marked-content sequences, PDF objects, and other struc-
+ * ture elements. The value of this entry may be any of the following:
+ * * An integer marked-content identifier denoting a marked-content
+ * sequence
+ * * A marked-content reference dictionary denoting a marked-content
+ * sequence
+ * * An object reference dictionary denoting a PDF object
+ * * A structure element dictionary denoting another structure element
+ * * An array, each of whose elements is one of the objects listed above
+ * See Section 9.6.3, "Structure Content" for further discussion of each of
+ * these forms of representation.
+**/
+ bool has_K() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
+ }
+
SkPdfObject* K() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return ret;
@@ -563,6 +622,17 @@ public:
return NULL;
}
+/** (Optional) The attribute object or objects, if any, associated with this
+ * structure element. Each attribute object is either a dictionary or a
+ * stream; the value of this entry may be either a single attribute object or
+ * an array of such objects together with their revision numbers (see
+ * Section 9.6.4, "Structure Attributes," and "Attribute Revision Numbers"
+ * on page 606).
+**/
+ bool has_A() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
+ }
+
SkPdfObject* A() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
@@ -570,6 +640,18 @@ public:
return NULL;
}
+/** (Optional) The attribute class or classes, if any, to which this structure
+ * element belongs. The value of this entry may be either a single class
+ * name or an array of class names together with their revision numbers
+ * (see "Attribute Classes" on page 605 and "Attribute Revision Numbers"
+ * on page 606).
+ * Note: If both the A and C entries are present and a given attribute is speci-
+ * fied by both, the one specified by the A entry takes precedence.
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
bool isCAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return false;
@@ -596,6 +678,14 @@ public:
return SkPdfArray();
}
+/** (Optional) The current revision number of this structure element (see
+ * "Attribute Revision Numbers" on page 606). The value must be a non-
+ * negative integer. Default value: 0.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
long R() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
@@ -603,6 +693,15 @@ public:
return 0;
}
+/** (Optional) The title of the structure element, a text string representing it
+ * in human-readable form. The title should characterize the specific struc-
+ * ture element, such as Chapter 1, rather than merely a generic element
+ * type, such as Chapter.
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -610,6 +709,16 @@ public:
return "";
}
+/** (Optional; PDF 1.4) A language identifier specifying the natural language
+ * for all text in the structure element except where overridden by language
+ * specifications for nested structure elements or marked content (see Sec-
+ * tion 9.8.1, "Natural Language Specification"). If this entry is absent, the
+ * language (if any) specified in the document catalog applies.
+**/
+ bool has_Lang() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
+ }
+
std::string Lang() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
@@ -617,6 +726,15 @@ public:
return "";
}
+/** (Optional) An alternate description of the structure element and its
+ * children in human-readable form, useful when extracting the docu-
+ * ment's contents in support of accessibility to disabled users or for other
+ * purposes (see Section 9.8.2, "Alternate Descriptions").
+**/
+ bool has_Alt() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alt", "", NULL));
+ }
+
std::string Alt() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Alt", "", &ret)) return ret;
@@ -624,6 +742,16 @@ public:
return "";
}
+/** (Optional; PDF 1.4) Text that is an exact replacement for the structure
+ * element and its children. This replacement text (which should apply to
+ * as small a piece of content as possible) is useful when extracting the doc-
+ * ument's contents in support of accessibility to disabled users or for other
+ * purposes (see Section 9.8.3, "Replacement Text").
+**/
+ bool has_ActualText() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ActualText", "", NULL));
+ }
+
std::string ActualText() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ActualText", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfStructureTreeRootDictionary_autogen.h b/experimental/PdfViewer/SkPdfStructureTreeRootDictionary_autogen.h
index ee873e8a04..694bc17297 100644
--- a/experimental/PdfViewer/SkPdfStructureTreeRootDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfStructureTreeRootDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the structure tree root
class SkPdfStructureTreeRootDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kStructureTreeRootDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfStructureTreeRootDictionary& operator=(const SkPdfStructureTreeRootDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must
+ * be StructTreeRoot for a structure tree root.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Optional) The immediate child or children of the structure tree root in
+ * the structure hierarchy. The value may be either a dictionary represent-
+ * ing a single structure element or an array of such dictionaries.
+**/
+ bool has_K() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
+ }
+
bool isKADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return false;
@@ -554,6 +570,14 @@ public:
return SkPdfArray();
}
+/** (Required if any structure elements have element identifiers) A name tree
+ * that maps element identifiers (see Table 9.10) to the structure elements
+ * they denote.
+**/
+ bool has_IDTree() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IDTree", "", NULL));
+ }
+
bool isIDTreeAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IDTree", "", &ret)) return false;
@@ -580,6 +604,28 @@ public:
return NULL;
}
+/** (Required if any structure element contains PDF objects or marked-content
+ * sequences as content items) A number tree (see Section 3.8.5, "Number
+ * Trees") used in finding the structure elements to which content items
+ * belong. Each integer key in the number tree corresponds to a single page
+ * of the document or to an individual object (such as an annotation or an
+ * XObject) that is a content item in its own right. The integer key is given
+ * as the value of the StructParent or StructParents entry in that object (see
+ * "Finding Structure Elements from Content Items" on page 600). The
+ * form of the associated value depends on the nature of the object:
+ * * For an object that is a content item in its own right, the value is an in-
+ * direct reference to the object's parent element (the structure element
+ * that contains it as a content item).
+ * * For a page object or content stream containing marked-content
+ * sequences that are content items, the value is an array of references to
+ * the parent elements of those marked-content sequences.
+ * See "Finding Structure Elements from Content Items" on page 600 for
+ * further discussion.
+**/
+ bool has_ParentTree() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ParentTree", "", NULL));
+ }
+
bool isParentTreeANumber() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ParentTree", "", &ret)) return false;
@@ -606,6 +652,13 @@ public:
return NULL;
}
+/** (Optional) An integer greater than any key in the parent tree, to be used
+ * as a key for the next entry added to the tree.
+**/
+ bool has_ParentTreeNextKey() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ParentTreeNextKey", "", NULL));
+ }
+
long ParentTreeNextKey() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ParentTreeNextKey", "", &ret)) return ret;
@@ -613,6 +666,14 @@ public:
return 0;
}
+/** (Optional) A dictionary mapping the names of structure types used in
+ * the document to their approximate equivalents in the set of standard
+ * structure types (see Section 9.7.4, "Standard Structure Types").
+**/
+ bool has_RoleMap() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RoleMap", "", NULL));
+ }
+
SkPdfDictionary* RoleMap() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RoleMap", "", &ret)) return ret;
@@ -620,6 +681,14 @@ public:
return NULL;
}
+/** (Optional) A dictionary mapping name objects designating attribute
+ * classes to the corresponding attribute objects or arrays of attribute ob-
+ * jects (see "Attribute Classes" on page 605).
+**/
+ bool has_ClassMap() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClassMap", "", NULL));
+ }
+
SkPdfDictionary* ClassMap() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClassMap", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfSubmitFormActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfSubmitFormActionDictionary_autogen.h
index 99a0d52f45..fd43c9fe36 100644
--- a/experimental/PdfViewer/SkPdfSubmitFormActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfSubmitFormActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a submit-form action
class SkPdfSubmitFormActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kSubmitFormActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfSubmitFormActionDictionary& operator=(const SkPdfSubmitFormActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must
+ * be SubmitForm for a submit-form action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Required) A URL file specification (see Section 3.10.4, "URL Speci-
+ * fications") giving the uniform resource locator (URL) of the script
+ * at the Web server that will process the submission.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +551,23 @@ public:
return SkPdfFileSpec();
}
+/** (Optional) An array identifying which fields to include in the sub-
+ * mission or which to exclude, depending on the setting of the
+ * Include/Exclude flag in the Flags entry (see Table 8.62). Each ele-
+ * ment of the array is either an indirect reference to a field dictionary
+ * or (PDF 1.3) a string representing the fully qualified name of a field.
+ * Elements of both kinds may be mixed in the same array.
+ * If this entry is omitted, the Include/Exclude flag is ignored; all fields
+ * in the document's interactive form are submitted except those
+ * whose NoExport flag (see Table 8.50 on page 532) is set. (Fields
+ * with no values may also be excluded, depending on the setting of
+ * the IncludeNoValueFields flag; see Table 8.62.) See the text follow-
+ * ing Table 8.62 for further discussion.
+**/
+ bool has_Fields() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
+ }
+
SkPdfArray Fields() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
@@ -542,6 +575,13 @@ public:
return SkPdfArray();
}
+/** (Optional; inheritable) A set of flags specifying various characteris-
+ * tics of the action (see Table 8.62). Default value: 0.
+**/
+ bool has_Flags() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", NULL));
+ }
+
long Flags() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Flags", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTableAttributesDictionary_autogen.h b/experimental/PdfViewer/SkPdfTableAttributesDictionary_autogen.h
index 181d2bcec4..96a7b0bdbf 100644
--- a/experimental/PdfViewer/SkPdfTableAttributesDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTableAttributesDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Standard table attributes
class SkPdfTableAttributesDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTableAttributesDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfTableAttributesDictionary& operator=(const SkPdfTableAttributesDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The number of rows in the enclosing table that are spanned by the
+ * cell. The cell expands by adding rows in the block-progression direction speci-
+ * fied by the table's WritingMode attribute. Default value: 1.
+**/
+ bool has_RowSpan() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RowSpan", "", NULL));
+ }
+
long RowSpan() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RowSpan", "", &ret)) return ret;
@@ -528,6 +537,14 @@ public:
return 0;
}
+/** (Optional) The number of columns in the enclosing table that are spanned by
+ * the cell. The cell expands by adding columns in the inline-progression direction
+ * specified by the table's WritingMode attribute. Default value: 1.
+**/
+ bool has_ColSpan() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColSpan", "", NULL));
+ }
+
long ColSpan() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColSpan", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTextAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfTextAnnotationDictionary_autogen.h
index 1a0908240e..e68b292b59 100644
--- a/experimental/PdfViewer/SkPdfTextAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTextAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a text annotation
class SkPdfTextAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTextAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfTextAnnotationDictionary& operator=(const SkPdfTextAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Text
+ * for a text annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) The text to be displayed in the pop-up window when the annotation
+ * is opened. Carriage returns may be used to separate the text into paragraphs.
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return "";
}
+/** (Optional) A flag specifying whether the annotation should initially be displayed
+ * open. Default value: false (closed).
+**/
+ bool has_Open() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", NULL));
+ }
+
bool Open() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Open", "", &ret)) return ret;
@@ -542,6 +564,20 @@ public:
return false;
}
+/** (Optional) The name of an icon to be used in displaying the annotation. Viewer
+ * applications should provide predefined icon appearances for at least the follow-
+ * ing standard names:
+ * Comment Key Note
+ * Help NewParagraph Paragraph
+ * Insert
+ * Additional names may be supported as well. Default value: Note.
+ * Note: The annotation dictionary's AP entry, if present, takes precedence over the
+ * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Streams."
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTextFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfTextFieldDictionary_autogen.h
index 7334857d54..ab19e21023 100644
--- a/experimental/PdfViewer/SkPdfTextFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTextFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entry specific to a text field
class SkPdfTextFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTextFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfTextFieldDictionary& operator=(const SkPdfTextFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional; inheritable) The maximum length of the field's text, in characters.
+**/
+ bool has_MaxLen() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxLen", "", NULL));
+ }
+
long MaxLen() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MaxLen", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfThreadActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfThreadActionDictionary_autogen.h
index 09a06e09d5..507b25de29 100644
--- a/experimental/PdfViewer/SkPdfThreadActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfThreadActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a thread action
class SkPdfThreadActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kThreadActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfThreadActionDictionary& operator=(const SkPdfThreadActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be Thread
+ * for a thread action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Optional) The file containing the desired thread. If this entry is absent, the
+ * thread is in the current file.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +550,21 @@ public:
return SkPdfFileSpec();
}
+/** (Required) The desired destination thread, specified in one of the following
+ * forms:
+ * * An indirect reference to a thread dictionary (see Section 8.3.2, "Articles").
+ * In this case, the thread must be in the current file.
+ * * The index of the thread within the Threads array of its document's catalog
+ * (see Section 3.6.1, "Document Catalog"). The first thread in the array has
+ * index 0.
+ * * The title of the thread, as specified in its thread information dictionary (see
+ * Table 8.7 on page 484). If two or more threads have the same title, the one
+ * appearing first in the document catalog's Threads array will be used.
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
bool isDADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
@@ -574,6 +604,17 @@ public:
return "";
}
+/** (Optional) The desired bead in the destination thread, specified in one of the
+ * following forms:
+ * * An indirect reference to a bead dictionary (see Section 8.3.2, "Articles"). In
+ * this case, the thread must be in the current file.
+ * * The index of the bead within its thread. The first bead in a thread has
+ * index 0.
+**/
+ bool has_B() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", NULL));
+ }
+
bool isBADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfThreadDictionary_autogen.h b/experimental/PdfViewer/SkPdfThreadDictionary_autogen.h
index 90f6f72686..8dc4a8d0b5 100644
--- a/experimental/PdfViewer/SkPdfThreadDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfThreadDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a thread dictionary
class SkPdfThreadDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kThreadDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfThreadDictionary& operator=(const SkPdfThreadDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * Thread for a thread dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required; must be an indirect reference) The first bead in the thread.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
SkPdfDictionary* F() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -535,6 +549,15 @@ public:
return NULL;
}
+/** (Optional) A thread information dictionary containing information about the
+ * thread, such as its title, author, and creation date. The contents of this dictionary are
+ * similar to those of the document information dictionary (see Section 9.2.1, "Docu-
+ * ment Information Dictionary").
+**/
+ bool has_I() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
+ }
+
SkPdfDictionary* I() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTransitionDictionary_autogen.h b/experimental/PdfViewer/SkPdfTransitionDictionary_autogen.h
index 9126265fb2..552ba4545f 100644
--- a/experimental/PdfViewer/SkPdfTransitionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTransitionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a transition dictionary
class SkPdfTransitionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTransitionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfTransitionDictionary& operator=(const SkPdfTransitionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * Trans for a transition dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Optional) The duration of the transition effect, in seconds. Default value: 1.
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
double D() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
@@ -535,6 +549,32 @@ public:
return 0;
}
+/** (Optional) The transition style to use when moving to this page from another during a
+ * presentation:
+ * Split Two lines sweep across the screen, revealing the new page. The lines may
+ * be either horizontal or vertical and may move inward from the edges of
+ * the page or outward from the center, as specified by the Dm and M
+ * entries, respectively.
+ * Blinds Multiple lines, evenly spaced across the screen, synchronously sweep in
+ * the same direction to reveal the new page. The lines may be either hori-
+ * zontal or vertical, as specified by the Dm entry. Horizontal lines move
+ * downward, vertical lines to the right.
+ * Box A rectangular box sweeps inward from the edges of the page or outward
+ * from the center, as specified by the M entry, revealing the new page.
+ * Wipe A single line sweeps across the screen from one edge to the other in the
+ * direction specified by the Di entry, revealing the new page.
+ * Dissolve The old page "dissolves" gradually to reveal the new one.
+ * Glitter Similar to Dissolve, except that the effect sweeps across the page in a
+ * wide band moving from one side of the screen to the other in the direc-
+ * tion specified by the Di entry.
+ * R The new page simply replaces the old one with no special transition ef-
+ * fect; the D entry is ignored.
+ * Default value: R.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -542,6 +582,16 @@ public:
return "";
}
+/** (Optional; Split and Blinds transition styles only) The dimension in which the specified
+ * transition effect occurs:
+ * H Horizontal
+ * V Vertical
+ * Default value: H.
+**/
+ bool has_Dm() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dm", "", NULL));
+ }
+
std::string Dm() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dm", "", &ret)) return ret;
@@ -549,6 +599,16 @@ public:
return "";
}
+/** (Optional; Split and Box transition styles only) The direction of motion for the specified
+ * transition effect:
+ * I Inward from the edges of the page
+ * O Outward from the center of the page
+ * Default value: I.
+**/
+ bool has_M() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", NULL));
+ }
+
std::string M() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
@@ -556,6 +616,21 @@ public:
return "";
}
+/** (Optional; Wipe and Glitter transition styles only) The direction in which the specified
+ * transition effect moves, expressed in degrees counterclockwise starting from a left-to-
+ * right direction. (Note that this differs from the page object's Rotate entry, which is
+ * measured clockwise from the top.) Only the following values are valid:
+ * 0 Left to right
+ * 90 Bottom to top (Wipe only)
+ * 180 Right to left (Wipe only)
+ * 270 Top to bottom
+ * 315 Top-left to bottom-right (Glitter only)
+ * Default value: 0.
+**/
+ bool has_Di() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Di", "", NULL));
+ }
+
double Di() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Di", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTransparencyGroupDictionary_autogen.h b/experimental/PdfViewer/SkPdfTransparencyGroupDictionary_autogen.h
index 5ce9781253..6560cbe2b0 100644
--- a/experimental/PdfViewer/SkPdfTransparencyGroupDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTransparencyGroupDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a transparency group attributes dictionary
class SkPdfTransparencyGroupDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTransparencyGroupDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfTransparencyGroupDictionary& operator=(const SkPdfTransparencyGroupDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The group subtype, which identifies the type of group whose at-
+ * tributes this dictionary describes; must be Transparency for a transparency
+ * group.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +537,41 @@ public:
return "";
}
+/** (Sometimes required, as discussed below) The group color space, which is used for
+ * the following purposes:
+ * * As the color space into which colors are converted when painted into the
+ * group
+ * * As the blending color space in which objects are composited within the group
+ * (see Section 7.2.3, "Blending Color Space")
+ * * As the color space of the group as a whole when it in turn is painted as an ob-
+ * ject onto its backdrop
+ * The group color space may be any device or CIE-based color space that treats its
+ * components as independent additive or subtractive values in the range 0.0 to
+ * 1.0, subject to the restrictions described in Section 7.2.3, "Blending Color
+ * Space." These restrictions exclude Lab and lightness-chromaticity ICCBased
+ * color spaces, as well as the special color spaces Pattern, Indexed, Separation, and
+ * DeviceN. Device color spaces are subject to remapping according to the Default-
+ * Gray, DefaultRGB, and DefaultCMYK entries in the ColorSpace subdictionary of
+ * the current resource dictionary (see "Default Color Spaces" on page 194).
+ * Ordinarily, the CS entry is allowed only for isolated transparency groups (those
+ * for which I, below, is true) and even then it is optional. However, this entry is re-
+ * quired in the group attributes dictionary for any transparency group XObject
+ * that has no parent group or page from which to inherit-in particular, one that
+ * is the value of the G entry in a soft-mask dictionary of subtype Luminosity (see
+ * "Soft-Mask Dictionaries" on page 445).
+ * In addition, it is always permissible to specify CS in the group attributes diction-
+ * ary associated with a page object, even if I is false or absent. In the normal case in
+ * which the page is imposed directly on the output medium, the page group is
+ * effectively isolated regardless of the I value, and the specified CS value is there-
+ * fore honored. But if the page is in turn used as an element of some other page
+ * and if the group is non-isolated, CS is ignored and the color space is inherited
+ * from the actual backdrop with which the page is composited (see Section 7.3.6,
+ * "Page Group").
+**/
+ bool has_CS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "", NULL));
+ }
+
bool isCSAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CS", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h
index eb3dd68ccb..6cc7a85a6e 100644
--- a/experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTrapNetworkAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a trap network annotation
class SkPdfTrapNetworkAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTrapNetworkAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfTrapNetworkAnnotationDictionary& operator=(const SkPdfTrapNetworkAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be
+ * TrapNet for a trap network annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; PDF 1.4) An alternate description of the annotation's contents in
+ * human-readable form, useful when extracting the document's contents in
+ * support of accessibility to disabled users or for other purposes (see Section
+ * 9.8.2, "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +552,14 @@ public:
return "";
}
+/** (Required if Version and AnnotStates are absent; must be absent if Version and
+ * AnnotStates are present; PDF 1.4) The date and time (see Section 3.8.2,
+ * "Dates") when the trap network was most recently modified.
+**/
+ bool has_LastModified() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
+ }
+
SkPdfDate LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
@@ -542,6 +567,24 @@ public:
return SkPdfDate();
}
+/** (Required if AnnotStates is present; must be absent if LastModified is present)
+ * An unordered array of all objects present in the page description at the time
+ * the trap networks were generated and that, if changed, could affect the
+ * appearance of the page. If present, the array must include the following
+ * objects:
+ * * All content streams identified in the page object's Contents entry (see
+ * "Page Objects" on page 87)
+ * * All resource objects (other than procedure sets) in the page's resource dic-
+ * tionary (see Section 3.7.2, "Resource Dictionaries")
+ * * All resource objects (other than procedure sets) in the resource diction-
+ * aries of any form XObjects on the page (see Section 4.9, "Form XObjects")
+ * * All OPI dictionaries associated with XObjects on the page (see Section
+ * 9.10.6, "Open Prepress Interface (OPI)")
+**/
+ bool has_Version() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
+ }
+
SkPdfArray Version() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
@@ -549,6 +592,18 @@ public:
return SkPdfArray();
}
+/** (Required if Version is present; must be absent if LastModified is present) An
+ * array of name objects representing the appearance states (value of the AS
+ * entry) for annotations associated with the page. The appearance states must
+ * be listed in the same order as the annotations in the page's Annots array (see
+ * "Page Objects" on page 87). For an annotation with no AS entry, the corre-
+ * sponding array element should be null. No appearance state should be
+ * included for the trap network annotation itself.
+**/
+ bool has_AnnotStates() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AnnotStates", "", NULL));
+ }
+
SkPdfArray AnnotStates() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AnnotStates", "", &ret)) return ret;
@@ -556,6 +611,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of font dictionaries representing fonts that were "fauxed"
+ * (replaced by substitute fonts) during the generation of trap networks for the
+ * page.
+**/
+ bool has_FontFauxing() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFauxing", "", NULL));
+ }
+
SkPdfArray FontFauxing() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontFauxing", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h b/experimental/PdfViewer/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h
index 7d86089986..46798d0e17 100644
--- a/experimental/PdfViewer/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfTrapNetworkAppearanceStreamDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a trap network appearance stream
class SkPdfTrapNetworkAppearanceStreamDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kTrapNetworkAppearanceStreamDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfTrapNetworkAppearanceStreamDictionary& operator=(const SkPdfTrapNetworkAppearanceStreamDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The name of the process color model that was assumed
+ * when this trap network was created; equivalent to the PostScript
+ * page device parameter ProcessColorModel (see Section 6.2.5 of the
+ * PostScript Language Reference, Third Edition). Valid values are
+ * DeviceGray, DeviceRGB, DeviceCMYK, DeviceCMY, DeviceRGBK,
+ * and DeviceN.
+**/
+ bool has_PCM() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PCM", "", NULL));
+ }
+
std::string PCM() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PCM", "", &ret)) return ret;
@@ -528,6 +540,18 @@ public:
return "";
}
+/** (Optional) An array of names identifying the colorants that were
+ * assumed when this network was created; equivalent to the Post-
+ * Script page device parameter of the same name (see Section 6.2.5 of
+ * the PostScript Language Reference, Third Edition). Colorants im-
+ * plied by the process color model PCM are available automatically
+ * and need not be explicitly declared. If this entry is absent, the
+ * colorants implied by PCM are assumed.
+**/
+ bool has_SeparationColorNames() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationColorNames", "", NULL));
+ }
+
SkPdfArray SeparationColorNames() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SeparationColorNames", "", &ret)) return ret;
@@ -535,6 +559,19 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of indirect references to TrapRegion objects
+ * defining the page's trapping zones and the associated trapping
+ * parameters, as described in Adobe Technical Note #5620, Portable
+ * Job Ticket Format. These references are to objects comprising
+ * portions of a PJTF job ticket that is embedded in the PDF file.
+ * When the trapping zones and parameters are defined by an external
+ * job ticket (or by some other means, such as with JDF), this entry is
+ * absent.
+**/
+ bool has_TrapRegions() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapRegions", "", NULL));
+ }
+
SkPdfArray TrapRegions() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapRegions", "", &ret)) return ret;
@@ -542,6 +579,14 @@ public:
return SkPdfArray();
}
+/** (Optional) A human-readable text string that applications can use
+ * to describe this trap network to the user (for example, to allow
+ * switching between trap networks).
+**/
+ bool has_TrapStyles() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapStyles", "", NULL));
+ }
+
std::string TrapStyles() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrapStyles", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h b/experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h
index 75fb17e798..22be44a60b 100644
--- a/experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType0FontDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfFontDictionary_autogen.h"
+// Entries in a Type 0 font dictionary
class SkPdfType0FontDictionary : public SkPdfFontDictionary {
public:
virtual SkPdfObjectType getType() const { return kType0FontDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfType0FontDictionary& operator=(const SkPdfType0FontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Font for a font dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -45,6 +53,12 @@ public:
return "";
}
+/** (Required) The type of font; must be Type0 for a Type 0 font.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -52,6 +66,20 @@ public:
return "";
}
+/** (Required) The PostScript name of the font. In principle, this is an arbitrary
+ * name, since there is no font program associated directly with a Type 0 font
+ * dictionary. The conventions described here ensure maximum compatibility
+ * with existing Acrobat products.
+ * If the descendant is a Type 0 CIDFont, this name should be the concatenation
+ * of the CIDFont's BaseFont name, a hyphen, and the CMap name given in the
+ * Encoding entry (or the CMapName entry in the CMap program itself). If the
+ * descendant is a Type 2 CIDFont, this name should be the same as the
+ * CIDFont's BaseFont name.
+**/
+ bool has_BaseFont() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
+ }
+
std::string BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
@@ -59,6 +87,16 @@ public:
return "";
}
+/** (Required) The name of a predefined CMap, or a stream containing a CMap
+ * program, that maps character codes to font numbers and CIDs. If the descen-
+ * dant is a Type 2 CIDFont whose associated TrueType font program is not em-
+ * bedded in the PDF file, the Encoding entry must be a predefined CMap name
+ * (see "Glyph Selection in CIDFonts" on page 339).
+**/
+ bool has_Encoding() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
+ }
+
bool isEncodingAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return false;
@@ -85,6 +123,17 @@ public:
return SkPdfStream();
}
+/** (Required) An array specifying one or more fonts or CIDFonts that are
+ * descendants of this composite font. This array is indexed by the font number
+ * that is obtained by mapping a character code through the CMap specified in
+ * the Encoding entry.
+ * Note: In all PDF versions up to and including PDF 1.4, DescendantFonts must
+ * be a one-element array containing a CIDFont dictionary.
+**/
+ bool has_DescendantFonts() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DescendantFonts", "", NULL));
+ }
+
SkPdfArray DescendantFonts() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DescendantFonts", "", &ret)) return ret;
@@ -92,6 +141,13 @@ public:
return SkPdfArray();
}
+/** (Optional) A stream containing a CMap file that maps character codes to
+ * Unicode values (see Section 5.9, "ToUnicode CMaps").
+**/
+ bool has_ToUnicode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", NULL));
+ }
+
SkPdfStream ToUnicode() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType0FunctionDictionary_autogen.h b/experimental/PdfViewer/SkPdfType0FunctionDictionary_autogen.h
index 19b9a4c00c..6a75e47dc9 100644
--- a/experimental/PdfViewer/SkPdfType0FunctionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType0FunctionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 0 function dictionary
class SkPdfType0FunctionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType0FunctionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType0FunctionDictionary& operator=(const SkPdfType0FunctionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of m positive integers specifying the number of samples
+ * in each input dimension of the sample table.
+**/
+ bool has_Size() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
+ }
+
SkPdfArray Size() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return SkPdfArray();
}
+/** (Required) The number of bits used to represent each sample. (If the function
+ * has multiple output values, each one occupies BitsPerSample bits.) Valid
+ * values are 1, 2, 4, 8, 12, 16, 24, and 32.
+**/
+ bool has_BitsPerSample() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerSample", "", NULL));
+ }
+
long BitsPerSample() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerSample", "", &ret)) return ret;
@@ -535,6 +551,14 @@ public:
return 0;
}
+/** (Optional) The order of interpolation between samples. Valid values are 1
+ * and 3, specifying linear and cubic spline interpolation, respectively. (See im-
+ * plementation note 26 in Appendix H.) Default value: 1.
+**/
+ bool has_Order() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Order", "", NULL));
+ }
+
long Order() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Order", "", &ret)) return ret;
@@ -542,6 +566,14 @@ public:
return 0;
}
+/** (Optional) An array of 2 x m numbers specifying the linear mapping of input
+ * values into the domain of the function's sample table. Default value:
+ * [0 (Size0 - 1) 0 (Size1 - 1) ...].
+**/
+ bool has_Encode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "", NULL));
+ }
+
SkPdfArray Encode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "", &ret)) return ret;
@@ -549,6 +581,14 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of 2 x n numbers specifying the linear mapping of sam-
+ * ple values into the range appropriate for the function's output values. Default
+ * value: same as the value of Range.
+**/
+ bool has_Decode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", NULL));
+ }
+
SkPdfArray Decode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType10HalftoneDictionary_autogen.h b/experimental/PdfViewer/SkPdfType10HalftoneDictionary_autogen.h
index c8502e4085..ba6e042e60 100644
--- a/experimental/PdfViewer/SkPdfType10HalftoneDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType10HalftoneDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 10 halftone dictionary
class SkPdfType10HalftoneDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType10HalftoneDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType10HalftoneDictionary& operator=(const SkPdfType10HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be Halftone for a halftone dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the halftone type that this dictionary
+ * describes; must be 10 for this type of halftone.
+**/
+ bool has_HalftoneType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
+ }
+
long HalftoneType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
@@ -535,6 +550,12 @@ public:
return 0;
}
+/** (Optional) The name of the halftone dictionary.
+**/
+ bool has_HalftoneName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
+ }
+
std::string HalftoneName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
@@ -542,6 +563,12 @@ public:
return "";
}
+/** (Required) The side of square X, in device pixels; see below.
+**/
+ bool has_Xsquare() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Xsquare", "", NULL));
+ }
+
long Xsquare() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Xsquare", "", &ret)) return ret;
@@ -549,6 +576,12 @@ public:
return 0;
}
+/** (Required) The side of square Y, in device pixels; see below.
+**/
+ bool has_Ysquare() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ysquare", "", NULL));
+ }
+
long Ysquare() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ysquare", "", &ret)) return ret;
@@ -556,6 +589,18 @@ public:
return 0;
}
+/** (Optional) A transfer function, which overrides the current transfer
+ * function in the graphics state for the same component. This entry is
+ * required if the dictionary is a component of a type 5 halftone (see
+ * "Type 5 Halftones" on page 400) and represents either a nonprimary
+ * or nonstandard primary color component (see Section 6.3, "Transfer
+ * Functions"). The name Identity may be used to specify the identity
+ * function.
+**/
+ bool has_TransferFunction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", NULL));
+ }
+
bool isTransferFunctionAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfType16HalftoneDictionary_autogen.h b/experimental/PdfViewer/SkPdfType16HalftoneDictionary_autogen.h
index 352b984c0a..a965edd283 100644
--- a/experimental/PdfViewer/SkPdfType16HalftoneDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType16HalftoneDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 16 halftone dictionary
class SkPdfType16HalftoneDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType16HalftoneDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType16HalftoneDictionary& operator=(const SkPdfType16HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be Halftone for a halftone dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the halftone type that this dictionary
+ * describes; must be 16 for this type of halftone.
+**/
+ bool has_HalftoneType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
+ }
+
long HalftoneType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
@@ -535,6 +550,12 @@ public:
return 0;
}
+/** (Optional) The name of the halftone dictionary.
+**/
+ bool has_HalftoneName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
+ }
+
std::string HalftoneName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
@@ -542,6 +563,13 @@ public:
return "";
}
+/** (Required) The width of the first (or only) rectangle in the threshold
+ * array, in device pixels.
+**/
+ bool has_Width() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", NULL));
+ }
+
long Width() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
@@ -549,6 +577,13 @@ public:
return 0;
}
+/** (Required) The height of the first (or only) rectangle in the threshold
+ * array, in device pixels.
+**/
+ bool has_Height() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", NULL));
+ }
+
long Height() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
@@ -556,6 +591,15 @@ public:
return 0;
}
+/** (Optional) The width of the optional second rectangle in the threshold
+ * array, in device pixels. If this entry is present, the Height2 entry must
+ * be present as well; if this entry is absent, the Height2 entry must also be
+ * absent and the threshold array has only one rectangle.
+**/
+ bool has_Width2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width2", "", NULL));
+ }
+
long Width2() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width2", "", &ret)) return ret;
@@ -563,6 +607,13 @@ public:
return 0;
}
+/** (Optional) The height of the optional second rectangle in the threshold
+ * array, in device pixels.
+**/
+ bool has_Height2() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height2", "", NULL));
+ }
+
long Height2() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height2", "", &ret)) return ret;
@@ -570,6 +621,18 @@ public:
return 0;
}
+/** (Optional) A transfer function, which overrides the current transfer
+ * function in the graphics state for the same component. This entry is
+ * required if the dictionary is a component of a type 5 halftone (see
+ * "Type 5 Halftones," below) and represents either a nonprimary or
+ * nonstandard primary color component (see Section 6.3, "Transfer
+ * Functions"). The name Identity may be used to specify the identity
+ * function.
+**/
+ bool has_TransferFunction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", NULL));
+ }
+
bool isTransferFunctionAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfType1FontDictionary_autogen.h b/experimental/PdfViewer/SkPdfType1FontDictionary_autogen.h
index 1373022bb6..680e7c8bfa 100644
--- a/experimental/PdfViewer/SkPdfType1FontDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType1FontDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfFontDictionary_autogen.h"
+// Entries in a Type 1 font dictionary
class SkPdfType1FontDictionary : public SkPdfFontDictionary {
public:
virtual SkPdfObjectType getType() const { return kType1FontDictionary_SkPdfObjectType;}
@@ -35,6 +36,13 @@ public:
SkPdfType1FontDictionary& operator=(const SkPdfType1FontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Font for a font dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -42,6 +50,12 @@ public:
return "";
}
+/** (Required) The type of font; must be Type1 for a Type 1 font.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -49,6 +63,15 @@ public:
return "";
}
+/** (Required in PDF 1.0; optional otherwise) The name by which this font is ref-
+ * erenced in the Font subdictionary of the current resource dictionary.
+ * Note: This entry is obsolescent and its use is no longer recommended. (See
+ * implementation note 42 in Appendix H.)
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -56,6 +79,17 @@ public:
return "";
}
+/** (Required) The PostScript name of the font. For Type 1 fonts, this is usually
+ * the value of the FontName entry in the font program; for more information,
+ * see Section 5.2 of the PostScript Language Reference, Third Edition. The Post-
+ * Script name of the font can be used to find the font's definition in the viewer
+ * application or its environment. It is also the name that will be used when
+ * printing to a PostScript output device.
+**/
+ bool has_BaseFont() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
+ }
+
std::string BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
@@ -63,6 +97,13 @@ public:
return "";
}
+/** (Required except for the standard 14 fonts) The first character code defined in
+ * the font's Widths array.
+**/
+ bool has_FirstChar() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FirstChar", "", NULL));
+ }
+
long FirstChar() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FirstChar", "", &ret)) return ret;
@@ -70,6 +111,13 @@ public:
return 0;
}
+/** (Required except for the standard 14 fonts) The last character code defined in
+ * the font's Widths array.
+**/
+ bool has_LastChar() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastChar", "", NULL));
+ }
+
long LastChar() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastChar", "", &ret)) return ret;
@@ -77,6 +125,21 @@ public:
return 0;
}
+/** (Required except for the standard 14 fonts; indirect reference preferred) An array
+ * of (LastChar - FirstChar + 1) widths, each element being the glyph width for
+ * the character whose code is FirstChar plus the array index. For character
+ * codes outside the range FirstChar to LastChar, the value of MissingWidth from
+ * the FontDescriptor entry for this font is used. The glyph widths are measured
+ * in units in which 1000 units corresponds to 1 unit in text space. These widths
+ * must be consistent with the actual widths given in the font program itself.
+ * (See implementation note 43 in Appendix H.) For more information on
+ * glyph widths and other glyph metrics, see Section 5.1.3, "Glyph Positioning
+ * and Metrics."
+**/
+ bool has_Widths() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Widths", "", NULL));
+ }
+
SkPdfArray Widths() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Widths", "", &ret)) return ret;
@@ -84,6 +147,18 @@ public:
return SkPdfArray();
}
+/** (Required except for the standard 14 fonts; must be an indirect reference) A font
+ * descriptor describing the font's metrics other than its glyph widths (see Sec-
+ * tion 5.7, "Font Descriptors").
+ * Note: For the standard 14 fonts, the entries FirstChar, LastChar, Widths, and
+ * FontDescriptor must either all be present or all absent. Ordinarily, they are ab-
+ * sent; specifying them enables a standard font to be overridden (see "Standard
+ * Type 1 Fonts," below).
+**/
+ bool has_FontDescriptor() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", NULL));
+ }
+
SkPdfDictionary* FontDescriptor() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", &ret)) return ret;
@@ -91,6 +166,17 @@ public:
return NULL;
}
+/** (Optional) A specification of the font's character encoding, if different from
+ * its built-in encoding. The value of Encoding may be either the name of a pre-
+ * defined encoding (MacRomanEncoding, MacExpertEncoding, or WinAnsi-
+ * Encoding, as described in Appendix D) or an encoding dictionary that
+ * specifies differences from the font's built-in encoding or from a specified pre-
+ * defined encoding (see Section 5.5.5, "Character Encoding").
+**/
+ bool has_Encoding() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
+ }
+
bool isEncodingAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return false;
@@ -117,6 +203,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.2) A stream containing a CMap file that maps character
+ * codes to Unicode values (see Section 5.9, "ToUnicode CMaps").
+**/
+ bool has_ToUnicode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", NULL));
+ }
+
SkPdfStream ToUnicode() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ToUnicode", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType1FormDictionary_autogen.h b/experimental/PdfViewer/SkPdfType1FormDictionary_autogen.h
index 089de9e21f..8fdb8e654c 100644
--- a/experimental/PdfViewer/SkPdfType1FormDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType1FormDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfXObjectDictionary_autogen.h"
+// Additional entries specific to a type 1 form dictionary
class SkPdfType1FormDictionary : public SkPdfXObjectDictionary {
public:
virtual SkPdfObjectType getType() const { return kType1FormDictionary_SkPdfObjectType;}
@@ -26,6 +27,13 @@ public:
SkPdfType1FormDictionary& operator=(const SkPdfType1FormDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be XObject for a form XObject.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -33,6 +41,13 @@ public:
return "";
}
+/** (Required) The type of XObject that this dictionary describes; must be Form
+ * for a form XObject.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -40,6 +55,14 @@ public:
return "";
}
+/** (Optional) A code identifying the type of form XObject that this dictionary
+ * describes. The only valid value defined at the time of publication is 1. Default
+ * value: 1.
+**/
+ bool has_FormType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FormType", "", NULL));
+ }
+
long FormType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FormType", "", &ret)) return ret;
@@ -47,6 +70,16 @@ public:
return 0;
}
+/** (Required in PDF 1.0; optional otherwise) The name by which this form
+ * XObject is referenced in the XObject subdictionary of the current resource
+ * dictionary (see Section 3.7.2, "Resource Dictionaries").
+ * Note: This entry is obsolescent and its use is no longer recommended. (See
+ * implementation note 38 in Appendix H.)
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -54,6 +87,17 @@ public:
return "";
}
+/** (Required if PieceInfo is present; optional otherwise; PDF 1.3) The date and
+ * time (see Section 3.8.2, "Dates") when the form XObject's contents were
+ * most recently modified. If a page-piece dictionary (PieceInfo) is present, the
+ * modification date is used to ascertain which of the application data diction-
+ * aries it contains correspond to the current content of the form (see Section
+ * 9.4, "Page-Piece Dictionaries").
+**/
+ bool has_LastModified() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
+ }
+
SkPdfDate LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
@@ -61,6 +105,15 @@ public:
return SkPdfDate();
}
+/** (Required) An array of four numbers in the form coordinate system (see
+ * below), giving the coordinates of the left, bottom, right, and top edges,
+ * respectively, of the form XObject's bounding box. These boundaries are used
+ * to clip the form XObject and to determine its size for caching.
+**/
+ bool has_BBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
+ }
+
SkRect BBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
@@ -68,6 +121,14 @@ public:
return SkRect();
}
+/** (Optional) An array of six numbers specifying the form matrix, which maps
+ * form space into user space (see Section 4.2.3, "Transformation Matrices").
+ * Default value: the identity matrix [1 0 0 1 0 0].
+**/
+ bool has_Matrix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
+ }
+
SkPdfArray Matrix() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
@@ -75,6 +136,28 @@ public:
return SkPdfArray();
}
+/** (Optional but strongly recommended; PDF 1.2) A dictionary specifying any
+ * resources (such as fonts and images) required by the form XObject (see Sec-
+ * tion 3.7, "Content Streams and Resources").
+ * In PDF 1.1 and earlier, all named resources used in the form XObject must be
+ * included in the resource dictionary of each page object on which the form
+ * XObject appears, whether or not they also appear in the resource dictionary
+ * of the form XObject itself. It can be useful to specify these resources in the
+ * form XObject's own resource dictionary as well, in order to determine which
+ * resources are used inside the form XObject. If a resource is included in both
+ * dictionaries, it should have the same name in both locations.
+ * In PDF 1.2 and later versions, form XObjects can be independent of the
+ * content streams in which they appear, and this is strongly recommended
+ * although not required. In an independent form XObject, the resource dic-
+ * tionary of the form XObject is required and contains all named resources
+ * used by the form XObject. These resources are not "promoted" to the outer
+ * content stream's resource dictionary, although that stream's resource diction-
+ * ary will refer to the form XObject itself.
+**/
+ bool has_Resources() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", NULL));
+ }
+
SkPdfDictionary* Resources() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Resources", "", &ret)) return ret;
@@ -82,6 +165,17 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A group attributes dictionary indicating that the contents
+ * of the form XObject are to be treated as a group and specifying the attributes
+ * of that group (see Section 4.9.2, "Group XObjects").
+ * Note: If a Ref entry (see below) is present, the group attributes also apply to the
+ * external page imported by that entry. This allows such an imported page to be
+ * treated as a group without further modification.
+**/
+ bool has_Group() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", NULL));
+ }
+
SkPdfDictionary* Group() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Group", "", &ret)) return ret;
@@ -89,6 +183,14 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A reference dictionary identifying a page to be imported
+ * from another PDF file, and for which the form XObject serves as a proxy (see
+ * Section 4.9.3, "Reference XObjects").
+**/
+ bool has_Ref() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ref", "", NULL));
+ }
+
SkPdfDictionary* Ref() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ref", "", &ret)) return ret;
@@ -96,6 +198,13 @@ public:
return NULL;
}
+/** (Optional; PDF 1.4) A metadata stream containing metadata for the form
+ * XObject (see Section 9.2.2, "Metadata Streams").
+**/
+ bool has_Metadata() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
+ }
+
SkPdfStream Metadata() const {
SkPdfStream ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
@@ -103,6 +212,13 @@ public:
return SkPdfStream();
}
+/** (Optional; PDF 1.3) A page-piece dictionary associated with the form
+ * XObject (see Section 9.4, "Page-Piece Dictionaries").
+**/
+ bool has_PieceInfo() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", NULL));
+ }
+
SkPdfDictionary* PieceInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PieceInfo", "", &ret)) return ret;
@@ -110,6 +226,14 @@ public:
return NULL;
}
+/** (Required if the form XObject is a structural content item; PDF 1.3) The integer
+ * key of the form XObject's entry in the structural parent tree (see "Finding
+ * Structure Elements from Content Items" on page 600).
+**/
+ bool has_StructParent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
+ }
+
long StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
@@ -117,6 +241,18 @@ public:
return 0;
}
+/** (Required if the form XObject contains marked-content sequences that are struc-
+ * tural content items; PDF 1.3) The integer key of the form XObject's entry in
+ * the structural parent tree (see "Finding Structure Elements from Content
+ * Items" on page 600).
+ * Note: At most one of the entries StructParent or StructParents may be present. A
+ * form XObject can be either a content item in its entirety or a container for
+ * marked-content sequences that are content items, but not both.
+**/
+ bool has_StructParents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", NULL));
+ }
+
long StructParents() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParents", "", &ret)) return ret;
@@ -124,6 +260,13 @@ public:
return 0;
}
+/** (Optional; PDF 1.2) An OPI version dictionary for the form XObject (see
+ * Section 9.10.6, "Open Prepress Interface (OPI)").
+**/
+ bool has_OPI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPI", "", NULL));
+ }
+
SkPdfDictionary* OPI() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPI", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType1HalftoneDictionary_autogen.h b/experimental/PdfViewer/SkPdfType1HalftoneDictionary_autogen.h
index 5431eda95d..07e768e2a1 100644
--- a/experimental/PdfViewer/SkPdfType1HalftoneDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType1HalftoneDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a type 1 halftone dictionary
class SkPdfType1HalftoneDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType1HalftoneDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType1HalftoneDictionary& operator=(const SkPdfType1HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be Halftone for a halftone dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the halftone type that this dictionary
+ * describes; must be 1 for this type of halftone.
+**/
+ bool has_HalftoneType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
+ }
+
long HalftoneType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
@@ -535,6 +550,12 @@ public:
return 0;
}
+/** (Optional) The name of the halftone dictionary.
+**/
+ bool has_HalftoneName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
+ }
+
std::string HalftoneName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
@@ -542,6 +563,13 @@ public:
return "";
}
+/** (Required) The screen frequency, measured in halftone cells per inch in
+ * device space.
+**/
+ bool has_Frequency() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Frequency", "", NULL));
+ }
+
double Frequency() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Frequency", "", &ret)) return ret;
@@ -549,6 +577,16 @@ public:
return 0;
}
+/** (Required) The screen angle, in degrees of rotation counterclockwise
+ * with respect to the device coordinate system. (Note that most output
+ * devices have left-handed device spaces; on such devices, a counter-
+ * clockwise angle in device space will correspond to a clockwise angle in
+ * default user space and on the physical medium.)
+**/
+ bool has_Angle() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Angle", "", NULL));
+ }
+
double Angle() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Angle", "", &ret)) return ret;
@@ -556,6 +594,14 @@ public:
return 0;
}
+/** (Required) A function object defining the order in which device pixels
+ * within a screen cell are adjusted for different gray levels, or the name of
+ * one of the predefined spot functions (see Table 6.1 on page 385).
+**/
+ bool has_SpotFunction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpotFunction", "", NULL));
+ }
+
bool isSpotFunctionAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpotFunction", "", &ret)) return false;
@@ -582,6 +628,14 @@ public:
return "";
}
+/** (Optional) A flag specifying whether to invoke a special halftone al-
+ * gorithm that is extremely precise, but computationally expensive; see
+ * below for further discussion. Default value: false.
+**/
+ bool has_AccurateScreens() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AccurateScreens", "", NULL));
+ }
+
bool AccurateScreens() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AccurateScreens", "", &ret)) return ret;
@@ -589,6 +643,18 @@ public:
return false;
}
+/** (Optional) A transfer function, which overrides the current transfer
+ * function in the graphics state for the same component. This entry is
+ * required if the dictionary is a component of a type 5 halftone (see
+ * "Type 5 Halftones" on page 400) and represents either a nonprimary
+ * or nonstandard primary color component (see Section 6.3, "Transfer
+ * Functions"). The name Identity may be used to specify the identity
+ * function.
+**/
+ bool has_TransferFunction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", NULL));
+ }
+
bool isTransferFunctionAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfType1PatternDictionary_autogen.h b/experimental/PdfViewer/SkPdfType1PatternDictionary_autogen.h
index 65f31b7376..320c673af4 100644
--- a/experimental/PdfViewer/SkPdfType1PatternDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType1PatternDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 1 pattern dictionary
class SkPdfType1PatternDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType1PatternDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType1PatternDictionary& operator=(const SkPdfType1PatternDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Pattern for a pattern dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the type of pattern that this dictionary de-
+ * scribes; must be 1 for a tiling pattern.
+**/
+ bool has_PatternType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PatternType", "", NULL));
+ }
+
long PatternType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PatternType", "", &ret)) return ret;
@@ -535,6 +550,22 @@ public:
return 0;
}
+/** (Required) A code that determines how the color of the pattern cell is to be
+ * specified:
+ * 1 Colored tiling pattern. The pattern's content stream itself specifies the
+ * colors used to paint the pattern cell. When the content stream begins
+ * execution, the current color is the one that was initially in effect in the
+ * pattern's parent content stream. (This is similar to the definition of the
+ * pattern matrix; see Section 4.6.1, "General Properties of Patterns.")
+ * 2 Uncolored tiling pattern. The pattern's content stream does not speci-
+ * fy any color information. Instead, the entire pattern cell is painted
+ * with a separately specified color each time the pattern is used. Essen-
+ * tially, the content stream describes a stencil through which the cur-
+**/
+ bool has_PaintType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PaintType", "", NULL));
+ }
+
long PaintType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PaintType", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType1ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType1ShadingDictionary_autogen.h
index 1ae12a1650..dcbb6b4164 100644
--- a/experimental/PdfViewer/SkPdfType1ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType1ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 1 shading dictionary
class SkPdfType1ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType1ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,14 @@ public:
SkPdfType1ShadingDictionary& operator=(const SkPdfType1ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) An array of four numbers [ xmin xmax ymin ymax ] specifying the rec-
+ * tangular domain of coordinates over which the color function(s) are defined.
+ * Default value: [0.0 1.0 0.0 1.0].
+**/
+ bool has_Domain() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", NULL));
+ }
+
SkPdfArray Domain() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", &ret)) return ret;
@@ -45,6 +54,17 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of six numbers specifying a transformation matrix mapping
+ * the coordinate space specified by the Domain entry into the shading's target co-
+ * ordinate space. For example, to map the domain rectangle [0.0 1.0 0.0 1.0] to a
+ * 1-inch square with lower-left corner at coordinates (100, 100) in default user
+ * space, the Matrix value would be [72 0 0 72 100 100]. Default value: the iden-
+ * tity matrix [1 0 0 1 0 0].
+**/
+ bool has_Matrix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
+ }
+
SkPdfArray Matrix() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
@@ -52,6 +72,16 @@ public:
return SkPdfArray();
}
+/** (Required) A 2-in, n-out function or an array of n 2-in, 1-out functions (where n
+ * is the number of color components in the shading dictionary's color space).
+ * Each function's domain must be a superset of that of the shading dictionary. If
+ * the value returned by the function for a given color component is out of range, it
+ * will be adjusted to the nearest valid value.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType2FunctionDictionary_autogen.h b/experimental/PdfViewer/SkPdfType2FunctionDictionary_autogen.h
index 1997355cbc..c9d359d69b 100644
--- a/experimental/PdfViewer/SkPdfType2FunctionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType2FunctionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 2 function dictionary
class SkPdfType2FunctionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType2FunctionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType2FunctionDictionary& operator=(const SkPdfType2FunctionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) An array of n numbers defining the function result when x = 0.0 (hence the "0"
+ * in the name). Default value: [0.0].
+**/
+ bool has_C0() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", NULL));
+ }
+
SkPdfArray C0() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C0", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of n numbers defining the function result when x = 1.0 (hence the "1"
+ * in the name). Default value: [1.0].
+**/
+ bool has_C1() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", NULL));
+ }
+
SkPdfArray C1() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C1", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return SkPdfArray();
}
+/** (Required) The interpolation exponent. Each input value x will return n values, given by
+ * yj = C0j + xN x (C1j - C0j ), for 0 <= j < n.
+**/
+ bool has_N() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
+ }
+
double N() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType2PatternDictionary_autogen.h b/experimental/PdfViewer/SkPdfType2PatternDictionary_autogen.h
index 08004f222b..cca506ca1d 100644
--- a/experimental/PdfViewer/SkPdfType2PatternDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType2PatternDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a type 2 pattern dictionary
class SkPdfType2PatternDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType2PatternDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType2PatternDictionary& operator=(const SkPdfType2PatternDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Pattern for a pattern dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
long Type() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return 0;
}
+/** (Required) A code identifying the type of pattern that this dictionary de-
+ * scribes; must be 2 for a shading pattern.
+**/
+ bool has_PatternType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PatternType", "", NULL));
+ }
+
long PatternType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PatternType", "", &ret)) return ret;
@@ -535,6 +550,14 @@ public:
return 0;
}
+/** (Required) A shading object (see below) defining the shading pattern's gradient
+ * fill. The contents of the dictionary consist of the entries in Table 4.25 on page
+ * 234, plus those in one of Tables 4.26 to 4.31 on pages 237 to 253.
+**/
+ bool has_Shading() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shading", "", NULL));
+ }
+
bool isShadingADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Shading", "", &ret)) return false;
@@ -561,6 +584,14 @@ public:
return SkPdfStream();
}
+/** (Optional) An array of six numbers specifying the pattern matrix (see Section
+ * 4.6.1, "General Properties of Patterns"). Default value: the identity matrix
+ * [1 0 0 1 0 0].
+**/
+ bool has_Matrix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
+ }
+
SkPdfArray Matrix() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
@@ -568,6 +599,17 @@ public:
return SkPdfArray();
}
+/** (Optional) A graphics state parameter dictionary (see Section 4.3.4, "Graph-
+ * ics State Parameter Dictionaries") containing graphics state parameters to be
+ * put into effect temporarily while the shading pattern is painted. Any parame-
+ * ters that are not so specified are inherited from the graphics state that was in
+ * effect at the beginning of the content stream in which the pattern is defined
+ * as a resource.
+**/
+ bool has_ExtGState() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGState", "", NULL));
+ }
+
SkPdfDictionary* ExtGState() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ExtGState", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType2ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType2ShadingDictionary_autogen.h
index 7a6a706f64..b56edf45b0 100644
--- a/experimental/PdfViewer/SkPdfType2ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType2ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 2 shading dictionary
class SkPdfType2ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType2ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,14 @@ public:
SkPdfType2ShadingDictionary& operator=(const SkPdfType2ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of four numbers [ x0 y0 x1 y1 ] specifying the starting and
+ * ending coordinates of the axis, expressed in the shading's target coordinate
+ * space.
+**/
+ bool has_Coords() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coords", "", NULL));
+ }
+
SkPdfArray Coords() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coords", "", &ret)) return ret;
@@ -45,6 +54,16 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of two numbers [ t0 t1 ] specifying the limiting values of a
+ * parametric variable t. The variable is considered to vary linearly between these
+ * two values as the color gradient varies between the starting and ending points of
+ * the axis. The variable t becomes the input argument to the color function(s).
+ * Default value: [0.0 1.0].
+**/
+ bool has_Domain() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", NULL));
+ }
+
SkPdfArray Domain() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", &ret)) return ret;
@@ -52,6 +71,17 @@ public:
return SkPdfArray();
}
+/** (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n
+ * is the number of color components in the shading dictionary's color space). The
+ * function(s) are called with values of the parametric variable t in the domain de-
+ * fined by the Domain entry. Each function's domain must be a superset of that of
+ * the shading dictionary. If the value returned by the function for a given color
+ * component is out of range, it will be adjusted to the nearest valid value.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
@@ -59,6 +89,14 @@ public:
return SkPdfFunction();
}
+/** (Optional) An array of two boolean values specifying whether to extend the
+ * shading beyond the starting and ending points of the axis, respectively. Default
+ * value: [false false].
+**/
+ bool has_Extend() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Extend", "", NULL));
+ }
+
SkPdfArray Extend() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Extend", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType3FontDictionary_autogen.h b/experimental/PdfViewer/SkPdfType3FontDictionary_autogen.h
index e50b6a4d32..4f54a19a75 100644
--- a/experimental/PdfViewer/SkPdfType3FontDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType3FontDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfFontDictionary_autogen.h"
+// Entries in a Type 3 font dictionary
class SkPdfType3FontDictionary : public SkPdfFontDictionary {
public:
virtual SkPdfObjectType getType() const { return kType3FontDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfType3FontDictionary& operator=(const SkPdfType3FontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of PDF object that this dictionary describes; must be
+ * Font for a font dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -45,6 +53,12 @@ public:
return "";
}
+/** (Required) The type of font; must be Type3 for a Type 3 font.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -52,6 +66,12 @@ public:
return "";
}
+/** (Required in PDF 1.0; optional otherwise) See Table 5.8 on page 317.
+**/
+ bool has_Name() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
+ }
+
std::string Name() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
@@ -59,6 +79,19 @@ public:
return "";
}
+/** (Required) A rectangle (see Section 3.8.3, "Rectangles"), expressed in the
+ * glyph coordinate system, specifying the font bounding box. This is the small-
+ * est rectangle enclosing the shape that would result if all of the glyphs of the
+ * font were placed with their origins coincident and then filled.
+ * If all four elements of the rectangle are zero, no assumptions are made based
+ * on the font bounding box. If any element is nonzero, it is essential that the
+ * font bounding box be accurate; if any glyph's marks fall outside this bound-
+ * ing box, incorrect behavior may result.
+**/
+ bool has_FontBBox() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontBBox", "", NULL));
+ }
+
SkRect FontBBox() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontBBox", "", &ret)) return ret;
@@ -66,6 +99,14 @@ public:
return SkRect();
}
+/** (Required) An array of six numbers specifying the font matrix, mapping
+ * glyph space to text space (see Section 5.1.3, "Glyph Positioning and
+ * Metrics"). A common practice is to define glyphs in terms of a 1000-unit
+**/
+ bool has_FontMatrix() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontMatrix", "", NULL));
+ }
+
SkPdfArray FontMatrix() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontMatrix", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType3FunctionDictionary_autogen.h b/experimental/PdfViewer/SkPdfType3FunctionDictionary_autogen.h
index d58950d597..01e3eda7fc 100644
--- a/experimental/PdfViewer/SkPdfType3FunctionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType3FunctionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 3 function dictionary
class SkPdfType3FunctionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType3FunctionDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfType3FunctionDictionary& operator=(const SkPdfType3FunctionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of k 1-input functions making up the stitching function. The out-
+ * put dimensionality of all functions must be the same, and compatible with the value of
+ * Range if Range is present.
+**/
+ bool has_Functions() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functions", "", NULL));
+ }
+
SkPdfArray Functions() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Functions", "", &ret)) return ret;
@@ -528,6 +537,15 @@ public:
return SkPdfArray();
}
+/** (Required) An array of k - 1 numbers that, in combination with Domain, define the
+ * intervals to which each function from the Functions array applies. Bounds elements
+ * must be in order of increasing value, and each value must be within the domain
+ * defined by Domain.
+**/
+ bool has_Bounds() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bounds", "", NULL));
+ }
+
SkPdfArray Bounds() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bounds", "", &ret)) return ret;
@@ -535,6 +553,14 @@ public:
return SkPdfArray();
}
+/** (Required) An array of 2 x k numbers that, taken in pairs, map each subset of the do-
+ * main defined by Domain and the Bounds array to the domain of the corresponding
+ * function.
+**/
+ bool has_Encode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "", NULL));
+ }
+
SkPdfArray Encode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encode", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType3ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType3ShadingDictionary_autogen.h
index 00642c2737..91e25f46cf 100644
--- a/experimental/PdfViewer/SkPdfType3ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType3ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 3 shading dictionary
class SkPdfType3ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType3ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,16 @@ public:
SkPdfType3ShadingDictionary& operator=(const SkPdfType3ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) An array of six numbers [ x0 y0 r0 x1 y1 r1 ] specifying the centers and
+ * radii of the starting and ending circles, expressed in the shading's target coor-
+ * dinate space. The radii r0 and r1 must both be greater than or equal to 0. If one
+ * radius is 0, the corresponding circle is treated as a point; if both are 0, nothing is
+ * painted.
+**/
+ bool has_Coords() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coords", "", NULL));
+ }
+
SkPdfArray Coords() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Coords", "", &ret)) return ret;
@@ -45,6 +56,16 @@ public:
return SkPdfArray();
}
+/** (Optional) An array of two numbers [ t0 t1 ] specifying the limiting values of a
+ * parametric variable t. The variable is considered to vary linearly between these
+ * two values as the color gradient varies between the starting and ending circles.
+ * The variable t becomes the input argument to the color function(s). Default
+ * value: [0.0 1.0].
+**/
+ bool has_Domain() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", NULL));
+ }
+
SkPdfArray Domain() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Domain", "", &ret)) return ret;
@@ -52,6 +73,18 @@ public:
return SkPdfArray();
}
+/** (Required) A 1-in, n-out function or an array of n 1-in, 1-out functions (where n
+ * is the number of color components in the shading dictionary's color space). The
+ * function(s) are called with values of the parametric variable t in the domain de-
+ * fined by the shading dictionary's Domain entry. Each function's domain must be
+ * a superset of that of the shading dictionary. If the value returned by the function
+ * for a given color component is out of range, it will be adjusted to the nearest
+ * valid value.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
@@ -59,6 +92,14 @@ public:
return SkPdfFunction();
}
+/** (Optional) An array of two boolean values specifying whether to extend the
+ * shading beyond the starting and ending circles, respectively. Default value:
+ * [false false].
+**/
+ bool has_Extend() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Extend", "", NULL));
+ }
+
SkPdfArray Extend() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Extend", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType4ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType4ShadingDictionary_autogen.h
index 6b0f1a3d66..6f9e180f7c 100644
--- a/experimental/PdfViewer/SkPdfType4ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType4ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 4 shading dictionary
class SkPdfType4ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType4ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfType4ShadingDictionary& operator=(const SkPdfType4ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The number of bits used to represent each vertex coordinate.
+ * Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
+**/
+ bool has_BitsPerCoordinate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", NULL));
+ }
+
long BitsPerCoordinate() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", &ret)) return ret;
@@ -45,6 +53,13 @@ public:
return 0;
}
+/** (Required) The number of bits used to represent each color component.
+ * Valid values are 1, 2, 4, 8, 12, and 16.
+**/
+ bool has_BitsPerComponent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", NULL));
+ }
+
long BitsPerComponent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", &ret)) return ret;
@@ -52,6 +67,15 @@ public:
return 0;
}
+/** (Required) The number of bits used to represent the edge flag for each ver-
+ * tex (see below). Valid values of BitsPerFlag are 2, 4, and 8, but only the
+ * least significant 2 bits in each flag value are used. Valid values for the edge
+ * flag itself are 0, 1, and 2.
+**/
+ bool has_BitsPerFlag() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag", "", NULL));
+ }
+
long BitsPerFlag() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag", "", &ret)) return ret;
@@ -59,6 +83,18 @@ public:
return 0;
}
+/** (Required) An array of numbers specifying how to map vertex coordinates
+ * and color components into the appropriate ranges of values. The de-
+ * coding method is similar to that used in image dictionaries (see "Decode
+ * Arrays" on page 271). The ranges are specified as follows:
+ * [ xmin xmax ymin ymax c1,min c1,max ... cn,min cn,max ]
+ * Note that only one pair of c values should be specified if a Function entry
+ * is present.
+**/
+ bool has_Decode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", NULL));
+ }
+
SkRect Decode() const {
SkRect ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", &ret)) return ret;
@@ -66,6 +102,23 @@ public:
return SkRect();
}
+/** (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
+ * (where n is the number of color components in the shading dictionary's
+ * color space). If this entry is present, the color data for each vertex must be
+ * specified by a single parametric variable rather than by n separate color
+ * components; the designated function(s) will be called with each interpo-
+ * lated value of the parametric variable to determine the actual color at each
+ * point. Each input value will be forced into the range interval specified for
+ * the corresponding color component in the shading dictionary's Decode
+ * array. Each function's domain must be a superset of that interval. If the
+ * value returned by the function for a given color component is out of
+ * range, it will be adjusted to the nearest valid value.
+ * This entry may not be used with an Indexed color space.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType5HalftoneDictionary_autogen.h b/experimental/PdfViewer/SkPdfType5HalftoneDictionary_autogen.h
index 648d3750e1..9c540890d3 100644
--- a/experimental/PdfViewer/SkPdfType5HalftoneDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType5HalftoneDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a type 5 halftone dictionary
class SkPdfType5HalftoneDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType5HalftoneDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType5HalftoneDictionary& operator=(const SkPdfType5HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present,
+ * must be Halftone for a halftone dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the halftone type that this dictionary describes;
+ * must be 5 for this type of halftone.
+**/
+ bool has_HalftoneType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
+ }
+
double HalftoneType() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
@@ -535,6 +550,12 @@ public:
return 0;
}
+/** (Optional) The name of the halftone dictionary.
+**/
+ bool has_HalftoneName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
+ }
+
std::string HalftoneName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
@@ -542,10 +563,16 @@ public:
return "";
}
+/** (Required, one per colorant) The halftone corresponding to the colorant or
+ * color component named by the key. The halftone may be of any type other
+ * than 5. Note that the key must be a name object; strings are not permitted, as
+ * they are in type 5 PostScript halftone dictionaries.
+**/
/*
bool has_[any_colorant_name]() const {
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "[any_colorant_name]", "", NULL));
}
+
bool is[any_colorant_name]ADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "[any_colorant_name]", "", &ret)) return false;
@@ -573,6 +600,15 @@ public:
}
*/
+/** (Required) A halftone to be used for any colorant or color component that
+ * does not have an entry of its own. The value may not be a type 5 halftone. If
+ * there are any nonprimary colorants, the default halftone must have a transfer
+ * function.
+**/
+ bool has_Default() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Default", "", NULL));
+ }
+
bool isDefaultADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Default", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h
index 102a13e2b4..ef8f494251 100644
--- a/experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType5ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 5 shading dictionary
class SkPdfType5ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType5ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfType5ShadingDictionary& operator=(const SkPdfType5ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The number of bits used to represent each vertex coordinate.
+ * Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
+**/
+ bool has_BitsPerCoordinate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", NULL));
+ }
+
long BitsPerCoordinate() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", &ret)) return ret;
@@ -45,6 +53,13 @@ public:
return 0;
}
+/** (Required) The number of bits used to represent each color component.
+ * Valid values are 1, 2, 4, 8, 12, and 16.
+**/
+ bool has_BitsPerComponent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", NULL));
+ }
+
long BitsPerComponent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", &ret)) return ret;
@@ -52,6 +67,14 @@ public:
return 0;
}
+/** (Required) The number of vertices in each row of the lattice; the value
+ * must be greater than or equal to 2. The number of rows need not be
+ * specified.
+**/
+ bool has_VerticesPerRow() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "VerticesPerRow", "", NULL));
+ }
+
long VerticesPerRow() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "VerticesPerRow", "", &ret)) return ret;
@@ -59,6 +82,18 @@ public:
return 0;
}
+/** (Required) An array of numbers specifying how to map vertex coordinates
+ * and color components into the appropriate ranges of values. The de-
+ * coding method is similar to that used in image dictionaries (see "Decode
+ * Arrays" on page 271). The ranges are specified as follows:
+ * [ xmin xmax ymin ymax c1,min c1,max ... cn,min cn,max ]
+ * Note that only one pair of c values should be specified if a Function entry
+ * is present.
+**/
+ bool has_Decode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", NULL));
+ }
+
SkPdfArray Decode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", &ret)) return ret;
@@ -66,6 +101,23 @@ public:
return SkPdfArray();
}
+/** (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
+ * (where n is the number of color components in the shading dictionary's
+ * color space). If this entry is present, the color data for each vertex must be
+ * specified by a single parametric variable rather than by n separate color
+ * components; the designated function(s) will be called with each interpo-
+ * lated value of the parametric variable to determine the actual color at each
+ * point. Each input value will be forced into the range interval specified for
+ * the corresponding color component in the shading dictionary's Decode
+ * array. Each function's domain must be a superset of that interval. If the
+ * value returned by the function for a given color component is out of
+ * range, it will be adjusted to the nearest valid value.
+ * This entry may not be used with an Indexed color space.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfType6HalftoneDictionary_autogen.h b/experimental/PdfViewer/SkPdfType6HalftoneDictionary_autogen.h
index 22a1b80486..69623f2519 100644
--- a/experimental/PdfViewer/SkPdfType6HalftoneDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType6HalftoneDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a type 6 halftone dictionary
class SkPdfType6HalftoneDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kType6HalftoneDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfType6HalftoneDictionary& operator=(const SkPdfType6HalftoneDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if
+ * present, must be Halftone for a halftone dictionary.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Required) A code identifying the halftone type that this dictionary
+ * describes; must be 6 for this type of halftone.
+**/
+ bool has_HalftoneType() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
+ }
+
long HalftoneType() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
@@ -535,6 +550,12 @@ public:
return 0;
}
+/** (Optional) The name of the halftone dictionary.
+**/
+ bool has_HalftoneName() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
+ }
+
std::string HalftoneName() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
@@ -542,6 +563,12 @@ public:
return "";
}
+/** (Required) The width of the threshold array, in device pixels.
+**/
+ bool has_Width() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", NULL));
+ }
+
long Width() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
@@ -549,6 +576,12 @@ public:
return 0;
}
+/** (Required) The height of the threshold array, in device pixels.
+**/
+ bool has_Height() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", NULL));
+ }
+
long Height() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
@@ -556,6 +589,18 @@ public:
return 0;
}
+/** (Optional) A transfer function, which overrides the current transfer
+ * function in the graphics state for the same component. This entry is
+ * required if the dictionary is a component of a type 5 halftone (see
+ * "Type 5 Halftones" on page 400) and represents either a nonprimary
+ * or nonstandard primary color component (see Section 6.3, "Transfer
+ * Functions"). The name Identity may be used to specify the identity
+ * function.
+**/
+ bool has_TransferFunction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", NULL));
+ }
+
bool isTransferFunctionAFunction() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfType6ShadingDictionary_autogen.h b/experimental/PdfViewer/SkPdfType6ShadingDictionary_autogen.h
index 4ada31d869..825262b072 100644
--- a/experimental/PdfViewer/SkPdfType6ShadingDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfType6ShadingDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfShadingDictionary_autogen.h"
+// Additional entries specific to a type 6 shading dictionary
class SkPdfType6ShadingDictionary : public SkPdfShadingDictionary {
public:
virtual SkPdfObjectType getType() const { return kType6ShadingDictionary_SkPdfObjectType;}
@@ -38,6 +39,13 @@ public:
SkPdfType6ShadingDictionary& operator=(const SkPdfType6ShadingDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The number of bits used to represent each geometric coordi-
+ * nate. Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
+**/
+ bool has_BitsPerCoordinate() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", NULL));
+ }
+
long BitsPerCoordinate() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerCoordinate", "", &ret)) return ret;
@@ -45,6 +53,13 @@ public:
return 0;
}
+/** (Required) The number of bits used to represent each color component.
+ * Valid values are 1, 2, 4, 8, 12, and 16.
+**/
+ bool has_BitsPerComponent() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", NULL));
+ }
+
long BitsPerComponent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerComponent", "", &ret)) return ret;
@@ -52,6 +67,15 @@ public:
return 0;
}
+/** (Required) The number of bits used to represent the edge flag for each
+ * patch (see below). Valid values of BitsPerFlag are 2, 4, and 8, but only the
+ * least significant 2 bits in each flag value are used. Valid values for the edge
+ * flag itself are 0, 1, 2, and 3.
+**/
+ bool has_BitsPerFlag() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag", "", NULL));
+ }
+
long BitsPerFlag() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BitsPerFlag", "", &ret)) return ret;
@@ -59,6 +83,18 @@ public:
return 0;
}
+/** (Required) An array of numbers specifying how to map coordinates and
+ * color components into the appropriate ranges of values. The decoding
+ * method is similar to that used in image dictionaries (see "Decode Arrays"
+ * on page 271). The ranges are specified as follows:
+ * [ xmin xmax ymin ymax c1,min c1,max ... cn,min cn,max ]
+ * Note that only one pair of c values should be specified if a Function entry
+ * is present.
+**/
+ bool has_Decode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", NULL));
+ }
+
SkPdfArray Decode() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Decode", "", &ret)) return ret;
@@ -66,6 +102,23 @@ public:
return SkPdfArray();
}
+/** (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
+ * (where n is the number of color components in the shading dictionary's
+ * color space). If this entry is present, the color data for each vertex must be
+ * specified by a single parametric variable rather than by n separate color
+ * components; the designated function(s) will be called with each interpo-
+ * lated value of the parametric variable to determine the actual color at each
+ * point. Each input value will be forced into the range interval specified for
+ * the corresponding color component in the shading dictionary's Decode
+ * array. Each function's domain must be a superset of that interval. If the
+ * value returned by the function for a given color component is out of
+ * range, it will be adjusted to the nearest valid value.
+ * This entry may not be used with an Indexed color space.
+**/
+ bool has_Function() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", NULL));
+ }
+
SkPdfFunction Function() const {
SkPdfFunction ret;
if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Function", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfURIActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfURIActionDictionary_autogen.h
index 104b141c32..75afbcce65 100644
--- a/experimental/PdfViewer/SkPdfURIActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfURIActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a URI action
class SkPdfURIActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kURIActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfURIActionDictionary& operator=(const SkPdfURIActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of action that this dictionary describes; must be URI for a URI
+ * action.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,12 @@ public:
return "";
}
+/** (Required) The uniform resource identifier to resolve, encoded in 7-bit ASCII.
+**/
+ bool has_URI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", NULL));
+ }
+
std::string URI() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", &ret)) return ret;
@@ -535,6 +549,16 @@ public:
return "";
}
+/** (Optional) A flag specifying whether to track the mouse position when the URI is re-
+ * solved (see below). Default value: false.
+ * This entry applies only to actions triggered by the user's clicking an annotation; it is
+ * ignored for actions associated with outline items or with a document's OpenAction
+ * entry.
+**/
+ bool has_IsMap() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IsMap", "", NULL));
+ }
+
bool IsMap() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IsMap", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfURIDictionary_autogen.h b/experimental/PdfViewer/SkPdfURIDictionary_autogen.h
index 1b282fa1c0..4196424d0c 100644
--- a/experimental/PdfViewer/SkPdfURIDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfURIDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entry in a URI dictionary
class SkPdfURIDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kURIDictionary_SkPdfObjectType;}
@@ -521,6 +522,17 @@ public:
SkPdfURIDictionary& operator=(const SkPdfURIDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The base URI to be used in resolving relative URI references. URI actions
+ * within the document may specify URIs in partial form, to be interpreted relative to
+ * this base address. If no base URI is specified, such partial URIs will be interpreted rel-
+ * ative to the location of the document itself. The use of this entry is parallel to that of
+ * the body element <BASE>, as described in section 2.7.2 of Internet RFC 1866, Hyper-
+ * text Markup Language 2.0 Proposed Standard (see the Bibliography).
+**/
+ bool has_Base() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Base", "", NULL));
+ }
+
std::string Base() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Base", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfURLAliasDictionary_autogen.h b/experimental/PdfViewer/SkPdfURLAliasDictionary_autogen.h
index 2323bcbb99..2dfe11819d 100644
--- a/experimental/PdfViewer/SkPdfURLAliasDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfURLAliasDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a URL alias dictionary
class SkPdfURLAliasDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kURLAliasDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfURLAliasDictionary& operator=(const SkPdfURLAliasDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The destination URL to which all of the chains specified by the C entry lead.
+**/
+ bool has_U() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", NULL));
+ }
+
std::string U() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &ret)) return ret;
@@ -528,6 +535,13 @@ public:
return "";
}
+/** (Optional) An array of one or more arrays of strings, each representing a chain of URLs
+ * leading to the common destination specified by U.
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfArray C() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfVariableTextFieldDictionary_autogen.h b/experimental/PdfViewer/SkPdfVariableTextFieldDictionary_autogen.h
index 1637098378..e27e173e08 100644
--- a/experimental/PdfViewer/SkPdfVariableTextFieldDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfVariableTextFieldDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries common to all fields containing variable text
class SkPdfVariableTextFieldDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kVariableTextFieldDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfVariableTextFieldDictionary& operator=(const SkPdfVariableTextFieldDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required; inheritable) A resource dictionary (see Section 3.7.2, "Resource Diction-
+ * aries") containing default resources (such as fonts, patterns, or color spaces) to be used
+ * by the appearance stream. At a minimum, this dictionary must contain a Font entry
+ * specifying the resource name and font dictionary of the default font for displaying the
+ * field's text. (See implementation note 84 in Appendix H.)
+**/
+ bool has_DR() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", NULL));
+ }
+
SkPdfDictionary* DR() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", &ret)) return ret;
@@ -528,6 +539,14 @@ public:
return NULL;
}
+/** (Required; inheritable) The default appearance string, containing a sequence of valid
+ * page-content graphics or text state operators defining such properties as the field's text
+ * size and color.
+**/
+ bool has_DA() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", NULL));
+ }
+
std::string DA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", &ret)) return ret;
@@ -535,6 +554,17 @@ public:
return "";
}
+/** (Optional; inheritable) A code specifying the form of quadding (justification) to be
+ * used in displaying the text:
+ * 0 Left-justified
+ * 1 Centered
+ * 2 Right-justified
+ * Default value: 0 (left-justified).
+**/
+ bool has_Q() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", NULL));
+ }
+
long Q() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfViewerPreferencesDictionary_autogen.h b/experimental/PdfViewer/SkPdfViewerPreferencesDictionary_autogen.h
index 74a773f65c..5f0816a802 100644
--- a/experimental/PdfViewer/SkPdfViewerPreferencesDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfViewerPreferencesDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a viewer preferences dictionary
class SkPdfViewerPreferencesDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kViewerPreferencesDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfViewerPreferencesDictionary& operator=(const SkPdfViewerPreferencesDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A flag specifying whether to hide the viewer application's tool
+ * bars when the document is active. Default value: false.
+**/
+ bool has_HideToolbar() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideToolbar", "", NULL));
+ }
+
bool HideToolbar() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideToolbar", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to hide the viewer application's
+ * menu bar when the document is active. Default value: false.
+**/
+ bool has_HideMenubar() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideMenubar", "", NULL));
+ }
+
bool HideMenubar() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideMenubar", "", &ret)) return ret;
@@ -535,6 +550,14 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to hide user interface elements in
+ * the document's window (such as scroll bars and navigation controls),
+ * leaving only the document's contents displayed. Default value: false.
+**/
+ bool has_HideWindowUI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideWindowUI", "", NULL));
+ }
+
bool HideWindowUI() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HideWindowUI", "", &ret)) return ret;
@@ -542,6 +565,13 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to resize the document's window to
+ * fit the size of the first displayed page. Default value: false.
+**/
+ bool has_FitWindow() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FitWindow", "", NULL));
+ }
+
bool FitWindow() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FitWindow", "", &ret)) return ret;
@@ -549,6 +579,13 @@ public:
return false;
}
+/** (Optional) A flag specifying whether to position the document's window
+ * in the center of the screen. Default value: false.
+**/
+ bool has_CenterWindow() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CenterWindow", "", NULL));
+ }
+
bool CenterWindow() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CenterWindow", "", &ret)) return ret;
@@ -556,6 +593,16 @@ public:
return false;
}
+/** (Optional; PDF 1.4) A flag specifying whether the window's title bar
+ * should display the document title taken from the Title entry of the docu-
+ * ment information dictionary (see Section 9.2.1, "Document Informa-
+ * tion Dictionary"). If false, the title bar should instead display the name
+ * of the PDF file containing the document. Default value: false.
+**/
+ bool has_DisplayDocTitle() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DisplayDocTitle", "", NULL));
+ }
+
bool DisplayDocTitle() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DisplayDocTitle", "", &ret)) return ret;
@@ -563,6 +610,20 @@ public:
return false;
}
+/** (Optional) The document's page mode, specifying how to display the
+ * document on exiting full-screen mode:
+ * UseNone Neither document outline nor thumbnail images
+ * visible
+ * UseOutlines Document outline visible
+ * UseThumbs Thumbnail images visible
+ * This entry is meaningful only if the value of the PageMode entry in the
+ * catalog dictionary (see Section 3.6.1, "Document Catalog") is FullScreen;
+ * it is ignored otherwise. Default value: UseNone.
+**/
+ bool has_NonFullScreenPageMode() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NonFullScreenPageMode", "", NULL));
+ }
+
std::string NonFullScreenPageMode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NonFullScreenPageMode", "", &ret)) return ret;
@@ -570,6 +631,18 @@ public:
return "";
}
+/** (Optional; PDF 1.3) The predominant reading order for text:
+ * L2R Left to right
+ * R2L Right to left (including vertical writing systems
+ * such as Chinese, Japanese, and Korean)
+ * This entry has no direct effect on the document's contents or page num-
+ * bering, but can be used to determine the relative positioning of pages
+ * when displayed side by side or printed n-up. Default value: L2R.
+**/
+ bool has_Direction() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Direction", "", NULL));
+ }
+
std::string Direction() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Direction", "", &ret)) return ret;
@@ -577,6 +650,21 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The name of the page boundary representing the
+ * area of a page to be displayed when viewing the document on the screen.
+ * The value is the key designating the relevant page boundary in the page
+ * object (see "Page Objects" on page 87 and Section 9.10.1, "Page Bound-
+ * aries"). If the specified page boundary is not defined in the page object,
+ * its default value will be used, as specified in Table 3.18 on page 88.
+ * Default value: CropBox.
+ * Note: This entry is intended primarily for use by prepress applications that
+ * interpret or manipulate the page boundaries as described in Section 9.10.1,
+ * "Page Boundaries." Most PDF consumer applications will disregard it.
+**/
+ bool has_ViewArea() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewArea", "", NULL));
+ }
+
std::string ViewArea() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewArea", "", &ret)) return ret;
@@ -584,6 +672,21 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The name of the page boundary to which the con-
+ * tents of a page are to be clipped when viewing the document on the
+ * screen. The value is the key designating the relevant page boundary in
+ * the page object (see "Page Objects" on page 87 and Section 9.10.1, "Page
+ * Boundaries"). If the specified page boundary is not defined in the page
+ * object, its default value will be used, as specified in Table 3.18 on page
+ * 88. Default value: CropBox.
+ * Note: This entry is intended primarily for use by prepress applications that
+ * interpret or manipulate the page boundaries as described in Section 9.10.1,
+ * "Page Boundaries." Most PDF consumer applications will disregard it.
+**/
+ bool has_ViewClip() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewClip", "", NULL));
+ }
+
std::string ViewClip() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewClip", "", &ret)) return ret;
@@ -591,6 +694,20 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The name of the page boundary representing the
+ * area of a page to be rendered when printing the document. The value is
+ * the key designating the relevant page boundary in the page object (see
+ * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the
+ * specified page boundary is not defined in the page object, its default value
+ * will be used, as specified in Table 3.18 on page 88. Default value: CropBox.
+ * Note: This entry is intended primarily for use by prepress applications that
+ * interpret or manipulate the page boundaries as described in Section 9.10.1,
+ * "Page Boundaries." Most PDF consumer applications will disregard it.
+**/
+ bool has_PrintArea() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintArea", "", NULL));
+ }
+
std::string PrintArea() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintArea", "", &ret)) return ret;
@@ -598,6 +715,20 @@ public:
return "";
}
+/** (Optional; PDF 1.4) The name of the page boundary to which the con-
+ * tents of a page are to be clipped when printing the document. The value
+ * is the key designating the relevant page boundary in the page object (see
+ * "Page Objects" on page 87 and Section 9.10.1, "Page Boundaries"). If the
+ * specified page boundary is not defined in the page object, its default value
+ * will be used, as specified in Table 3.18 on page 88. Default value: CropBox.
+ * Note: This entry is intended primarily for use by prepress applications that
+ * interpret or manipulate the page boundaries as described in Section 9.10.1,
+ * "Page Boundaries." Most PDF consumer applications will disregard it.
+**/
+ bool has_PrintClip() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintClip", "", NULL));
+ }
+
std::string PrintClip() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PrintClip", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWebCaptureCommandDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCaptureCommandDictionary_autogen.h
index 0f8d4d5296..89d8a5c067 100644
--- a/experimental/PdfViewer/SkPdfWebCaptureCommandDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCaptureCommandDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a Web Capture command dictionary
class SkPdfWebCaptureCommandDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCaptureCommandDictionary_SkPdfObjectType;}
@@ -521,6 +522,12 @@ public:
SkPdfWebCaptureCommandDictionary& operator=(const SkPdfWebCaptureCommandDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The initial URL from which source data was requested.
+**/
+ bool has_URL() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URL", "", NULL));
+ }
+
std::string URL() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URL", "", &ret)) return ret;
@@ -528,6 +535,13 @@ public:
return "";
}
+/** (Optional) The number of levels of pages retrieved from the initial URL. Default
+ * value: 1.
+**/
+ bool has_L() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", NULL));
+ }
+
long L() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &ret)) return ret;
@@ -535,6 +549,13 @@ public:
return 0;
}
+/** (Optional) A set of flags specifying various characteristics of the command (see
+ * Table 9.39). Default value: 0.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -542,6 +563,12 @@ public:
return 0;
}
+/** (Optional) Data that was posted to the URL.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
bool isPAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return false;
@@ -568,6 +595,13 @@ public:
return SkPdfStream();
}
+/** (Optional) A content type describing the data posted to the URL. Default value:
+ * application/x-www-form-urlencoded.
+**/
+ bool has_CT() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", NULL));
+ }
+
std::string CT() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", &ret)) return ret;
@@ -575,6 +609,12 @@ public:
return "";
}
+/** (Optional) Additional HTTP request headers sent to the URL.
+**/
+ bool has_H() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
+ }
+
std::string H() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
@@ -582,6 +622,13 @@ public:
return "";
}
+/** (Optional) A command settings dictionary containing settings used in the con-
+ * version process (see "Command Settings" on page 674).
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
SkPdfDictionary* S() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWebCaptureCommandSettingsDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCaptureCommandSettingsDictionary_autogen.h
index ca953189ed..88f7f9a01f 100644
--- a/experimental/PdfViewer/SkPdfWebCaptureCommandSettingsDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCaptureCommandSettingsDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a Web Capture command settings dictionary
class SkPdfWebCaptureCommandSettingsDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCaptureCommandSettingsDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfWebCaptureCommandSettingsDictionary& operator=(const SkPdfWebCaptureCommandSettingsDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) A dictionary containing global conversion engine settings relevant to all con-
+ * version engines. If this key is absent, default settings will be used.
+**/
+ bool has_G() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "G", "", NULL));
+ }
+
SkPdfDictionary* G() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "G", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return NULL;
}
+/** (Optional) Settings for specific conversion engines. Each key in this dictionary is the
+ * internal name of a conversion engine (see below). The associated value is a dictionary
+ * containing the settings associated with that conversion engine. If the settings for a par-
+ * ticular conversion engine are not found in the dictionary, default settings will be used.
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfDictionary* C() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h
index fa77815234..d0050032c5 100644
--- a/experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries common to all Web Capture content sets
class SkPdfWebCaptureDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCaptureDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfWebCaptureDictionary& operator=(const SkPdfWebCaptureDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Optional) The type of PDF object that this dictionary describes; if present, must be
+ * SpiderContentSet for a Web Capture content set.
+**/
+ bool has_Type() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
+ }
+
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
@@ -528,6 +536,14 @@ public:
return "";
}
+/** (Required) The subtype of content set that this dictionary describes:
+ * SPS ("Spider page set") A page set
+ * SIS ("Spider image set") An image set
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -535,6 +551,14 @@ public:
return "";
}
+/** (Required) The digital identifier of the content set (see "Digital Identifiers" on page
+ * 664). If the content set has been located via the URLS name tree, this allows its related
+ * entry in the IDS name tree to be found.
+**/
+ bool has_ID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
+ }
+
std::string ID() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
@@ -542,6 +566,14 @@ public:
return "";
}
+/** (Required) An array of indirect references to the objects belonging to the content set.
+ * The order of objects in the array is undefined in general, but may be restricted by spe-
+ * cific content set subtypes.
+**/
+ bool has_O() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
+ }
+
SkPdfArray O() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
@@ -549,6 +581,14 @@ public:
return SkPdfArray();
}
+/** (Required) A source information dictionary (see Section 9.9.4, "Source Information"),
+ * or an array of such dictionaries, describing the sources from which the objects belong-
+ * ing to the content set were created.
+**/
+ bool has_SI() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", NULL));
+ }
+
bool isSIADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return false;
@@ -575,6 +615,17 @@ public:
return SkPdfArray();
}
+/** (Optional) The content type, a string characterizing the source from which the objects
+ * belonging to the content set were created. The string should conform to the content
+ * type specification described in Internet RFC 2045, Multipurpose Internet Mail Exten-
+ * sions (MIME) Part One: Format of Internet Message Bodies (see the Bibliography). For
+ * example, for a page set consisting of a group of PDF pages created from an HTML file,
+ * the content type would be text/html.
+**/
+ bool has_CT() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", NULL));
+ }
+
std::string CT() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", &ret)) return ret;
@@ -582,6 +633,12 @@ public:
return "";
}
+/** (Optional) A time stamp giving the date and time at which the content set was created.
+**/
+ bool has_TS() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", NULL));
+ }
+
SkPdfDate TS() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWebCaptureImageSetDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCaptureImageSetDictionary_autogen.h
index d8ee276beb..3bf4466457 100644
--- a/experimental/PdfViewer/SkPdfWebCaptureImageSetDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCaptureImageSetDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a Web Capture image set
class SkPdfWebCaptureImageSetDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCaptureImageSetDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfWebCaptureImageSetDictionary& operator=(const SkPdfWebCaptureImageSetDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The subtype of content set that this dictionary describes; must be SIS ("Spider
+ * image set") for an image set.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,17 @@ public:
return "";
}
+/** (Required) The reference counts (see below) for the image XObjects belonging to the
+ * image set. For an image set containing a single XObject, the value is simply the integer
+ * reference count for that XObject. If the image set contains multiple XObjects, the value is
+ * an array of reference counts parallel to the O array (see Table 9.33 on page 668); that is,
+ * each element in the R array holds the reference count for the image XObject at the corre-
+ * sponding position in the O array.
+**/
+ bool has_R() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
+ }
+
bool isRAInteger() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
diff --git a/experimental/PdfViewer/SkPdfWebCaptureInformationDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCaptureInformationDictionary_autogen.h
index 13a1c1ea94..7f75f40c8e 100644
--- a/experimental/PdfViewer/SkPdfWebCaptureInformationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCaptureInformationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in the Web Capture information dictionary
class SkPdfWebCaptureInformationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCaptureInformationDictionary_SkPdfObjectType;}
@@ -521,6 +522,14 @@ public:
SkPdfWebCaptureInformationDictionary& operator=(const SkPdfWebCaptureInformationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The Web Capture version number. For PDF 1.3, the version number is 1.0.
+ * Note: This value is a single real number, not a major and minor version number. Thus, for
+ * example, a version number of 1.2 would be considered greater than 1.15.
+**/
+ bool has_V() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
+ }
+
double V() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
@@ -528,6 +537,15 @@ public:
return 0;
}
+/** (Optional) An array of indirect references to Web Capture command dictionaries (see
+ * "Command Dictionaries" on page 672) describing commands that were used in building
+ * the PDF file. The commands appear in the array in the order in which they were executed
+ * in building the file.
+**/
+ bool has_C() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
+ }
+
SkPdfArray C() const {
SkPdfArray ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWebCapturePageSetDictionary_autogen.h b/experimental/PdfViewer/SkPdfWebCapturePageSetDictionary_autogen.h
index b9b5287d13..822533ff13 100644
--- a/experimental/PdfViewer/SkPdfWebCapturePageSetDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWebCapturePageSetDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a Web Capture page set
class SkPdfWebCapturePageSetDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWebCapturePageSetDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfWebCapturePageSetDictionary& operator=(const SkPdfWebCapturePageSetDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The subtype of content set that this dictionary describes; must be SPS
+ * ("Spider page set") for a page set.
+**/
+ bool has_S() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
+ }
+
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
@@ -528,6 +536,13 @@ public:
return "";
}
+/** (Optional) The title of the page set, a text string representing it in human-readable
+ * form.
+**/
+ bool has_T() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
+ }
+
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
@@ -535,6 +550,13 @@ public:
return "";
}
+/** (Optional) A text identifier generated from the text of the page set, as described in
+ * "Digital Identifiers" on page 664.
+**/
+ bool has_TID() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TID", "", NULL));
+ }
+
std::string TID() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TID", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWidgetAnnotationDictionary_autogen.h b/experimental/PdfViewer/SkPdfWidgetAnnotationDictionary_autogen.h
index cbb3fb1326..6f6486d1cc 100644
--- a/experimental/PdfViewer/SkPdfWidgetAnnotationDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWidgetAnnotationDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Additional entries specific to a widget annotation
class SkPdfWidgetAnnotationDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWidgetAnnotationDictionary_SkPdfObjectType;}
@@ -521,6 +522,13 @@ public:
SkPdfWidgetAnnotationDictionary& operator=(const SkPdfWidgetAnnotationDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The type of annotation that this dictionary describes; must be Widget
+ * for a widget annotation.
+**/
+ bool has_Subtype() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
+ }
+
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
@@ -528,6 +536,15 @@ public:
return "";
}
+/** (Optional; PDF 1.4) An alternate representation of the annotation's contents in
+ * human-readable form, useful when extracting the document's contents in sup-
+ * port of accessibility to disabled users or for other purposes (see Section 9.8.2,
+ * "Alternate Descriptions").
+**/
+ bool has_Contents() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
+ }
+
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
@@ -535,6 +552,23 @@ public:
return "";
}
+/** (Optional) The annotation's highlighting mode, the visual effect to be used when
+ * the mouse button is pressed or held down inside its active area:
+ * N (None) No highlighting.
+ * I (Invert) Invert the contents of the annotation rectangle.
+ * O (Outline) Invert the annotation's border.
+ * P (Push) Display the annotation's down appearance, if any (see Section
+ * 8.4.4, "Appearance Streams"). If no down appearance is defined, offset
+ * the contents of the annotation rectangle to appear as if it were being
+ * "pushed" below the surface of the page.
+ * T (Toggle) Same as P (which is preferred).
+ * A highlighting mode other than P overrides any down appearance defined for
+ * the annotation. Default value: I.
+**/
+ bool has_H() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
+ }
+
std::string H() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
@@ -542,6 +576,16 @@ public:
return "";
}
+/** (Optional) An appearance characteristics dictionary to be used in constructing a
+ * dynamic appearance stream specifying the annotation's visual presentation on
+ * the page; see "Variable Text" on page 533 for further discussion.
+ * Note: The name MK for this entry is of historical significance only and has no direct
+ * meaning.
+**/
+ bool has_MK() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK", "", NULL));
+ }
+
SkPdfDictionary* MK() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MK", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/SkPdfWindowsLaunchActionDictionary_autogen.h b/experimental/PdfViewer/SkPdfWindowsLaunchActionDictionary_autogen.h
index 48b333c881..a996f9016e 100644
--- a/experimental/PdfViewer/SkPdfWindowsLaunchActionDictionary_autogen.h
+++ b/experimental/PdfViewer/SkPdfWindowsLaunchActionDictionary_autogen.h
@@ -5,6 +5,7 @@
#include "SkPdfArray_autogen.h"
#include "SkPdfDictionary_autogen.h"
+// Entries in a Windows launch parameter dictionary
class SkPdfWindowsLaunchActionDictionary : public SkPdfDictionary {
public:
virtual SkPdfObjectType getType() const { return kWindowsLaunchActionDictionary_SkPdfObjectType;}
@@ -521,6 +522,16 @@ public:
SkPdfWindowsLaunchActionDictionary& operator=(const SkPdfWindowsLaunchActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
+/** (Required) The file name of the application to be launched or the document
+ * to be opened or printed, in standard Windows pathname format. If the name
+ * string includes a backslash character (\), the backslash must itself be preceded
+ * by a backslash.
+ * Note: This value must be a simple string; it is not a file specification.
+**/
+ bool has_F() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
+ }
+
std::string F() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
@@ -528,6 +539,12 @@ public:
return "";
}
+/** (Optional) A string specifying the default directory in standard DOS syntax.
+**/
+ bool has_D() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
+ }
+
std::string D() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
@@ -535,6 +552,16 @@ public:
return "";
}
+/** (Optional) A string specifying the operation to perform:
+ * open Open a document.
+ * print Print a document.
+ * If the F entry designates an application instead of a document, this entry is ig-
+ * nored and the application is launched. Default value: open.
+**/
+ bool has_O() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
+ }
+
std::string O() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
@@ -542,6 +569,13 @@ public:
return "";
}
+/** (Optional) A parameter string to be passed to the application designated by
+ * the F entry. This entry should be omitted if F designates a document.
+**/
+ bool has_P() const {
+ return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
+ }
+
std::string P() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
diff --git a/experimental/PdfViewer/generate_code.py b/experimental/PdfViewer/generate_code.py
index e730a6fa70..9cc3e22cd0 100644
--- a/experimental/PdfViewer/generate_code.py
+++ b/experimental/PdfViewer/generate_code.py
@@ -39,6 +39,7 @@ class PdfField:
self.fEnumValues = []
self.fHasMust = False
self.fMustBe = ''
+ self.fComment = ''
def must(self, value):
self.fHasMust = True
@@ -70,6 +71,7 @@ class PdfField:
return self
def comment(self, comment):
+ self.fComment = comment
return self
def done(self):
@@ -77,13 +79,12 @@ class PdfField:
class PdfClassField:
- def __init__(self, parent, required, version='', inheritable=False, comment=''):
+ def __init__(self, parent, required, version='', inheritable=False):
#self.fProp = ''
self.fParent = parent
self.fRequired = required
self.fVersion = version
self.fInheritable = inheritable
- self.fComment = comment
def field(self, name, abr=''):
self.fProp = PdfField(self, name, abr)
@@ -273,12 +274,17 @@ class PdfClassManager:
fileClass.write('#include "SkPdfEnums_autogen.h"\n')
fileClass.write('#include "SkPdfArray_autogen.h"\n')
+ if cls.fBase != '':
+ fileClass.write('#include "SkPdf' + cls.fBase + '_autogen.h"\n')
+ fileClass.write('\n')
+
+ if cls.fComment != '':
+ fileClass.write('// ' + cls.fComment + '\n')
if cls.fBase == '':
- fileClass.write('\nclass SkPdf' + cls.fName + ' {\n')
+ fileClass.write('class SkPdf' + cls.fName + ' {\n')
else:
- fileClass.write('#include "SkPdf' + cls.fBase + '_autogen.h"\n')
- fileClass.write('\nclass SkPdf' + cls.fName + ' : public SkPdf' + cls.fBase + ' {\n')
+ fileClass.write('class SkPdf' + cls.fName + ' : public SkPdf' + cls.fBase + ' {\n')
fileClass.write('public:\n')
fileClass.write(' virtual SkPdfObjectType getType() const { return ' + cls.fEnum + ';}\n')
@@ -323,13 +329,22 @@ class PdfClassManager:
for field in cls.fFields:
prop = field.fProp
if prop.fCppName != '':
+
+ lines = prop.fComment.split('\n')
+ if prop.fComment != '' and len(lines) > 0:
+ fileClass.write('/** ' + lines[0] + '\n')
+ for line in lines[1:]:
+ fileClass.write(' * ' + line + '\n')
+ fileClass.write('**/\n')
+
if prop.fCppName[0] == '[':
fileClass.write('/*\n') # comment code of the atributes that can have any name
# TODO(edisonn): has_foo();
- fileClass.write(' bool has_' + prop.fCppName + '() const {\n')
- fileClass.write(' return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), \"' + prop.fName + '\", \"' + prop.fAbr + '\", NULL));\n')
- fileClass.write(' }\n')
+ fileClass.write(' bool has_' + prop.fCppName + '() const {\n')
+ fileClass.write(' return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), \"' + prop.fName + '\", \"' + prop.fAbr + '\", NULL));\n')
+ fileClass.write(' }\n')
+ fileClass.write('\n')
if len(prop.fTypes.split()) == 1:
t = prop.fTypes.strip()
diff --git a/experimental/PdfViewer/pdf_viewer_main.cpp b/experimental/PdfViewer/pdf_viewer_main.cpp
index 2c6c4235d5..d2d0ff3590 100644
--- a/experimental/PdfViewer/pdf_viewer_main.cpp
+++ b/experimental/PdfViewer/pdf_viewer_main.cpp
@@ -7,6 +7,7 @@
#include "SkCanvas.h"
#include "SkDevice.h"
+#include "SkForceLinking.h"
#include "SkGraphics.h"
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
@@ -24,6 +25,8 @@
#include "podofo.h"
using namespace PoDoFo;
+__SK_FORCE_IMAGE_DECODER_LINKING;
+
const PdfObject* resolveReferenceObject(const PdfMemDocument* pdfDoc,
const PdfObject* obj,
bool resolveOneElementArrays = false);
@@ -176,14 +179,20 @@ bool FunctionFromDictionary(const PdfMemDocument* pdfDoc,
/*
* TODO(edisonn):
- * - encapsulate podofo in the pdf api so the skpdf does not know anything about podofo
+ * - encapsulate podofo in the pdf api so the skpdf does not know anything about podofo ... in progress
* - ASAP so skp -> pdf -> png looks great
- * - load gs/ especially smask and already known prop (skp)
- * - use transparency (I think ca and CA ops) (skp)
- * - all font types
- * - word spacing
- * - load font for baidu.pdf
- * - load font for youtube.pdf
+ * - load gs/ especially smask and already known prop (skp)...
+ * - all font types and all ppdf font features
+ * - word spacing
+ * - load font for baidu.pdf
+ * - load font for youtube.pdf
+ * - parser for pdf from the definition already available in pdfspec_autogen.py
+ * - wrapper on classes for customizations? e.g.
+ * SkPdfPageObjectVanila - has only the basic loaders/getters
+ * SkPdfPageObject : public SkPdfPageObjectVanila, extends, and I can add customizations here
+ * need to find a nice object model for all this with constructors and factories
+ * - deal with inheritable automatically ?
+ * - deal with specific type in spec directly, add all dictionary types to known types
*/
//#define PDF_TRACE
@@ -270,6 +279,7 @@ static SkMatrix SkMatrixFromPdfMatrix(double array[6]) {
struct PdfColorOperator {
std::string fColorSpace; // TODO(edisonn): use SkString
SkColor fColor;
+ double fOpacity; // ca or CA
// TODO(edisonn): add here other color space options.
void setRGBColor(SkColor color) {
@@ -277,7 +287,12 @@ struct PdfColorOperator {
fColor = color;
}
// TODO(edisonn): double check the default values for all fields.
- PdfColorOperator() : fColor(SK_ColorBLACK) {}
+ PdfColorOperator() : fColor(SK_ColorBLACK), fOpacity(1) {}
+
+ void applyGraphicsState(SkPaint* paint) {
+ paint->setColor(SkColorSetA(fColor, fOpacity * 255));
+ }
+
};
// TODO(edisonn): better class design.
@@ -326,7 +341,22 @@ struct PdfGraphicsState {
fWordSpace = 0;
fCharSpace = 0;
fHasClipPathToApply = false;
- fResources = NULL;
+ fResources = NULL;
+ }
+
+ void applyGraphicsState(SkPaint* paint, bool stroking) {
+ if (stroking) {
+ fStroking.applyGraphicsState(paint);
+ } else {
+ fNonStroking.applyGraphicsState(paint);
+ }
+
+ // TODO(edisonn): get this from pdfContext->options,
+ // or pdfContext->addPaintOptions(&paint);
+ paint->setAntiAlias(true);
+
+ // TODO(edisonn): dashing, miter, ...
+ paint->setStrokeWidth(SkDoubleToScalar(fLineWidth));
}
};
@@ -763,7 +793,8 @@ PdfResult DrawText(PdfContext* pdfContext,
if (fCurFont->GetFontScale() != 0) {
paint.setTextScaleX(SkFloatToScalar(fCurFont->GetFontScale() / 100.0));
}
- paint.setColor(pdfContext->fGraphicsState.fNonStroking.fColor);
+
+ pdfContext->fGraphicsState.applyGraphicsState(&paint, false);
paint.setTypeface(SkTypefaceFromPdfFont(fCurFont));
@@ -883,6 +914,9 @@ bool LongFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL || !value->IsNumber()) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
*data = value->GetNumber();
return true;
@@ -905,9 +939,12 @@ bool DoubleFromDictionary(const PdfMemDocument* pdfDoc,
const PdfObject* value = resolveReferenceObject(pdfDoc,
dict.GetKey(PdfName(key)));
- if (value == NULL || !value->IsReal()) {
+ if (value == NULL || (!value->IsReal() && !value->IsNumber())) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
*data = value->GetReal();
return true;
@@ -934,6 +971,9 @@ bool BoolFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL || !value->IsBool()) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
*data = value->GetBool();
return true;
@@ -959,6 +999,9 @@ bool NameFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL || !value->IsName()) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
*data = value->GetName().GetName();
return true;
@@ -984,6 +1027,9 @@ bool StringFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL || (!value->IsString() && !value->IsHexString())) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
*data = value->GetString().GetString();
return true;
@@ -1009,6 +1055,9 @@ bool DictionaryFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL || !value->IsDictionary()) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
return PodofoMapper::map(*pdfDoc, *value, (SkPdfObject**)data);
}
@@ -1035,6 +1084,10 @@ bool DictionaryFromDictionary2(const PdfMemDocument* pdfDoc,
return false;
}
+ if (data == NULL) {
+ return true;
+ }
+
return PodofoMapper::map(*pdfDoc, *value, (T**)data);
}
@@ -1059,6 +1112,9 @@ bool ObjectFromDictionary(const PdfMemDocument* pdfDoc,
if (value == NULL) {
return false;
}
+ if (data == NULL) {
+ return true;
+ }
return PodofoMapper::map(*pdfDoc, *value, data);
}
@@ -1311,6 +1367,7 @@ PdfResult doXObject_Image(PdfContext* pdfContext, SkCanvas* canvas, const SkPdfI
canvas->saveLayer(&dst, NULL);
canvas->drawBitmapRect(image, dst, NULL);
SkPaint xfer;
+ pdfContext->fGraphicsState.applyGraphicsState(&xfer, false);
xfer.setXfermodeMode(SkXfermode::kSrcOut_Mode); // SkXfermode::kSdtOut_Mode
canvas->drawBitmapRect(sMask, dst, &xfer);
canvas->restore();
@@ -1597,12 +1654,13 @@ PdfResult PdfOp_TD(PdfContext* pdfContext, SkCanvas* canvas, PdfTokenLooper** lo
double ty = pdfContext->fObjectStack.top()->asNumber()->value(); pdfContext->fObjectStack.pop();
double tx = pdfContext->fObjectStack.top()->asNumber()->value(); pdfContext->fObjectStack.pop();
+ // TODO(edisonn): Create factory methods or constructors so podofo is hidden
PdfObject _ty(PdfVariant(-ty));
pdfContext->fObjectStack.push(new SkPdfNumber(&pdfContext->fPdfDoc.podofo(), &_ty));
PdfOp_TL(pdfContext, canvas, looper);
- PdfObject vtx(PdfVariant(-(-tx))); // TODO(edisonn) Hmm, the compiler thinks I have here a function pointer if we use (tx), but not -(-tx)
+ PdfObject vtx(PdfVariant(-(-tx))); // TODO(edisonn): Hmm, the compiler thinks I have here a function pointer if we use (tx), but not -(-tx)
pdfContext->fObjectStack.push(new SkPdfNumber(&pdfContext->fPdfDoc.podofo(), &vtx));
PdfObject vty(PdfVariant(-(-ty)));
@@ -1785,20 +1843,13 @@ PdfResult PdfOp_fillAndStroke(PdfContext* pdfContext, SkCanvas* canvas, bool fil
SkPaint paint;
- // TODO(edisonn): get this from pdfContext->options,
- // or pdfContext->addPaintOptions(&paint);
- paint.setAntiAlias(true);
-
- // TODO(edisonn): dashing, miter, ...
-
-// path.transform(pdfContext->fGraphicsState.fMatrix);
-// path.transform(pdfContext->fOriginalMatrix);
-
SkPoint line[2];
if (fill && !stroke && path.isLine(line)) {
paint.setStyle(SkPaint::kStroke_Style);
- paint.setColor(pdfContext->fGraphicsState.fNonStroking.fColor);
+
+ pdfContext->fGraphicsState.applyGraphicsState(&paint, false);
paint.setStrokeWidth(SkDoubleToScalar(0));
+
canvas->drawPath(path, paint);
} else {
if (fill) {
@@ -1806,14 +1857,17 @@ PdfResult PdfOp_fillAndStroke(PdfContext* pdfContext, SkCanvas* canvas, bool fil
if (evenOdd) {
path.setFillType(SkPath::kEvenOdd_FillType);
}
- paint.setColor(pdfContext->fGraphicsState.fNonStroking.fColor);
+
+ pdfContext->fGraphicsState.applyGraphicsState(&paint, false);
+
canvas->drawPath(path, paint);
}
if (stroke) {
paint.setStyle(SkPaint::kStroke_Style);
- paint.setColor(pdfContext->fGraphicsState.fStroking.fColor);
- paint.setStrokeWidth(SkDoubleToScalar(pdfContext->fGraphicsState.fLineWidth));
+
+ pdfContext->fGraphicsState.applyGraphicsState(&paint, true);
+
path.setFillType(SkPath::kWinding_FillType); // reset it, just in case it messes up the stroke
canvas->drawPath(path, paint);
}
@@ -2290,6 +2344,23 @@ PdfResult PdfOp_gs(PdfContext* pdfContext, SkCanvas* canvas, PdfTokenLooper** lo
PodofoMapper::map(value, &gs);
// TODO(edisonn): now load all those properties in graphic state.
+ if (gs == NULL) {
+ return kIgnoreError_PdfResult;
+ }
+
+ if (gs->has_CA()) {
+ pdfContext->fGraphicsState.fStroking.fOpacity = gs->CA();
+ }
+
+ if (gs->has_ca()) {
+ pdfContext->fGraphicsState.fNonStroking.fOpacity = gs->ca();
+ }
+
+ if (gs->has_LW()) {
+ pdfContext->fGraphicsState.fLineWidth = gs->LW();
+ }
+
+
return kNYI_PdfResult;
}