refactoring for pdf viewer lib

Review URL: https://codereview.chromium.org/17856004

git-svn-id: http://skia.googlecode.com/svn/trunk@9773 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
edisonn@google.com 2013-06-26 17:48:12 +00:00
parent ad4d499f86
commit 131d4ee0ea
359 changed files with 16903 additions and 12130 deletions

View File

@ -4,6 +4,9 @@
#include "podofo.h"
using namespace PoDoFo;
#include "SkCanvas.h"
#include "SkPaint.h"
#include <iostream>
#include <cstdio>
#include <stack>
@ -16,6 +19,8 @@ using namespace PoDoFo;
class SkPdfFont;
class SkPdfDoc;
class SkPdfObject;
class SkPdfResourceDictionary;
// TODO(edisonn): better class design.
struct PdfColorOperator {

View File

@ -1,4 +1,5 @@
#include "SkPdfFont.h"
#include "SkPdfParser.h"
std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts() {
static std::map<std::string, SkPdfStandardFontEntry> gPdfStandardFonts;

View File

@ -7,6 +7,7 @@
#include <map>
#include <string>
#include "SkTypeface.h"
#include "SkUtils.h"
#include "SkPdfBasics.h"
#include "SkPdfUtils.h"

File diff suppressed because it is too large Load Diff

View File

@ -28,8 +28,8 @@ struct PdfToken {
};
class SkPdfTokenizer {
PdfContentsTokenizer* fTokenizer;
PdfMemDocument* fDoc;
PdfContentsTokenizer* fTokenizer;
char* fUncompressedStream;
pdf_long fUncompressedStreamLength;
@ -39,8 +39,8 @@ class SkPdfTokenizer {
PdfToken fPutBack;
public:
SkPdfTokenizer(PdfMemDocument* doc = NULL, PdfContentsTokenizer* tokenizer = NULL) : fDoc(doc), fTokenizer(tokenizer), fEmpty(false), fUncompressedStream(NULL), fUncompressedStreamLength(0), fHasPutBack(false) {}
SkPdfTokenizer(const SkPdfObject* objWithStream) : fDoc(NULL), fTokenizer(NULL), fHasPutBack(false), fEmpty(false) {
SkPdfTokenizer(PdfMemDocument* doc = NULL, PdfContentsTokenizer* tokenizer = NULL) : fDoc(doc), fTokenizer(tokenizer), fUncompressedStream(NULL), fUncompressedStreamLength(0), fEmpty(false), fHasPutBack(false) {}
SkPdfTokenizer(const SkPdfObject* objWithStream) : fDoc(NULL), fTokenizer(NULL), fEmpty(false), fHasPutBack(false) {
fUncompressedStream = NULL;
fUncompressedStreamLength = 0;
@ -60,7 +60,7 @@ public:
}
SkPdfTokenizer(const char* buffer, int len) : fDoc(NULL), fTokenizer(NULL), fHasPutBack(false), fUncompressedStream(NULL), fUncompressedStreamLength(0), fEmpty(false) {
SkPdfTokenizer(const char* buffer, int len) : fDoc(NULL), fTokenizer(NULL), fUncompressedStream(NULL), fUncompressedStreamLength(0), fEmpty(false), fHasPutBack(false) {
try {
fTokenizer = new PdfContentsTokenizer(buffer, len);
} catch (PdfError& e) {
@ -107,7 +107,7 @@ public:
case ePdfContentsType_Variant: {
token->fType = kObject_TokenType;
PdfObject* obj = new PdfObject(var);
PodofoMapper::map(*fDoc, *obj, &token->fObject);
mapObject(*fDoc, *obj, &token->fObject);
}
break;
@ -127,6 +127,91 @@ public:
}
};
extern "C" PdfContext* gPdfContext;
extern "C" SkBitmap* gDumpBitmap;
extern "C" SkCanvas* gDumpCanvas;
// TODO(edisonn): move in trace util.
#ifdef PDF_TRACE
static void SkTraceMatrix(const SkMatrix& matrix, const char* sz = "") {
printf("SkMatrix %s ", sz);
for (int i = 0 ; i < 9 ; i++) {
printf("%f ", SkScalarToDouble(matrix.get(i)));
}
printf("\n");
}
static void SkTraceRect(const SkRect& rect, const char* sz = "") {
printf("SkRect %s ", sz);
printf("x = %f ", SkScalarToDouble(rect.x()));
printf("y = %f ", SkScalarToDouble(rect.y()));
printf("w = %f ", SkScalarToDouble(rect.width()));
printf("h = %f ", SkScalarToDouble(rect.height()));
printf("\n");
}
#else
#define SkTraceMatrix(a,b)
#define SkTraceRect(a,b)
#endif
// TODO(edisonn): Document PdfTokenLooper and subclasses.
class PdfTokenLooper {
protected:
PdfTokenLooper* fParent;
SkPdfTokenizer* fTokenizer;
PdfContext* fPdfContext;
SkCanvas* fCanvas;
public:
PdfTokenLooper(PdfTokenLooper* parent,
SkPdfTokenizer* tokenizer,
PdfContext* pdfContext,
SkCanvas* canvas)
: fParent(parent), fTokenizer(tokenizer), fPdfContext(pdfContext), fCanvas(canvas) {}
virtual PdfResult consumeToken(PdfToken& token) = 0;
virtual void loop() = 0;
void setUp(PdfTokenLooper* parent) {
fParent = parent;
fTokenizer = parent->fTokenizer;
fPdfContext = parent->fPdfContext;
fCanvas = parent->fCanvas;
}
};
class PdfMainLooper : public PdfTokenLooper {
public:
PdfMainLooper(PdfTokenLooper* parent,
SkPdfTokenizer* tokenizer,
PdfContext* pdfContext,
SkCanvas* canvas)
: PdfTokenLooper(parent, tokenizer, pdfContext, canvas) {}
virtual PdfResult consumeToken(PdfToken& token);
virtual void loop();
};
class PdfInlineImageLooper : public PdfTokenLooper {
public:
PdfInlineImageLooper()
: PdfTokenLooper(NULL, NULL, NULL, NULL) {}
virtual PdfResult consumeToken(PdfToken& token);
virtual void loop();
PdfResult done();
};
class PdfCompatibilitySectionLooper : public PdfTokenLooper {
public:
PdfCompatibilitySectionLooper()
: PdfTokenLooper(NULL, NULL, NULL, NULL) {}
virtual PdfResult consumeToken(PdfToken& token);
virtual void loop();
};
class SkPdfDoc {
PdfMemDocument fDoc;
public:
@ -139,10 +224,20 @@ public:
return fDoc.GetPageCount();
}
double width(int n) {
PdfRect rect = fDoc.GetPage(n)->GetMediaBox();
return rect.GetWidth() + rect.GetLeft();
}
double height(int n) {
PdfRect rect = fDoc.GetPage(n)->GetMediaBox();
return rect.GetHeight() + rect.GetBottom();
}
// Can return NULL
SkPdfPageObjectDictionary* page(int n) {
SkPdfPageObjectDictionary* page = NULL;
PodofoMapper::map(fDoc, *fDoc.GetPage(n)->GetObject(), &page);
mapPageObjectDictionary(fDoc, *fDoc.GetPage(n)->GetObject(), &page);
return page;
}
@ -155,10 +250,89 @@ public:
return skrect;
}
void drawPage(int n, SkCanvas* canvas) {
SkPdfPageObjectDictionary* pg = page(n);
SkPdfTokenizer* tokenizer = tokenizerOfPage(n);
PdfContext pdfContext(this);
pdfContext.fOriginalMatrix = SkMatrix::I();
pdfContext.fGraphicsState.fResources = NULL;
mapResourceDictionary(*pg->Resources(), &pdfContext.fGraphicsState.fResources);
gPdfContext = &pdfContext;
gDumpCanvas = canvas;
// TODO(edisonn): get matrix stuff right.
// TODO(edisonn): add DPI/scale/zoom.
SkScalar z = SkIntToScalar(0);
SkRect rect = MediaBox(n);
SkScalar w = rect.width();
SkScalar h = rect.height();
SkPoint pdfSpace[4] = {SkPoint::Make(z, z), SkPoint::Make(w, z), SkPoint::Make(w, h), SkPoint::Make(z, h)};
// SkPoint skiaSpace[4] = {SkPoint::Make(z, h), SkPoint::Make(w, h), SkPoint::Make(w, z), SkPoint::Make(z, z)};
// TODO(edisonn): add flag for this app to create sourunding buffer zone
// TODO(edisonn): add flagg for no clipping.
// Use larger image to make sure we do not draw anything outside of page
// could be used in tests.
#ifdef PDF_DEBUG_3X
SkPoint skiaSpace[4] = {SkPoint::Make(w+z, h+h), SkPoint::Make(w+w, h+h), SkPoint::Make(w+w, h+z), SkPoint::Make(w+z, h+z)};
#else
SkPoint skiaSpace[4] = {SkPoint::Make(z, h), SkPoint::Make(w, h), SkPoint::Make(w, z), SkPoint::Make(z, z)};
#endif
//SkPoint pdfSpace[2] = {SkPoint::Make(z, z), SkPoint::Make(w, h)};
//SkPoint skiaSpace[2] = {SkPoint::Make(w, z), SkPoint::Make(z, h)};
//SkPoint pdfSpace[2] = {SkPoint::Make(z, z), SkPoint::Make(z, h)};
//SkPoint skiaSpace[2] = {SkPoint::Make(z, h), SkPoint::Make(z, z)};
//SkPoint pdfSpace[3] = {SkPoint::Make(z, z), SkPoint::Make(z, h), SkPoint::Make(w, h)};
//SkPoint skiaSpace[3] = {SkPoint::Make(z, h), SkPoint::Make(z, z), SkPoint::Make(w, 0)};
SkAssertResult(pdfContext.fOriginalMatrix.setPolyToPoly(pdfSpace, skiaSpace, 4));
SkTraceMatrix(pdfContext.fOriginalMatrix, "Original matrix");
pdfContext.fGraphicsState.fMatrix = pdfContext.fOriginalMatrix;
pdfContext.fGraphicsState.fMatrixTm = pdfContext.fGraphicsState.fMatrix;
pdfContext.fGraphicsState.fMatrixTlm = pdfContext.fGraphicsState.fMatrix;
canvas->setMatrix(pdfContext.fOriginalMatrix);
#ifndef PDF_DEBUG_NO_PAGE_CLIPING
canvas->clipRect(SkRect::MakeXYWH(z, z, w, h), SkRegion::kIntersect_Op, true);
#endif
// erase with red before?
// SkPaint paint;
// paint.setColor(SK_ColorRED);
// canvas->drawRect(rect, paint);
PdfMainLooper looper(NULL, tokenizer, &pdfContext, canvas);
looper.loop();
delete tokenizer;
canvas->flush();
}
SkPdfTokenizer* tokenizerOfPage(int n) {
PdfContentsTokenizer* t = new PdfContentsTokenizer(fDoc.GetPage(n));
return new SkPdfTokenizer(&fDoc, t);
}
};
// TODO(edisonn): move in another file
class SkPdfViewer : public SkRefCnt {
public:
bool load(const SkString inputFileName, SkPicture* out);
bool write(void*) const { return false; }
};
void reportPdfRenderStats();
#endif // SkPdfParser_DEFINED

View File

@ -0,0 +1,37 @@
#include "SkPdfUtils.h"
bool ArrayFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfArray* data) {return false;}
bool FileSpecFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfFileSpec* data) {return false;}
bool StreamFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfStream** data);
bool TreeFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfTree** data) {return false;}
bool DateFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfDate* data) {return false;}
bool FunctionFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfFunction* data) {return false;}

View File

@ -39,20 +39,17 @@ bool StringFromDictionary(const PdfMemDocument* pdfDoc,
const char* key,
const char* abr,
std::string* data);
/*
class SkPdfDictionary;
bool DictionaryFromDictionary(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
SkPdfDictionary** data);
*/
bool skpdfmap(const PdfMemDocument& podofoDoc, const PdfObject& podofoObj, SkPdfObject** out);
template <typename T>
bool DictionaryFromDictionary2(const PdfMemDocument* pdfDoc,
const PdfDictionary& dict,
const char* key,
const char* abr,
T** data);
class SkPdfObject;
bool ObjectFromDictionary(const PdfMemDocument* pdfDoc,
@ -118,9 +115,10 @@ bool FunctionFromDictionary(const PdfMemDocument* pdfDoc,
const char* abr,
SkPdfFunction* data);
bool skpdfmap(const PdfMemDocument& podofoDoc, const PdfObject& podofoObj, SkPdfObject** out);
SkMatrix SkMatrixFromPdfArray(SkPdfArray* pdfArray);
PdfResult doType3Char(PdfContext* pdfContext, SkCanvas* canvas, SkPdfObject* skobj, SkRect bBox, SkMatrix matrix, double textSize);
#include "SkPdfPodofoMapper_autogen.h"
#endif // __DEFINED__SkPdfUtils

View File

@ -0,0 +1,51 @@
#include "SkPdfALinkAnnotationDictionary_autogen.h"
std::string SkPdfALinkAnnotationDictionary::Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfALinkAnnotationDictionary::Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfALinkAnnotationDictionary::getDestAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfALinkAnnotationDictionary::getDestAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfALinkAnnotationDictionary::getDestAsString() const {
std::string ret = "";
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfALinkAnnotationDictionary::H() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfALinkAnnotationDictionary::PA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
}
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subtype() const;
/** (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,
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
}
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Contents() const;
/** (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).
@ -569,39 +557,21 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
SkPdfArray* getDestAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* getDestAsArray() const;
bool isDestAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
std::string getDestAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getDestAsName() const;
bool isDestAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
}
std::string getDestAsString() const {
std::string ret = "";
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getDestAsString() const;
/** (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.
@ -620,13 +590,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
}
std::string H() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string H() const;
/** (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"
@ -638,13 +602,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", NULL));
}
SkPdfDictionary* PA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* PA() const;
};
#endif // __DEFINED__SkPdfALinkAnnotationDictionary

View File

@ -0,0 +1,30 @@
#include "SkPdfActionDictionary_autogen.h"
std::string SkPdfActionDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfActionDictionary::S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfActionDictionary::getNextAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfActionDictionary::getNextAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (Required) The type of action that this dictionary describes; see Table 8.34
* on page 518 for specific values.
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
}
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string S() const;
/** (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-
@ -568,26 +556,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getNextAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getNextAsDictionary() const;
bool isNextAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
SkPdfArray* getNextAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* getNextAsArray() const;
};
#endif // __DEFINED__SkPdfActionDictionary

View File

@ -0,0 +1,16 @@
#include "SkPdfAlternateImageDictionary_autogen.h"
SkPdfStream* SkPdfAlternateImageDictionary::Image() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
bool SkPdfAlternateImageDictionary::DefaultForPrinting() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}

View File

@ -531,13 +531,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", NULL));
}
SkPdfStream* Image() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* Image() const;
/** (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
@ -547,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", NULL));
}
bool DefaultForPrinting() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool DefaultForPrinting() const;
};
#endif // __DEFINED__SkPdfAlternateImageDictionary

View File

@ -0,0 +1,44 @@
#include "SkPdfAnnotationActionsDictionary_autogen.h"
SkPdfDictionary* SkPdfAnnotationActionsDictionary::E() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationActionsDictionary::X() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationActionsDictionary::D() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationActionsDictionary::U() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationActionsDictionary::Fo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationActionsDictionary::Bl() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
}
SkPdfDictionary* E() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* E() const;
/** (Optional; PDF 1.2) An action to be performed when the cursor exits the annotation's
* active area.
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", NULL));
}
SkPdfDictionary* X() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* X() const;
/** (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.")
**/
@ -560,13 +548,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
}
SkPdfDictionary* D() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* D() const;
/** (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,
@ -576,13 +558,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", NULL));
}
SkPdfDictionary* U() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* U() const;
/** (Optional; PDF 1.2; widget annotations only) An action to be performed when the
* annotation receives the input focus.
**/
@ -590,13 +566,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", NULL));
}
SkPdfDictionary* Fo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Fo() const;
/** (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.")
@ -605,13 +575,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", NULL));
}
SkPdfDictionary* Bl() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Bl() const;
};
#endif // __DEFINED__SkPdfAnnotationActionsDictionary

View File

@ -0,0 +1,135 @@
#include "SkPdfAnnotationDictionary_autogen.h"
std::string SkPdfAnnotationDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfAnnotationDictionary::Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfAnnotationDictionary::Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfAnnotationDictionary::P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* SkPdfAnnotationDictionary::Rect() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDate SkPdfAnnotationDictionary::getMAsDate() const {
SkPdfDate ret = SkPdfDate();
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
std::string SkPdfAnnotationDictionary::getMAsString() const {
std::string ret = "";
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
long SkPdfAnnotationDictionary::F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfDictionary* SkPdfAnnotationDictionary::BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfAnnotationDictionary::Border() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationDictionary::AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfAnnotationDictionary::AS() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfAnnotationDictionary::C() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
double SkPdfAnnotationDictionary::CA() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfAnnotationDictionary::T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfAnnotationDictionary::Popup() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationDictionary::A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAnnotationDictionary::AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfAnnotationDictionary::StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (Required) The type of annotation that this dictionary describes; see Table
* 8.14 on page 499 for specific values.
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
}
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subtype() const;
/** (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
@ -564,13 +552,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
}
std::string Contents() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Contents() const;
/** (Optional; PDF 1.3; not used in FDF files) An indirect reference to the page
* object with which this annotation is associated.
**/
@ -578,13 +560,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
}
SkPdfDictionary* P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* P() const;
/** (Required) The annotation rectangle, defining the location of the annotation
* on the page in default user space units.
**/
@ -592,13 +568,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", NULL));
}
SkRect* Rect() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* Rect() const;
/** (Optional; PDF 1.4) The annotation name, a text string uniquely identifying
* it among all the annotations on its page.
**/
@ -621,26 +591,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
SkPdfDate getMAsDate() const {
SkPdfDate ret = SkPdfDate();
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate getMAsDate() const;
bool isMAString() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
}
std::string getMAsString() const {
std::string ret = "";
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getMAsString() const;
/** (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.
**/
@ -648,13 +606,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
}
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long F() const;
/** (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).
@ -666,13 +618,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
}
SkPdfDictionary* BS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* BS() const;
/** (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-
@ -700,13 +646,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", NULL));
}
SkPdfArray* Border() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Border() const;
/** (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).
@ -715,13 +655,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
}
SkPdfDictionary* AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AP() const;
/** (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,
@ -731,13 +665,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", NULL));
}
std::string AS() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string AS() const;
/** (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:
@ -749,13 +677,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
}
SkPdfArray* C() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* C() const;
/** (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
@ -777,13 +699,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
}
double CA() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double CA() const;
/** (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.
**/
@ -791,13 +707,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
}
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string T() const;
/** (Optional; PDF 1.3) An indirect reference to a pop-up annotation for enter-
* ing or editing the text associated with this annotation.
**/
@ -805,13 +715,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", NULL));
}
SkPdfDictionary* Popup() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Popup() const;
/** (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
@ -822,13 +726,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
}
SkPdfDictionary* A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* A() const;
/** (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-
@ -838,13 +736,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
}
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AA() const;
/** (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).
@ -853,13 +745,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
}
long StructParent() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long StructParent() const;
};
#endif // __DEFINED__SkPdfAnnotationDictionary

View File

@ -0,0 +1,79 @@
#include "SkPdfAppearanceCharacteristicsDictionary_autogen.h"
long SkPdfAppearanceCharacteristicsDictionary::R() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfArray* SkPdfAppearanceCharacteristicsDictionary::BC() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfAppearanceCharacteristicsDictionary::BG() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfAppearanceCharacteristicsDictionary::CA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfAppearanceCharacteristicsDictionary::RC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfAppearanceCharacteristicsDictionary::AC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfStream* SkPdfAppearanceCharacteristicsDictionary::I() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfAppearanceCharacteristicsDictionary::RI() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfAppearanceCharacteristicsDictionary::IX() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAppearanceCharacteristicsDictionary::IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfAppearanceCharacteristicsDictionary::TP() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
}
long R() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long R() const;
/** (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:
@ -552,13 +546,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
}
SkPdfArray* BC() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* BC() const;
/** (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.
@ -567,13 +555,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
}
SkPdfArray* BG() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* BG() const;
/** (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-
@ -585,13 +567,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
}
std::string CA() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string CA() const;
/** (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.
@ -600,13 +576,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", NULL));
}
std::string RC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string RC() const;
/** (Optional; pushbutton fields only) The widget annotation's alternate (down)
* caption, displayed when the mouse button is pressed within its active area.
**/
@ -614,13 +584,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", NULL));
}
std::string AC() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string AC() const;
/** (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.
@ -629,13 +593,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
}
SkPdfStream* I() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* I() const;
/** (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.
@ -644,13 +602,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
}
SkPdfStream* RI() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* RI() const;
/** (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.
@ -659,13 +611,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", NULL));
}
SkPdfStream* IX() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* IX() const;
/** (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-
@ -675,13 +621,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
}
SkPdfDictionary* IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* IF() const;
/** (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
@ -697,13 +637,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", NULL));
}
long TP() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long TP() const;
};
#endif // __DEFINED__SkPdfAppearanceCharacteristicsDictionary

View File

@ -0,0 +1,44 @@
#include "SkPdfAppearanceDictionary_autogen.h"
SkPdfStream* SkPdfAppearanceDictionary::getNAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAppearanceDictionary::getNAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfAppearanceDictionary::getRAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAppearanceDictionary::getRAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfAppearanceDictionary::getDAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfAppearanceDictionary::getDAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -537,26 +537,14 @@ public:
return ret->podofo()->HasStream();
}
SkPdfStream* getNAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* getNAsStream() const;
bool isNADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getNAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getNAsDictionary() const;
/** (Optional) The annotation's rollover appearance. Default value: the value of
* the N entry.
**/
@ -570,26 +558,14 @@ public:
return ret->podofo()->HasStream();
}
SkPdfStream* getRAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* getRAsStream() const;
bool isRADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getRAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getRAsDictionary() const;
/** (Optional) The annotation's down appearance. Default value: the value of the
* N entry.
**/
@ -603,26 +579,14 @@ public:
return ret->podofo()->HasStream();
}
SkPdfStream* getDAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* getDAsStream() const;
bool isDADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getDAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getDAsDictionary() const;
};
#endif // __DEFINED__SkPdfAppearanceDictionary

View File

@ -0,0 +1,16 @@
#include "SkPdfApplicationDataDictionary_autogen.h"
SkPdfDate SkPdfApplicationDataDictionary::LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfObject* SkPdfApplicationDataDictionary::Private() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
}
SkPdfDate LastModified() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate LastModified() const;
/** (Optional) Any private data appropriate to the application, typically
* in the form of a dictionary.
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", NULL));
}
SkPdfObject* Private() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfObject* Private() const;
};
#endif // __DEFINED__SkPdfApplicationDataDictionary

View File

@ -0,0 +1,2 @@
#include "SkPdfArray_autogen.h"

View File

@ -0,0 +1,23 @@
#include "SkPdfArtifactsDictionary_autogen.h"
std::string SkPdfArtifactsDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkRect* SkPdfArtifactsDictionary::BBox() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfArtifactsDictionary::Attached() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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).
@ -547,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
}
SkRect* BBox() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* BBox() const;
/** (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
@ -565,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", NULL));
}
SkPdfArray* Attached() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Attached() const;
};
#endif // __DEFINED__SkPdfArtifactsDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfAttributeObjectDictionary_autogen.h"
std::string SkPdfAttributeObjectDictionary::O() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
}
std::string O() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string O() const;
};
#endif // __DEFINED__SkPdfAttributeObjectDictionary

View File

@ -0,0 +1,44 @@
#include "SkPdfBeadDictionary_autogen.h"
std::string SkPdfBeadDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfBeadDictionary::T() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBeadDictionary::N() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBeadDictionary::V() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBeadDictionary::P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* SkPdfBeadDictionary::R() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
}
SkPdfDictionary* T() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* T() const;
/** (Required; must be an indirect reference) The next bead in the thread. In the last bead,
* this entry points to the first.
**/
@ -562,13 +550,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
}
SkPdfDictionary* N() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* N() const;
/** (Required; must be an indirect reference) The previous bead in the thread. In the first
* bead, this entry points to the last.
**/
@ -576,13 +558,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
}
SkPdfDictionary* V() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* V() const;
/** (Required; must be an indirect reference) The page object representing the page on
* which this bead appears.
**/
@ -590,26 +566,14 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
}
SkPdfDictionary* P() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* P() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* R() const;
};
#endif // __DEFINED__SkPdfBeadDictionary

View File

@ -0,0 +1,93 @@
#include "SkPdfBlockLevelStructureElementsDictionary_autogen.h"
double SkPdfBlockLevelStructureElementsDictionary::SpaceBefore() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SkPdfBlockLevelStructureElementsDictionary::SpaceAfter() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SkPdfBlockLevelStructureElementsDictionary::StartIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SkPdfBlockLevelStructureElementsDictionary::EndIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SkPdfBlockLevelStructureElementsDictionary::TextIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfBlockLevelStructureElementsDictionary::TextAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkRect* SkPdfBlockLevelStructureElementsDictionary::BBox() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
double SkPdfBlockLevelStructureElementsDictionary::getWidthAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfBlockLevelStructureElementsDictionary::getWidthAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
double SkPdfBlockLevelStructureElementsDictionary::getHeightAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfBlockLevelStructureElementsDictionary::getHeightAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfBlockLevelStructureElementsDictionary::BlockAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfBlockLevelStructureElementsDictionary::InlineAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -538,13 +538,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", NULL));
}
double SpaceBefore() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SpaceBefore() const;
/** (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
@ -558,13 +552,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", NULL));
}
double SpaceAfter() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double SpaceAfter() const;
/** (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
@ -584,13 +572,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", NULL));
}
double StartIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double StartIndent() const;
/** (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
@ -608,13 +590,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", NULL));
}
double EndIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double EndIndent() const;
/** (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
@ -628,13 +604,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", NULL));
}
double TextIndent() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double TextIndent() const;
/** (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.
@ -650,13 +620,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", NULL));
}
std::string TextAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string TextAlign() const;
/** (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-
@ -668,13 +632,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
}
SkRect* BBox() const {
SkRect* ret;
if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkRect* BBox() const;
/** (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
@ -695,26 +653,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
}
double getWidthAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double getWidthAsNumber() const;
bool isWidthAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
std::string getWidthAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getWidthAsName() const;
/** (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-
@ -734,26 +680,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
}
double getHeightAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double getHeightAsNumber() const;
bool isHeightAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
std::string getHeightAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getHeightAsName() const;
/** (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
@ -780,13 +714,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", NULL));
}
std::string BlockAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string BlockAlign() const;
/** (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
@ -807,13 +735,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", NULL));
}
std::string InlineAlign() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string InlineAlign() const;
};
#endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary

View File

@ -0,0 +1,2 @@
#include "SkPdfBoolean_autogen.h"

View File

@ -0,0 +1,30 @@
#include "SkPdfBorderStyleDictionary_autogen.h"
std::string SkPdfBorderStyleDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
double SkPdfBorderStyleDictionary::W() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfBorderStyleDictionary::S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfBorderStyleDictionary::D() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (Optional) The border width in points. If this value is 0, no border is drawn. Default
* value: 1.
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
}
double W() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double W() const;
/** (Optional) The border style:
* S (Solid) A solid rectangle surrounding the annotation.
* D (Dashed) A dashed rectangle surrounding the annotation. The dash pattern
@ -569,13 +557,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
}
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string S() const;
/** (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
@ -587,13 +569,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
}
SkPdfArray* D() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* D() const;
};
#endif // __DEFINED__SkPdfBorderStyleDictionary

View File

@ -0,0 +1,30 @@
#include "SkPdfBoxColorInformationDictionary_autogen.h"
SkPdfDictionary* SkPdfBoxColorInformationDictionary::CropBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBoxColorInformationDictionary::BleedBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBoxColorInformationDictionary::TrimBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfBoxColorInformationDictionary::ArtBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
}
SkPdfDictionary* CropBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* CropBox() const;
/** (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.
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
}
SkPdfDictionary* BleedBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* BleedBox() const;
/** (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.
@ -563,13 +551,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
}
SkPdfDictionary* TrimBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* TrimBox() const;
/** (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.
@ -578,13 +560,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
}
SkPdfDictionary* ArtBox() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* ArtBox() const;
};
#endif // __DEFINED__SkPdfBoxColorInformationDictionary

View File

@ -0,0 +1,30 @@
#include "SkPdfBoxStyleDictionary_autogen.h"
SkPdfArray* SkPdfBoxStyleDictionary::C() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
double SkPdfBoxStyleDictionary::W() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfBoxStyleDictionary::S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfBoxStyleDictionary::D() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,26 +533,14 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
}
SkPdfArray* C() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* C() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double W() const;
/** (Optional) The guideline style:
* S (Solid) A solid rectangle.
* D (Dashed) A dashed rectangle. The dash pattern is specified by the D entry
@ -563,13 +551,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
}
std::string S() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string S() const;
/** (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
@ -581,13 +563,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
}
SkPdfArray* D() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* D() const;
};
#endif // __DEFINED__SkPdfBoxStyleDictionary

View File

@ -0,0 +1,30 @@
#include "SkPdfCIDFontDescriptorDictionary_autogen.h"
SkPdfDictionary* SkPdfCIDFontDescriptorDictionary::Style() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfCIDFontDescriptorDictionary::Lang() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCIDFontDescriptorDictionary::FD() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfCIDFontDescriptorDictionary::CIDSet() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", NULL));
}
SkPdfDictionary* Style() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Style() const;
/** (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
@ -549,13 +543,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
}
std::string Lang() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Lang() const;
/** (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,"
@ -565,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", NULL));
}
SkPdfDictionary* FD() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* FD() const;
/** (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-
@ -585,13 +567,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", NULL));
}
SkPdfStream* CIDSet() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* CIDSet() const;
};
#endif // __DEFINED__SkPdfCIDFontDescriptorDictionary

View File

@ -0,0 +1,79 @@
#include "SkPdfCIDFontDictionary_autogen.h"
std::string SkPdfCIDFontDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCIDFontDictionary::Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCIDFontDictionary::BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCIDFontDictionary::CIDSystemInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCIDFontDictionary::FontDescriptor() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfCIDFontDictionary::DW() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfArray* SkPdfCIDFontDictionary::W() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCIDFontDictionary::DW2() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCIDFontDictionary::W2() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfCIDFontDictionary::getCIDToGIDMapAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfCIDFontDictionary::getCIDToGIDMapAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -49,26 +49,14 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subtype() const;
/** (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;
@ -79,13 +67,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
}
std::string BaseFont() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string BaseFont() const;
/** (Required) A dictionary containing entries that define the character collec-
* tion of the CIDFont. See Table 5.12 on page 337.
**/
@ -93,13 +75,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", NULL));
}
SkPdfDictionary* CIDSystemInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* CIDSystemInfo() const;
/** (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").
@ -108,13 +84,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", NULL));
}
SkPdfDictionary* FontDescriptor() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* FontDescriptor() const;
/** (Optional) The default width for glyphs in the CIDFont (see "Glyph Met-
* rics in CIDFonts" on page 340). Default value: 1000.
**/
@ -122,13 +92,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", NULL));
}
long DW() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long DW() const;
/** (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
@ -139,13 +103,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
}
SkPdfArray* W() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* W() const;
/** (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].
@ -154,13 +112,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", NULL));
}
SkPdfArray* DW2() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* DW2() const;
/** (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
@ -170,13 +122,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", NULL));
}
SkPdfArray* W2() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* W2() const;
/** (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
@ -197,26 +143,14 @@ public:
return ret->podofo()->HasStream();
}
SkPdfStream* getCIDToGIDMapAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* getCIDToGIDMapAsStream() const;
bool isCIDToGIDMapAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
std::string getCIDToGIDMapAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getCIDToGIDMapAsName() const;
};
#endif // __DEFINED__SkPdfCIDFontDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfCIDSystemInfoDictionary_autogen.h"
std::string SkPdfCIDSystemInfoDictionary::Registry() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCIDSystemInfoDictionary::Ordering() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
long SkPdfCIDSystemInfoDictionary::Supplement() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -534,13 +534,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", NULL));
}
std::string Registry() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Registry() const;
/** (Required) A string that uniquely names the character collection within the speci-
* fied registry-for example, Japan1.
**/
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", NULL));
}
std::string Ordering() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Ordering() const;
/** (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-
@ -565,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", NULL));
}
long Supplement() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Supplement() const;
};
#endif // __DEFINED__SkPdfCIDSystemInfoDictionary

View File

@ -0,0 +1,51 @@
#include "SkPdfCMapDictionary_autogen.h"
std::string SkPdfCMapDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCMapDictionary::CMapName() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCMapDictionary::getCIDSystemInfoAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCMapDictionary::getCIDSystemInfoAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfCMapDictionary::WMode() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfCMapDictionary::getUseCMapAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfStream* SkPdfCMapDictionary::getUseCMapAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (Required) The PostScript name of the CMap. This should be the same as the
* value of CMapName in the CMap file itself.
**/
@ -547,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", NULL));
}
std::string CMapName() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string CMapName() const;
/** (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
@ -580,26 +568,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getCIDSystemInfoAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getCIDSystemInfoAsDictionary() const;
bool isCIDSystemInfoAArray() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
SkPdfArray* getCIDSystemInfoAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* getCIDSystemInfoAsArray() const;
/** (Optional) A code that determines the writing mode for any CIDFont with
* which this CMap is combined:
* 0 Horizontal
@ -612,13 +588,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", NULL));
}
long WMode() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long WMode() const;
/** (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
@ -634,26 +604,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
std::string getUseCMapAsName() const {
std::string ret = "";
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string getUseCMapAsName() const;
bool isUseCMapAStream() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return false;
return ret->podofo()->HasStream();
}
SkPdfStream* getUseCMapAsStream() const {
SkPdfStream* ret = NULL;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* getUseCMapAsStream() const;
};
#endif // __DEFINED__SkPdfCMapDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfCalgrayColorSpaceDictionary_autogen.h"
SkPdfArray* SkPdfCalgrayColorSpaceDictionary::WhitePoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCalgrayColorSpaceDictionary::BlackPoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
double SkPdfCalgrayColorSpaceDictionary::Gamma() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -534,13 +534,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
}
SkPdfArray* WhitePoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* WhitePoint() const;
/** (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
@ -550,13 +544,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
}
SkPdfArray* BlackPoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* BlackPoint() const;
/** (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.
@ -565,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
}
double Gamma() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double Gamma() const;
};
#endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary

View File

@ -0,0 +1,30 @@
#include "SkPdfCalrgbColorSpaceDictionary_autogen.h"
SkPdfArray* SkPdfCalrgbColorSpaceDictionary::WhitePoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCalrgbColorSpaceDictionary::BlackPoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCalrgbColorSpaceDictionary::Gamma() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCalrgbColorSpaceDictionary::Matrix() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
}
SkPdfArray* WhitePoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* WhitePoint() const;
/** (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].
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
}
SkPdfArray* BlackPoint() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* BlackPoint() const;
/** (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].
@ -563,13 +551,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
}
SkPdfArray* Gamma() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Gamma() const;
/** (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
@ -579,13 +561,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
}
SkPdfArray* Matrix() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Matrix() const;
};
#endif // __DEFINED__SkPdfCalrgbColorSpaceDictionary

View File

@ -0,0 +1,163 @@
#include "SkPdfCatalogDictionary_autogen.h"
std::string SkPdfCatalogDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCatalogDictionary::Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCatalogDictionary::Pages() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
double SkPdfCatalogDictionary::getPageLabelsAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfTree* SkPdfCatalogDictionary::getPageLabelsAsTree() const {
SkPdfTree* ret = NULL;
if (TreeFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::Names() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::Dests() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::ViewerPreferences() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfCatalogDictionary::PageLayout() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfCatalogDictionary::PageMode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCatalogDictionary::Outlines() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCatalogDictionary::Threads() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCatalogDictionary::getOpenActionAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::getOpenActionAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::URI() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::AcroForm() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfCatalogDictionary::Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::StructTreeRoot() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfCatalogDictionary::MarkInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfCatalogDictionary::Lang() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfCatalogDictionary::SpiderInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfCatalogDictionary::OutputIntents() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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-
@ -555,13 +549,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
}
std::string Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Version() const;
/** (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").
**/
@ -569,13 +557,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
}
SkPdfDictionary* Pages() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Pages() const;
/** (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
@ -593,26 +575,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
}
double getPageLabelsAsNumber() const {
double ret = 0;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double getPageLabelsAsNumber() const;
bool isPageLabelsATree() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Reference;
}
SkPdfTree* getPageLabelsAsTree() const {
SkPdfTree* ret = NULL;
if (TreeFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfTree* getPageLabelsAsTree() const;
/** (Optional; PDF 1.2) The document's name dictionary (see Section 3.6.3,
* "Name Dictionary").
**/
@ -620,13 +590,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", NULL));
}
SkPdfDictionary* Names() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Names() const;
/** (Optional; PDF 1.1; must be an indirect reference) A dictionary of names
* and corresponding destinations (see "Named Destinations" on page
* 476).
@ -635,13 +599,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", NULL));
}
SkPdfDictionary* Dests() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Dests() const;
/** (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
@ -651,13 +609,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", NULL));
}
SkPdfDictionary* ViewerPreferences() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* ViewerPreferences() const;
/** (Optional) A name object specifying the page layout to be used when the
* document is opened:
* SinglePage Display one page at a time.
@ -672,13 +624,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", NULL));
}
std::string PageLayout() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string PageLayout() const;
/** (Optional) A name object specifying how the document should be dis-
* played when opened:
* UseNone Neither document outline nor thumbnail im-
@ -693,13 +639,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", NULL));
}
std::string PageMode() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string PageMode() const;
/** (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").
@ -708,13 +648,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", NULL));
}
SkPdfDictionary* Outlines() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Outlines() const;
/** (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").
@ -723,13 +657,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", NULL));
}
SkPdfArray* Threads() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Threads() const;
/** (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")
@ -747,26 +675,14 @@ public:
return ret->podofo()->GetDataType() == ePdfDataType_Array;
}
SkPdfArray* getOpenActionAsArray() const {
SkPdfArray* ret = NULL;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* getOpenActionAsArray() const;
bool isOpenActionADictionary() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
}
SkPdfDictionary* getOpenActionAsDictionary() const {
SkPdfDictionary* ret = NULL;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* getOpenActionAsDictionary() const;
/** (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
@ -776,13 +692,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
}
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AA() const;
/** (Optional) A URI dictionary containing document-level information for
* URI (uniform resource identifier) actions (see "URI Actions" on page
* 523).
@ -791,13 +701,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", NULL));
}
SkPdfDictionary* URI() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* URI() const;
/** (Optional; PDF 1.2) The document's interactive form (AcroForm) dic-
* tionary (see Section 8.6.1, "Interactive Form Dictionary").
**/
@ -805,13 +709,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", NULL));
}
SkPdfDictionary* AcroForm() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AcroForm() const;
/** (Optional; PDF 1.4; must be an indirect reference) A metadata stream
* containing metadata for the document (see Section 9.2.2, "Metadata
* Streams").
@ -820,13 +718,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
}
SkPdfStream* Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* Metadata() const;
/** (Optional; PDF 1.3) The document's structure tree root dictionary (see
* Section 9.6.1, "Structure Hierarchy").
**/
@ -834,13 +726,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", NULL));
}
SkPdfDictionary* StructTreeRoot() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* StructTreeRoot() const;
/** (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").
@ -849,13 +735,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", NULL));
}
SkPdfDictionary* MarkInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* MarkInfo() const;
/** (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,
@ -866,13 +746,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
}
std::string Lang() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Lang() const;
/** (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").
@ -881,13 +755,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", NULL));
}
SkPdfDictionary* SpiderInfo() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SpiderInfo() const;
/** (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).
@ -896,13 +764,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", NULL));
}
SkPdfArray* OutputIntents() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* OutputIntents() const;
};
#endif // __DEFINED__SkPdfCatalogDictionary

View File

@ -0,0 +1,58 @@
#include "SkPdfCcittfaxdecodeFilterDictionary_autogen.h"
long SkPdfCcittfaxdecodeFilterDictionary::K() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
bool SkPdfCcittfaxdecodeFilterDictionary::EndOfLine() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool SkPdfCcittfaxdecodeFilterDictionary::EncodedByteAlign() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
long SkPdfCcittfaxdecodeFilterDictionary::Columns() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfCcittfaxdecodeFilterDictionary::Rows() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
bool SkPdfCcittfaxdecodeFilterDictionary::EndOfBlock() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool SkPdfCcittfaxdecodeFilterDictionary::BlackIs1() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
long SkPdfCcittfaxdecodeFilterDictionary::DamagedRowsBeforeError() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -539,13 +539,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
}
long K() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long K() const;
/** ()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.
@ -555,13 +549,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", NULL));
}
bool EndOfLine() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool EndOfLine() const;
/** ()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
@ -572,13 +560,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", NULL));
}
bool EncodedByteAlign() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool EncodedByteAlign() const;
/** ()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:
@ -588,13 +570,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", NULL));
}
long Columns() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Columns() const;
/** ()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-
@ -604,13 +580,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", NULL));
}
long Rows() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Rows() const;
/** ()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
@ -623,13 +593,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", NULL));
}
bool EndOfBlock() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool EndOfBlock() const;
/** ()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.
@ -638,13 +602,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", NULL));
}
bool BlackIs1() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool BlackIs1() const;
/** ()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
@ -657,13 +615,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", NULL));
}
long DamagedRowsBeforeError() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long DamagedRowsBeforeError() const;
};
#endif // __DEFINED__SkPdfCcittfaxdecodeFilterDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfCheckboxFieldDictionary_autogen.h"
std::string SkPdfCheckboxFieldDictionary::Opt() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
}
std::string Opt() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Opt() const;
};
#endif // __DEFINED__SkPdfCheckboxFieldDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfChoiceFieldDictionary_autogen.h"
SkPdfArray* SkPdfChoiceFieldDictionary::Opt() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfChoiceFieldDictionary::TI() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfArray* SkPdfChoiceFieldDictionary::I() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -535,13 +535,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
}
SkPdfArray* Opt() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Opt() const;
/** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
* of the first option visible in the list).
**/
@ -549,13 +543,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
}
long TI() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long TI() const;
/** (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
@ -568,13 +556,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
}
SkPdfArray* I() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* I() const;
};
#endif // __DEFINED__SkPdfChoiceFieldDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfComponentsWithMetadataDictionary_autogen.h"
SkPdfStream* SkPdfComponentsWithMetadataDictionary::Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -531,13 +531,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
}
SkPdfStream* Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* Metadata() const;
};
#endif // __DEFINED__SkPdfComponentsWithMetadataDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfDctdecodeFilterDictionary_autogen.h"
long SkPdfDctdecodeFilterDictionary::ColorTransform() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -548,13 +548,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", NULL));
}
long ColorTransform() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long ColorTransform() const;
};
#endif // __DEFINED__SkPdfDctdecodeFilterDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfDeviceNColorSpaceDictionary_autogen.h"
SkPdfDictionary* SkPdfDeviceNColorSpaceDictionary::Colorants() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -542,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", NULL));
}
SkPdfDictionary* Colorants() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Colorants() const;
};
#endif // __DEFINED__SkPdfDeviceNColorSpaceDictionary

View File

@ -0,0 +1,2 @@
#include "SkPdfDictionary_autogen.h"

View File

@ -0,0 +1,37 @@
#include "SkPdfDocumentCatalogActionsDictionary_autogen.h"
SkPdfDictionary* SkPdfDocumentCatalogActionsDictionary::DC() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfDocumentCatalogActionsDictionary::WS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfDocumentCatalogActionsDictionary::DS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfDocumentCatalogActionsDictionary::WP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfDocumentCatalogActionsDictionary::DP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", NULL));
}
SkPdfDictionary* DC() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* DC() const;
/** (Optional; PDF 1.4) A JavaScript action to be performed before saving a document.
* (The name WS stands for "will save.")
**/
@ -546,13 +540,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", NULL));
}
SkPdfDictionary* WS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* WS() const;
/** (Optional; PDF 1.4) A JavaScript action to be performed after saving a document. (The
* name DS stands for "did save.")
**/
@ -560,13 +548,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", NULL));
}
SkPdfDictionary* DS() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* DS() const;
/** (Optional; PDF 1.4) A JavaScript action to be performed before printing a document.
* (The name WP stands for "will print.")
**/
@ -574,13 +556,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", NULL));
}
SkPdfDictionary* WP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* WP() const;
/** (Optional; PDF 1.4) A JavaScript action to be performed after printing a document.
* (The name DP stands for "did print.")
**/
@ -588,13 +564,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", NULL));
}
SkPdfDictionary* DP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* DP() const;
};
#endif // __DEFINED__SkPdfDocumentCatalogActionsDictionary

View File

@ -0,0 +1,65 @@
#include "SkPdfDocumentInformationDictionary_autogen.h"
std::string SkPdfDocumentInformationDictionary::Title() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfDocumentInformationDictionary::Author() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfDocumentInformationDictionary::Subject() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfDocumentInformationDictionary::Keywords() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfDocumentInformationDictionary::Creator() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfDocumentInformationDictionary::Producer() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDate SkPdfDocumentInformationDictionary::CreationDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate SkPdfDocumentInformationDictionary::ModDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
std::string SkPdfDocumentInformationDictionary::Trapped() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -531,52 +531,28 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", NULL));
}
std::string Title() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Title() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Author() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subject() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Keywords() const;
/** (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.
@ -585,13 +561,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", NULL));
}
std::string Creator() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Creator() const;
/** (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.
@ -600,13 +570,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", NULL));
}
std::string Producer() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Producer() const;
/** (Optional) The date and time the document was created, in human-readable
* form (see Section 3.8.2, "Dates").
**/
@ -614,13 +578,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
}
SkPdfDate CreationDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate CreationDate() const;
/** (Optional; PDF 1.1) The date and time the document was most recently
* modified, in human-readable form (see Section 3.8.2, "Dates").
**/
@ -628,13 +586,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
}
SkPdfDate ModDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate ModDate() const;
/** (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"):
@ -656,13 +608,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", NULL));
}
std::string Trapped() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Trapped() const;
};
#endif // __DEFINED__SkPdfDocumentInformationDictionary

View File

@ -0,0 +1,37 @@
#include "SkPdfEmbeddedFileParameterDictionary_autogen.h"
long SkPdfEmbeddedFileParameterDictionary::Size() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfDate SkPdfEmbeddedFileParameterDictionary::CreationDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate SkPdfEmbeddedFileParameterDictionary::ModDate() const {
SkPdfDate ret;
if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDictionary* SkPdfEmbeddedFileParameterDictionary::Mac() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfEmbeddedFileParameterDictionary::CheckSum() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}

View File

@ -531,39 +531,21 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
}
long Size() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Size() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate CreationDate() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfDate();
}
SkPdfDate ModDate() const;
/** (Optional) A subdictionary containing additional information specific to
* Mac OS files (see Table 3.35).
**/
@ -571,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
}
SkPdfDictionary* Mac() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Mac() const;
/** (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
@ -588,13 +564,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", NULL));
}
std::string CheckSum() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string CheckSum() const;
};
#endif // __DEFINED__SkPdfEmbeddedFileParameterDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfEmbeddedFileStreamDictionary_autogen.h"
std::string SkPdfEmbeddedFileStreamDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfEmbeddedFileStreamDictionary::Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfEmbeddedFileStreamDictionary::Params() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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
@ -551,13 +545,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
}
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subtype() const;
/** (Optional) An embedded file parameter dictionary containing additional, file-
* specific information (see Table 3.34).
**/
@ -565,13 +553,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", NULL));
}
SkPdfDictionary* Params() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Params() const;
};
#endif // __DEFINED__SkPdfEmbeddedFileStreamDictionary

View File

@ -0,0 +1,37 @@
#include "SkPdfEmbeddedFontStreamDictionary_autogen.h"
long SkPdfEmbeddedFontStreamDictionary::Length1() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfEmbeddedFontStreamDictionary::Length2() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfEmbeddedFontStreamDictionary::Length3() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
std::string SkPdfEmbeddedFontStreamDictionary::Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfStream* SkPdfEmbeddedFontStreamDictionary::Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", NULL));
}
long Length1() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Length1() const;
/** (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.
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", NULL));
}
long Length2() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Length2() const;
/** (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-
@ -564,13 +552,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", NULL));
}
long Length3() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Length3() const;
/** (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
@ -580,13 +562,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
}
std::string Subtype() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Subtype() const;
/** (Optional; PDF 1.4) A metadata stream containing metadata for the embedded font
* program (see Section 9.2.2, "Metadata Streams").
**/
@ -594,13 +570,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
}
SkPdfStream* Metadata() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* Metadata() const;
};
#endif // __DEFINED__SkPdfEmbeddedFontStreamDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfEncodingDictionary_autogen.h"
std::string SkPdfEncodingDictionary::Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfEncodingDictionary::BaseEncoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfEncodingDictionary::Differences() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
std::string Type() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Type() const;
/** (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
@ -554,13 +548,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", NULL));
}
std::string BaseEncoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string BaseEncoding() const;
/** (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.
@ -583,13 +571,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
}
SkPdfArray* Differences() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Differences() const;
};
#endif // __DEFINED__SkPdfEncodingDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h"
long SkPdfEncryptedEmbeddedFileStreamDictionary::EncryptionRevision() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", NULL));
}
long EncryptionRevision() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long EncryptionRevision() const;
};
#endif // __DEFINED__SkPdfEncryptedEmbeddedFileStreamDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfEncryptionCommonDictionary_autogen.h"
std::string SkPdfEncryptionCommonDictionary::Filter() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
double SkPdfEncryptionCommonDictionary::V() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfEncryptionCommonDictionary::Length() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -533,13 +533,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
}
std::string Filter() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Filter() const;
/** (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
@ -557,13 +551,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
}
double V() const {
double ret;
if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
double V() const;
/** (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.
**/
@ -571,13 +559,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", NULL));
}
long Length() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Length() const;
};
#endif // __DEFINED__SkPdfEncryptionCommonDictionary

View File

@ -0,0 +1,16 @@
#include "SkPdfFDFCatalogDictionary_autogen.h"
std::string SkPdfFDFCatalogDictionary::Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfFDFCatalogDictionary::FDF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -538,26 +538,14 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
}
std::string Version() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Version() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* FDF() const;
};
#endif // __DEFINED__SkPdfFDFCatalogDictionary

View File

@ -0,0 +1,79 @@
#include "SkPdfFDFDictionary_autogen.h"
SkPdfFileSpec SkPdfFDFDictionary::F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfFileSpec();
}
SkPdfArray* SkPdfFDFDictionary::ID() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfFDFDictionary::Fields() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfFDFDictionary::Status() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfFDFDictionary::Pages() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfFDFDictionary::Encoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfFDFDictionary::Annots() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* SkPdfFDFDictionary::Differences() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfFDFDictionary::Target() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfArray* SkPdfFDFDictionary::EmbeddedFDFs() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFDictionary::JavaScript() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
}
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfFileSpec();
}
SkPdfFileSpec F() const;
/** (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-
@ -548,13 +542,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
}
SkPdfArray* ID() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* ID() const;
/** (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
@ -564,13 +552,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
}
SkPdfArray* Fields() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Fields() const;
/** (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
@ -581,13 +563,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", NULL));
}
std::string Status() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Status() const;
/** (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
@ -597,13 +573,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
}
SkPdfArray* Pages() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Pages() const;
/** (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-
@ -614,13 +584,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
}
std::string Encoding() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Encoding() const;
/** (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
@ -630,13 +594,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", NULL));
}
SkPdfArray* Annots() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Annots() const;
/** (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-
@ -660,13 +618,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
}
SkPdfStream* Differences() const {
SkPdfStream* ret;
if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfStream* Differences() const;
/** (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.
@ -675,13 +627,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", NULL));
}
std::string Target() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Target() const;
/** (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").
@ -690,13 +636,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", NULL));
}
SkPdfArray* EmbeddedFDFs() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* EmbeddedFDFs() const;
/** (Optional; PDF 1.4) A JavaScript dictionary (see Table 8.71) defin-
* ing document-level JavaScript scripts.
**/
@ -704,13 +644,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", NULL));
}
SkPdfDictionary* JavaScript() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* JavaScript() const;
};
#endif // __DEFINED__SkPdfFDFDictionary

View File

@ -0,0 +1,107 @@
#include "SkPdfFDFFieldDictionary_autogen.h"
SkPdfArray* SkPdfFDFFieldDictionary::Kids() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfFDFFieldDictionary::T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfObject* SkPdfFDFFieldDictionary::V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
long SkPdfFDFFieldDictionary::Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfFDFFieldDictionary::SetFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfFDFFieldDictionary::ClrFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfFDFFieldDictionary::F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfFDFFieldDictionary::SetF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SkPdfFDFFieldDictionary::ClrF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfDictionary* SkPdfFDFFieldDictionary::AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFFieldDictionary::APRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFFieldDictionary::IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfFDFFieldDictionary::Opt() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFFieldDictionary::A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFFieldDictionary::AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -533,26 +533,14 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
}
SkPdfArray* Kids() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Kids() const;
/** (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;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string T() const;
/** (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.
**/
@ -560,13 +548,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
}
SkPdfObject* V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfObject* V() const;
/** (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
@ -577,13 +559,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
}
long Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Ff() const;
/** (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
@ -593,13 +569,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", NULL));
}
long SetFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SetFf() const;
/** (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
@ -610,13 +580,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", NULL));
}
long ClrFf() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long ClrFf() const;
/** (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
@ -627,13 +591,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
}
long F() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long F() const;
/** (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
@ -643,13 +601,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", NULL));
}
long SetF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long SetF() const;
/** (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
@ -660,13 +612,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", NULL));
}
long ClrF() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long ClrF() const;
/** (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
@ -676,13 +622,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
}
SkPdfDictionary* AP() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AP() const;
/** (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
@ -693,13 +633,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", NULL));
}
SkPdfDictionary* APRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* APRef() const;
/** (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.
@ -708,13 +642,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
}
SkPdfDictionary* IF() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* IF() const;
/** (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
@ -726,13 +654,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
}
SkPdfArray* Opt() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Opt() const;
/** (Optional) An action to be performed when this field's widget annotation is activat-
* ed (see Section 8.5, "Actions").
**/
@ -740,13 +662,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
}
SkPdfDictionary* A() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* A() const;
/** (Optional) An additional-actions dictionary defining the field's behavior in re-
* sponse to various trigger events (see Section 8.5.2, "Trigger Events").
**/
@ -754,13 +670,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
}
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AA() const;
};
#endif // __DEFINED__SkPdfFDFFieldDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfFDFFileAnnotationDictionary_autogen.h"
long SkPdfFDFFileAnnotationDictionary::Page() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", NULL));
}
long Page() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Page() const;
};
#endif // __DEFINED__SkPdfFDFFileAnnotationDictionary

View File

@ -0,0 +1,16 @@
#include "SkPdfFDFNamedPageReferenceDictionary_autogen.h"
std::string SkPdfFDFNamedPageReferenceDictionary::Name() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfFileSpec SkPdfFDFNamedPageReferenceDictionary::F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfFileSpec();
}

View File

@ -531,13 +531,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
}
std::string Name() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string Name() const;
/** (Optional) The file containing the named page. If this key is absent, it is
* assumed that the page resides in the associated PDF file.
**/
@ -545,13 +539,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
}
SkPdfFileSpec F() const {
SkPdfFileSpec ret;
if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return SkPdfFileSpec();
}
SkPdfFileSpec F() const;
};
#endif // __DEFINED__SkPdfFDFNamedPageReferenceDictionary

View File

@ -0,0 +1,16 @@
#include "SkPdfFDFPageDictionary_autogen.h"
SkPdfArray* SkPdfFDFPageDictionary::Templates() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFDFPageDictionary::Info() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", NULL));
}
SkPdfArray* Templates() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Templates() const;
/** (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.
@ -547,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
}
SkPdfDictionary* Info() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Info() const;
};
#endif // __DEFINED__SkPdfFDFPageDictionary

View File

@ -0,0 +1,23 @@
#include "SkPdfFDFTemplateDictionary_autogen.h"
SkPdfDictionary* SkPdfFDFTemplateDictionary::TRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfFDFTemplateDictionary::Fields() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
bool SkPdfFDFTemplateDictionary::Rename() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", NULL));
}
SkPdfDictionary* TRef() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* TRef() const;
/** (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).
@ -547,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
}
SkPdfArray* Fields() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Fields() const;
/** (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.
@ -562,13 +550,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", NULL));
}
bool Rename() const {
bool ret;
if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return false;
}
bool Rename() const;
};
#endif // __DEFINED__SkPdfFDFTemplateDictionary

View File

@ -0,0 +1,9 @@
#include "SkPdfFDFTrailerDictionary_autogen.h"
SkPdfDictionary* SkPdfFDFTrailerDictionary::Root() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -532,13 +532,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", NULL));
}
SkPdfDictionary* Root() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Root() const;
};
#endif // __DEFINED__SkPdfFDFTrailerDictionary

View File

@ -0,0 +1,72 @@
#include "SkPdfFieldDictionary_autogen.h"
std::string SkPdfFieldDictionary::FT() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
SkPdfDictionary* SkPdfFieldDictionary::Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* SkPdfFieldDictionary::Kids() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
std::string SkPdfFieldDictionary::T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfFieldDictionary::TU() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string SkPdfFieldDictionary::TM() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
long SkPdfFieldDictionary::Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
SkPdfObject* SkPdfFieldDictionary::V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfObject* SkPdfFieldDictionary::DV() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* SkPdfFieldDictionary::AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}

View File

@ -541,13 +541,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", NULL));
}
std::string FT() const {
std::string ret;
if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string FT() const;
/** (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
@ -557,13 +551,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
}
SkPdfDictionary* Parent() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* Parent() const;
/** (Optional) An array of indirect references to the immediate children of this
* field.
**/
@ -571,13 +559,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
}
SkPdfArray* Kids() const {
SkPdfArray* ret;
if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfArray* Kids() const;
/** (Optional) The partial field name (see "Field Names," below; see also imple-
* mentation notes 82 and 83 in Appendix H).
**/
@ -585,13 +567,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
}
std::string T() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string T() const;
/** (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
@ -603,13 +579,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", NULL));
}
std::string TU() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string TU() const;
/** (Optional; PDF 1.3) The mapping name to be used when exporting inter-
* active form field data from the document.
**/
@ -617,13 +587,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", NULL));
}
std::string TM() const {
std::string ret;
if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return "";
}
std::string TM() const;
/** (Optional; inheritable) A set of flags specifying various characteristics of the
* field (see Table 8.50). Default value: 0.
**/
@ -631,13 +595,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
}
long Ff() const {
long ret;
if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return 0;
}
long Ff() const;
/** (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.
@ -646,13 +604,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
}
SkPdfObject* V() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfObject* V() const;
/** (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.
@ -661,13 +613,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", NULL));
}
SkPdfObject* DV() const {
SkPdfObject* ret;
if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfObject* DV() const;
/** (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
@ -677,13 +623,7 @@ public:
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
}
SkPdfDictionary* AA() const {
SkPdfDictionary* ret;
if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", &ret)) return ret;
// TODO(edisonn): warn about missing required field, assert for known good pdfs
return NULL;
}
SkPdfDictionary* AA() const;
};
#endif // __DEFINED__SkPdfFieldDictionary

Some files were not shown because too many files have changed in this diff Show More