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:
parent
ad4d499f86
commit
131d4ee0ea
@ -4,6 +4,9 @@
|
|||||||
#include "podofo.h"
|
#include "podofo.h"
|
||||||
using namespace PoDoFo;
|
using namespace PoDoFo;
|
||||||
|
|
||||||
|
#include "SkCanvas.h"
|
||||||
|
#include "SkPaint.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
@ -16,6 +19,8 @@ using namespace PoDoFo;
|
|||||||
|
|
||||||
class SkPdfFont;
|
class SkPdfFont;
|
||||||
class SkPdfDoc;
|
class SkPdfDoc;
|
||||||
|
class SkPdfObject;
|
||||||
|
class SkPdfResourceDictionary;
|
||||||
|
|
||||||
// TODO(edisonn): better class design.
|
// TODO(edisonn): better class design.
|
||||||
struct PdfColorOperator {
|
struct PdfColorOperator {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "SkPdfFont.h"
|
#include "SkPdfFont.h"
|
||||||
|
#include "SkPdfParser.h"
|
||||||
|
|
||||||
std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts() {
|
std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts() {
|
||||||
static std::map<std::string, SkPdfStandardFontEntry> gPdfStandardFonts;
|
static std::map<std::string, SkPdfStandardFontEntry> gPdfStandardFonts;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "SkTypeface.h"
|
||||||
#include "SkUtils.h"
|
#include "SkUtils.h"
|
||||||
#include "SkPdfBasics.h"
|
#include "SkPdfBasics.h"
|
||||||
#include "SkPdfUtils.h"
|
#include "SkPdfUtils.h"
|
||||||
|
2352
experimental/PdfViewer/SkPdfParser.cpp
Normal file
2352
experimental/PdfViewer/SkPdfParser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,8 +28,8 @@ struct PdfToken {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class SkPdfTokenizer {
|
class SkPdfTokenizer {
|
||||||
PdfContentsTokenizer* fTokenizer;
|
|
||||||
PdfMemDocument* fDoc;
|
PdfMemDocument* fDoc;
|
||||||
|
PdfContentsTokenizer* fTokenizer;
|
||||||
|
|
||||||
char* fUncompressedStream;
|
char* fUncompressedStream;
|
||||||
pdf_long fUncompressedStreamLength;
|
pdf_long fUncompressedStreamLength;
|
||||||
@ -39,8 +39,8 @@ class SkPdfTokenizer {
|
|||||||
PdfToken fPutBack;
|
PdfToken fPutBack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SkPdfTokenizer(PdfMemDocument* doc = NULL, PdfContentsTokenizer* tokenizer = NULL) : fDoc(doc), fTokenizer(tokenizer), fEmpty(false), fUncompressedStream(NULL), fUncompressedStreamLength(0), fHasPutBack(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), fHasPutBack(false), fEmpty(false) {
|
SkPdfTokenizer(const SkPdfObject* objWithStream) : fDoc(NULL), fTokenizer(NULL), fEmpty(false), fHasPutBack(false) {
|
||||||
fUncompressedStream = NULL;
|
fUncompressedStream = NULL;
|
||||||
fUncompressedStreamLength = 0;
|
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 {
|
try {
|
||||||
fTokenizer = new PdfContentsTokenizer(buffer, len);
|
fTokenizer = new PdfContentsTokenizer(buffer, len);
|
||||||
} catch (PdfError& e) {
|
} catch (PdfError& e) {
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
case ePdfContentsType_Variant: {
|
case ePdfContentsType_Variant: {
|
||||||
token->fType = kObject_TokenType;
|
token->fType = kObject_TokenType;
|
||||||
PdfObject* obj = new PdfObject(var);
|
PdfObject* obj = new PdfObject(var);
|
||||||
PodofoMapper::map(*fDoc, *obj, &token->fObject);
|
mapObject(*fDoc, *obj, &token->fObject);
|
||||||
}
|
}
|
||||||
break;
|
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 {
|
class SkPdfDoc {
|
||||||
PdfMemDocument fDoc;
|
PdfMemDocument fDoc;
|
||||||
public:
|
public:
|
||||||
@ -139,10 +224,20 @@ public:
|
|||||||
return fDoc.GetPageCount();
|
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
|
// Can return NULL
|
||||||
SkPdfPageObjectDictionary* page(int n) {
|
SkPdfPageObjectDictionary* page(int n) {
|
||||||
SkPdfPageObjectDictionary* page = NULL;
|
SkPdfPageObjectDictionary* page = NULL;
|
||||||
PodofoMapper::map(fDoc, *fDoc.GetPage(n)->GetObject(), &page);
|
mapPageObjectDictionary(fDoc, *fDoc.GetPage(n)->GetObject(), &page);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,10 +250,89 @@ public:
|
|||||||
return skrect;
|
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) {
|
SkPdfTokenizer* tokenizerOfPage(int n) {
|
||||||
PdfContentsTokenizer* t = new PdfContentsTokenizer(fDoc.GetPage(n));
|
PdfContentsTokenizer* t = new PdfContentsTokenizer(fDoc.GetPage(n));
|
||||||
return new SkPdfTokenizer(&fDoc, t);
|
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
|
#endif // SkPdfParser_DEFINED
|
||||||
|
@ -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;}
|
@ -39,20 +39,17 @@ bool StringFromDictionary(const PdfMemDocument* pdfDoc,
|
|||||||
const char* key,
|
const char* key,
|
||||||
const char* abr,
|
const char* abr,
|
||||||
std::string* data);
|
std::string* data);
|
||||||
|
/*
|
||||||
class SkPdfDictionary;
|
class SkPdfDictionary;
|
||||||
bool DictionaryFromDictionary(const PdfMemDocument* pdfDoc,
|
bool DictionaryFromDictionary(const PdfMemDocument* pdfDoc,
|
||||||
const PdfDictionary& dict,
|
const PdfDictionary& dict,
|
||||||
const char* key,
|
const char* key,
|
||||||
const char* abr,
|
const char* abr,
|
||||||
SkPdfDictionary** data);
|
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;
|
class SkPdfObject;
|
||||||
bool ObjectFromDictionary(const PdfMemDocument* pdfDoc,
|
bool ObjectFromDictionary(const PdfMemDocument* pdfDoc,
|
||||||
@ -118,9 +115,10 @@ bool FunctionFromDictionary(const PdfMemDocument* pdfDoc,
|
|||||||
const char* abr,
|
const char* abr,
|
||||||
SkPdfFunction* data);
|
SkPdfFunction* data);
|
||||||
|
|
||||||
bool skpdfmap(const PdfMemDocument& podofoDoc, const PdfObject& podofoObj, SkPdfObject** out);
|
|
||||||
SkMatrix SkMatrixFromPdfArray(SkPdfArray* pdfArray);
|
SkMatrix SkMatrixFromPdfArray(SkPdfArray* pdfArray);
|
||||||
|
|
||||||
PdfResult doType3Char(PdfContext* pdfContext, SkCanvas* canvas, SkPdfObject* skobj, SkRect bBox, SkMatrix matrix, double textSize);
|
PdfResult doType3Char(PdfContext* pdfContext, SkCanvas* canvas, SkPdfObject* skobj, SkRect bBox, SkMatrix matrix, double textSize);
|
||||||
|
|
||||||
|
#include "SkPdfPodofoMapper_autogen.h"
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfUtils
|
#endif // __DEFINED__SkPdfUtils
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subtype() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) An alternate representation of the annotation's contents in
|
/** (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-
|
* 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,
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Contents() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; not permitted if an A entry is present) A destination to be displayed
|
/** (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
|
* when the annotation is activated (see Section 8.2.1, "Destinations"; see also
|
||||||
* implementation note 66 in Appendix H).
|
* implementation note 66 in Appendix H).
|
||||||
@ -569,39 +557,21 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* getDestAsArray() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isDestAName() const {
|
bool isDestAName() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getDestAsName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isDestAString() const {
|
bool isDestAString() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dest", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
|
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getDestAsString() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) The annotation's highlighting mode, the visual effect to be
|
/** (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:
|
* used when the mouse button is pressed or held down inside its active area:
|
||||||
* N (None) No highlighting.
|
* N (None) No highlighting.
|
||||||
@ -620,13 +590,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string H() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) A URI action (see "URI Actions" on page 523) formerly
|
/** (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-
|
* 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"
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* PA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfALinkAnnotationDictionary
|
#endif // __DEFINED__SkPdfALinkAnnotationDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The type of action that this dictionary describes; see Table 8.34
|
/** (Required) The type of action that this dictionary describes; see Table 8.34
|
||||||
* on page 518 for specific values.
|
* on page 518 for specific values.
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string S() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) The next action, or sequence of actions, to be per-
|
/** (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
|
* 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-
|
* array of action dictionaries to be performed in order; see below for fur-
|
||||||
@ -568,26 +556,14 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getNextAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isNextAArray() const {
|
bool isNextAArray() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Next", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* getNextAsArray() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfActionDictionary
|
#endif // __DEFINED__SkPdfActionDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -531,13 +531,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Image", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* Image() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A flag indicating whether this alternate image is the default ver-
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DefaultForPrinting", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefaultForPrinting() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAlternateImageDictionary
|
#endif // __DEFINED__SkPdfAlternateImageDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* E() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An action to be performed when the cursor exits the annotation's
|
/** (Optional; PDF 1.2) An action to be performed when the cursor exits the annotation's
|
||||||
* active area.
|
* active area.
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "X", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* X() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An action to be performed when the mouse button is pressed
|
/** (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.")
|
* inside the annotation's active area. (The name D stands for "down.")
|
||||||
**/
|
**/
|
||||||
@ -560,13 +548,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* D() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An action to be performed when the mouse button is released
|
/** (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.")
|
* 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,
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* U() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2; widget annotations only) An action to be performed when the
|
/** (Optional; PDF 1.2; widget annotations only) An action to be performed when the
|
||||||
* annotation receives the input focus.
|
* annotation receives the input focus.
|
||||||
**/
|
**/
|
||||||
@ -590,13 +566,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fo", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Fo() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2; widget annotations only) (Uppercase B, lowercase L) An action to
|
/** (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
|
* be performed when the annotation loses the input focus. (The name Bl stands for
|
||||||
* "blurred.")
|
* "blurred.")
|
||||||
@ -605,13 +575,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Bl", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Bl() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAnnotationActionsDictionary
|
#endif // __DEFINED__SkPdfAnnotationActionsDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The type of annotation that this dictionary describes; see Table
|
/** (Required) The type of annotation that this dictionary describes; see Table
|
||||||
* 8.14 on page 499 for specific values.
|
* 8.14 on page 499 for specific values.
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subtype() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required or optional, depending on the annotation type) Text to be displayed
|
/** (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-
|
* 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
|
* ternate description of the annotation's contents in human-readable form. In
|
||||||
@ -564,13 +552,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Contents() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3; not used in FDF files) An indirect reference to the page
|
/** (Optional; PDF 1.3; not used in FDF files) An indirect reference to the page
|
||||||
* object with which this annotation is associated.
|
* object with which this annotation is associated.
|
||||||
**/
|
**/
|
||||||
@ -578,13 +560,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* P() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The annotation rectangle, defining the location of the annotation
|
/** (Required) The annotation rectangle, defining the location of the annotation
|
||||||
* on the page in default user space units.
|
* on the page in default user space units.
|
||||||
**/
|
**/
|
||||||
@ -592,13 +568,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rect", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkRect* Rect() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) The annotation name, a text string uniquely identifying
|
/** (Optional; PDF 1.4) The annotation name, a text string uniquely identifying
|
||||||
* it among all the annotations on its page.
|
* it among all the annotations on its page.
|
||||||
**/
|
**/
|
||||||
@ -621,26 +591,14 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate getMAsDate() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isMAString() const {
|
bool isMAString() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
|
return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()->GetDataType() == ePdfDataType_HexString;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getMAsString() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) A set of flags specifying various characteristics of the an-
|
/** (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.
|
* notation (see Section 8.4.2, "Annotation Flags"). Default value: 0.
|
||||||
**/
|
**/
|
||||||
@ -648,13 +606,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long F() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) A border style dictionary specifying the characteristics of
|
/** (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-
|
* the annotation's border (see Section 8.4.3, "Border Styles"; see also imple-
|
||||||
* mentation note 60 in Appendix H).
|
* mentation note 60 in Appendix H).
|
||||||
@ -666,13 +618,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BS", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* BS() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array specifying the characteristics of the annotation's border.
|
/** (Optional) An array specifying the characteristics of the annotation's border.
|
||||||
* The border is specified as a "rounded rectangle."
|
* The border is specified as a "rounded rectangle."
|
||||||
* In PDF 1.0, the array consists of three numbers defining the horizontal cor-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Border", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Border() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An appearance dictionary specifying how the annotation
|
/** (Optional; PDF 1.2) An appearance dictionary specifying how the annotation
|
||||||
* is presented visually on the page (see Section 8.4.4, "Appearance Streams";
|
* is presented visually on the page (see Section 8.4.4, "Appearance Streams";
|
||||||
* see also implementation note 60 in Appendix H).
|
* see also implementation note 60 in Appendix H).
|
||||||
@ -715,13 +655,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AP() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required if the appearance dictionary AP contains one or more subdictionaries;
|
/** (Required if the appearance dictionary AP contains one or more subdictionaries;
|
||||||
* PDF 1.2) The annotation's appearance state, which selects the applicable
|
* PDF 1.2) The annotation's appearance state, which selects the applicable
|
||||||
* appearance stream from an appearance subdictionary (see Section 8.4.4,
|
* appearance stream from an appearance subdictionary (see Section 8.4.4,
|
||||||
@ -731,13 +665,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AS", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AS() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) An array of three numbers in the range 0.0 to 1.0, repre-
|
/** (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
|
* senting the components of a color in the DeviceRGB color space. This color
|
||||||
* will be used for the following purposes:
|
* will be used for the following purposes:
|
||||||
@ -749,13 +677,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* C() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) The constant opacity value to be used in painting the
|
/** (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
|
* annotation (see Sections 7.1, "Overview of Transparency," and 7.2.6, "Shape
|
||||||
* and Opacity Computations"). This value applies to all visible elements of
|
* and Opacity Computations"). This value applies to all visible elements of
|
||||||
@ -777,13 +699,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double CA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) The text label to be displayed in the title bar of the anno-
|
/** (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.
|
* tation's pop-up window when open and active.
|
||||||
**/
|
**/
|
||||||
@ -791,13 +707,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string T() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) An indirect reference to a pop-up annotation for enter-
|
/** (Optional; PDF 1.3) An indirect reference to a pop-up annotation for enter-
|
||||||
* ing or editing the text associated with this annotation.
|
* ing or editing the text associated with this annotation.
|
||||||
**/
|
**/
|
||||||
@ -805,13 +715,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Popup", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Popup() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) An action to be performed when the annotation is acti-
|
/** (Optional; PDF 1.1) An action to be performed when the annotation is acti-
|
||||||
* vated (see Section 8.5, "Actions").
|
* vated (see Section 8.5, "Actions").
|
||||||
* Note: This entry is not permitted in link annotations if a Dest entry is present
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* A() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An additional-actions dictionary defining the anno-
|
/** (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,
|
* 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-
|
* "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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required if the annotation is a structural content item; PDF 1.3) The integer
|
/** (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-
|
* key of the annotation's entry in the structural parent tree (see "Finding Struc-
|
||||||
* ture Elements from Content Items" on page 600).
|
* ture Elements from Content Items" on page 600).
|
||||||
@ -853,13 +745,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructParent", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long StructParent() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAnnotationDictionary
|
#endif // __DEFINED__SkPdfAnnotationDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long R() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
|
/** (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
|
* widget annotation's border. The number of array elements determines the color
|
||||||
* space in which the color is defined:
|
* space in which the color is defined:
|
||||||
@ -552,13 +546,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BC", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* BC() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of numbers in the range 0.0 to 1.0 specifying the color of the
|
/** (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
|
* widget annotation's background. The number of array elements determines the
|
||||||
* color space, as described above for BC.
|
* color space, as described above for BC.
|
||||||
@ -567,13 +555,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* BG() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; button fields only) The widget annotation's normal caption, displayed
|
/** (Optional; button fields only) The widget annotation's normal caption, displayed
|
||||||
* when it is not interacting with the user.
|
* when it is not interacting with the user.
|
||||||
* Note: Unlike the remaining entries listed below, which apply only to widget annota-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CA() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only) The widget annotation's rollover caption, dis-
|
/** (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
|
* played when the user rolls the cursor into its active area without pressing the
|
||||||
* mouse button.
|
* mouse button.
|
||||||
@ -600,13 +576,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RC", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string RC() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only) The widget annotation's alternate (down)
|
/** (Optional; pushbutton fields only) The widget annotation's alternate (down)
|
||||||
* caption, displayed when the mouse button is pressed within its active area.
|
* caption, displayed when the mouse button is pressed within its active area.
|
||||||
**/
|
**/
|
||||||
@ -614,13 +584,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AC", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AC() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
|
/** (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-
|
* defining the widget annotation's normal icon, displayed when it is not inter-
|
||||||
* acting with the user.
|
* acting with the user.
|
||||||
@ -629,13 +593,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* I() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
|
/** (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
|
* defining the widget annotation's rollover icon, displayed when the user rolls the
|
||||||
* cursor into its active area without pressing the mouse button.
|
* cursor into its active area without pressing the mouse button.
|
||||||
@ -644,13 +602,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* RI() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
|
/** (Optional; pushbutton fields only; must be an indirect reference) A form XObject
|
||||||
* defining the widget annotation's alternate (down) icon, displayed when the
|
* defining the widget annotation's alternate (down) icon, displayed when the
|
||||||
* mouse button is pressed within its active area.
|
* mouse button is pressed within its active area.
|
||||||
@ -659,13 +611,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IX", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* IX() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only) An icon fit dictionary (see Table 8.73 on page
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* IF() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pushbutton fields only) A code indicating where to position the text of
|
/** (Optional; pushbutton fields only) A code indicating where to position the text of
|
||||||
* the widget annotation's caption relative to its icon:
|
* the widget annotation's caption relative to its icon:
|
||||||
* 0 No icon; caption only
|
* 0 No icon; caption only
|
||||||
@ -697,13 +637,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TP", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long TP() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAppearanceCharacteristicsDictionary
|
#endif // __DEFINED__SkPdfAppearanceCharacteristicsDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -537,26 +537,14 @@ public:
|
|||||||
return ret->podofo()->HasStream();
|
return ret->podofo()->HasStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* getNAsStream() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isNADictionary() const {
|
bool isNADictionary() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getNAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The annotation's rollover appearance. Default value: the value of
|
/** (Optional) The annotation's rollover appearance. Default value: the value of
|
||||||
* the N entry.
|
* the N entry.
|
||||||
**/
|
**/
|
||||||
@ -570,26 +558,14 @@ public:
|
|||||||
return ret->podofo()->HasStream();
|
return ret->podofo()->HasStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* getRAsStream() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isRADictionary() const {
|
bool isRADictionary() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getRAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The annotation's down appearance. Default value: the value of the
|
/** (Optional) The annotation's down appearance. Default value: the value of the
|
||||||
* N entry.
|
* N entry.
|
||||||
**/
|
**/
|
||||||
@ -603,26 +579,14 @@ public:
|
|||||||
return ret->podofo()->HasStream();
|
return ret->podofo()->HasStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* getDAsStream() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isDADictionary() const {
|
bool isDADictionary() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getDAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAppearanceDictionary
|
#endif // __DEFINED__SkPdfAppearanceDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LastModified", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate LastModified() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) Any private data appropriate to the application, typically
|
/** (Optional) Any private data appropriate to the application, typically
|
||||||
* in the form of a dictionary.
|
* in the form of a dictionary.
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Private", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfObject* Private() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfApplicationDataDictionary
|
#endif // __DEFINED__SkPdfApplicationDataDictionary
|
||||||
|
2
experimental/PdfViewer/autogen/SkPdfArray_autogen.cpp
Normal file
2
experimental/PdfViewer/autogen/SkPdfArray_autogen.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#include "SkPdfArray_autogen.h"
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of four numbers in default user space units giving the coor-
|
/** (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
|
* dinates of the left, bottom, right, and top edges, respectively, of the artifact's
|
||||||
* bounding box (the rectangle that completely encloses its visible extent).
|
* bounding box (the rectangle that completely encloses its visible extent).
|
||||||
@ -547,13 +541,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkRect* BBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; pagination artifacts only) An array of name objects containing one to
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Attached() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfArtifactsDictionary
|
#endif // __DEFINED__SkPdfArtifactsDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string O() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfAttributeObjectDictionary
|
#endif // __DEFINED__SkPdfAttributeObjectDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required for the first bead of a thread; optional for all others; must be an indirect refer-
|
/** (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.
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* T() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; must be an indirect reference) The next bead in the thread. In the last bead,
|
/** (Required; must be an indirect reference) The next bead in the thread. In the last bead,
|
||||||
* this entry points to the first.
|
* this entry points to the first.
|
||||||
**/
|
**/
|
||||||
@ -562,13 +550,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* N() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; must be an indirect reference) The previous bead in the thread. In the first
|
/** (Required; must be an indirect reference) The previous bead in the thread. In the first
|
||||||
* bead, this entry points to the last.
|
* bead, this entry points to the last.
|
||||||
**/
|
**/
|
||||||
@ -576,13 +558,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* V() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; must be an indirect reference) The page object representing the page on
|
/** (Required; must be an indirect reference) The page object representing the page on
|
||||||
* which this bead appears.
|
* which this bead appears.
|
||||||
**/
|
**/
|
||||||
@ -590,26 +566,14 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* P() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) A rectangle specifying the location of this bead on the page.
|
/** (Required) A rectangle specifying the location of this bead on the page.
|
||||||
**/
|
**/
|
||||||
bool has_R() const {
|
bool has_R() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkRect* R() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfBeadDictionary
|
#endif // __DEFINED__SkPdfBeadDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -538,13 +538,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceBefore", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double SpaceBefore() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The amount of extra space following the after edge of the BLSE,
|
/** (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
|
* measured in default user space units in the block-progression direction. This
|
||||||
* value is added to any adjustments induced by the LineHeight attributes of
|
* value is added to any adjustments induced by the LineHeight attributes of
|
||||||
@ -558,13 +552,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpaceAfter", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double SpaceAfter() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The distance from the start edge of the reference area to that of the
|
/** (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-
|
* BLSE, measured in default user space units in the inline-progression direc-
|
||||||
* tion. This attribute applies only to structure elements with a Placement
|
* tion. This attribute applies only to structure elements with a Placement
|
||||||
@ -584,13 +572,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StartIndent", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double StartIndent() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The distance from the end edge of the BLSE to that of the ref-
|
/** (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
|
* erence area, measured in default user space units in the inline-progression
|
||||||
* direction. This attribute applies only to structure elements with a Placement
|
* direction. This attribute applies only to structure elements with a Placement
|
||||||
@ -608,13 +590,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndIndent", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double EndIndent() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; applies only to some BLSEs, as described below) The additional
|
/** (Optional; applies only to some BLSEs, as described below) The additional
|
||||||
* distance, measured in default user space units in the inline-progression
|
* distance, measured in default user space units in the inline-progression
|
||||||
* direction, from the start edge of the BLSE, as specified by StartIndent
|
* direction, from the start edge of the BLSE, as specified by StartIndent
|
||||||
@ -628,13 +604,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextIndent", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double TextIndent() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; applies only to BLSEs containing text) The alignment, in the inline-
|
/** (Optional; applies only to BLSEs containing text) The alignment, in the inline-
|
||||||
* progression direction, of text and other content within lines of the BLSE:
|
* progression direction, of text and other content within lines of the BLSE:
|
||||||
* Start Aligned with the start edge.
|
* Start Aligned with the start edge.
|
||||||
@ -650,13 +620,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TextAlign", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TextAlign() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Illustrations and tables only; required if the element appears in its entirety on a
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkRect* BBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; illustrations, tables, table headers, and table cells only; strongly
|
/** (Optional; illustrations, tables, table headers, and table cells only; strongly
|
||||||
* recommended for table cells) The desired width of the element's content
|
* recommended for table cells) The desired width of the element's content
|
||||||
* rectangle (see "Content and Allocation Rectangles" on page 648), measured
|
* 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;
|
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getWidthAsNumber() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isWidthAName() const {
|
bool isWidthAName() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Width", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getWidthAsName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; illustrations, tables, table headers, and table cells only) The desired
|
/** (Optional; illustrations, tables, table headers, and table cells only) The desired
|
||||||
* height of the element's content rectangle (see "Content and Allocation
|
* height of the element's content rectangle (see "Content and Allocation
|
||||||
* Rectangles" on page 648), measured in default user space units in the block-
|
* 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;
|
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getHeightAsNumber() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isHeightAName() const {
|
bool isHeightAName() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Height", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getHeightAsName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; table cells only) The alignment, in the block-progression direction,
|
/** (Optional; table cells only) The alignment, in the block-progression direction,
|
||||||
* of content within the table cell:
|
* of content within the table cell:
|
||||||
* Before Before edge of the first child's allocation rectangle aligned
|
* Before Before edge of the first child's allocation rectangle aligned
|
||||||
@ -780,13 +714,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlockAlign", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BlockAlign() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; table cells only) The alignment, in the inline-progression direction,
|
/** (Optional; table cells only) The alignment, in the inline-progression direction,
|
||||||
* of content within the table cell:
|
* of content within the table cell:
|
||||||
* Start Start edge of each child's allocation rectangle aligned with
|
* Start Start edge of each child's allocation rectangle aligned with
|
||||||
@ -807,13 +735,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "InlineAlign", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string InlineAlign() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary
|
#endif // __DEFINED__SkPdfBlockLevelStructureElementsDictionary
|
||||||
|
2
experimental/PdfViewer/autogen/SkPdfBoolean_autogen.cpp
Normal file
2
experimental/PdfViewer/autogen/SkPdfBoolean_autogen.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#include "SkPdfBoolean_autogen.h"
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The border width in points. If this value is 0, no border is drawn. Default
|
/** (Optional) The border width in points. If this value is 0, no border is drawn. Default
|
||||||
* value: 1.
|
* value: 1.
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double W() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The border style:
|
/** (Optional) The border style:
|
||||||
* S (Solid) A solid rectangle surrounding the annotation.
|
* S (Solid) A solid rectangle surrounding the annotation.
|
||||||
* D (Dashed) A dashed rectangle surrounding the annotation. The dash pattern
|
* D (Dashed) A dashed rectangle surrounding the annotation. The dash pattern
|
||||||
@ -569,13 +557,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string S() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A dash array defining a pattern of dashes and gaps to be used in drawing a
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* D() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfBorderStyleDictionary
|
#endif // __DEFINED__SkPdfBorderStyleDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CropBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* CropBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
|
/** (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
|
* tics for displaying guidelines for the page's bleed box. This entry is ignored if no
|
||||||
* bleed box is defined in the page object.
|
* bleed box is defined in the page object.
|
||||||
@ -548,13 +542,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BleedBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* BleedBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
|
/** (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
|
* tics for displaying guidelines for the page's trim box. This entry is ignored if no trim
|
||||||
* box is defined in the page object.
|
* box is defined in the page object.
|
||||||
@ -563,13 +551,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TrimBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* TrimBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A box style dictionary (see Table 9.42) specifying the visual characteris-
|
/** (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
|
* tics for displaying guidelines for the page's art box. This entry is ignored if no art
|
||||||
* box is defined in the page object.
|
* box is defined in the page object.
|
||||||
@ -578,13 +560,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ArtBox", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* ArtBox() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfBoxColorInformationDictionary
|
#endif // __DEFINED__SkPdfBoxColorInformationDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,26 +533,14 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* C() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The guideline width in default user space units. Default value: 1.
|
/** (Optional) The guideline width in default user space units. Default value: 1.
|
||||||
**/
|
**/
|
||||||
bool has_W() const {
|
bool has_W() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double W() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The guideline style:
|
/** (Optional) The guideline style:
|
||||||
* S (Solid) A solid rectangle.
|
* S (Solid) A solid rectangle.
|
||||||
* D (Dashed) A dashed rectangle. The dash pattern is specified by the D entry
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string S() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A dash array defining a pattern of dashes and gaps to be used in drawing
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* D() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfBoxStyleDictionary
|
#endif // __DEFINED__SkPdfBoxStyleDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Style", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Style() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A name specifying the language of the font, used for encodings where
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Lang() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A dictionary whose keys identify a class of characters in a CIDFont.
|
/** (Optional) A dictionary whose keys identify a class of characters in a CIDFont.
|
||||||
* Each value is a dictionary containing entries that override the corresponding
|
* 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,"
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FD", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* FD() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A stream identifying which CIDs are present in the CIDFont file. If this
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSet", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* CIDSet() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCIDFontDescriptorDictionary
|
#endif // __DEFINED__SkPdfCIDFontDescriptorDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -49,26 +49,14 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The type of CIDFont; CIDFontType0 or CIDFontType2.
|
/** (Required) The type of CIDFont; CIDFontType0 or CIDFontType2.
|
||||||
**/
|
**/
|
||||||
bool has_Subtype() const {
|
bool has_Subtype() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subtype() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The PostScript name of the CIDFont. For Type 0 CIDFonts, this
|
/** (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
|
* 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;
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseFont", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseFont() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) A dictionary containing entries that define the character collec-
|
/** (Required) A dictionary containing entries that define the character collec-
|
||||||
* tion of the CIDFont. See Table 5.12 on page 337.
|
* tion of the CIDFont. See Table 5.12 on page 337.
|
||||||
**/
|
**/
|
||||||
@ -93,13 +75,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* CIDSystemInfo() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; must be an indirect reference) A font descriptor describing the
|
/** (Required; must be an indirect reference) A font descriptor describing the
|
||||||
* CIDFont's default metrics other than its glyph widths (see Section 5.7,
|
* CIDFont's default metrics other than its glyph widths (see Section 5.7,
|
||||||
* "Font Descriptors").
|
* "Font Descriptors").
|
||||||
@ -108,13 +84,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FontDescriptor", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* FontDescriptor() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The default width for glyphs in the CIDFont (see "Glyph Met-
|
/** (Optional) The default width for glyphs in the CIDFont (see "Glyph Met-
|
||||||
* rics in CIDFonts" on page 340). Default value: 1000.
|
* rics in CIDFonts" on page 340). Default value: 1000.
|
||||||
**/
|
**/
|
||||||
@ -122,13 +92,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long DW() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A description of the widths for the glyphs in the CIDFont. The
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* W() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; applies only to CIDFonts used for vertical writing) An array of two
|
/** (Optional; applies only to CIDFonts used for vertical writing) An array of two
|
||||||
* numbers specifying the default metrics for vertical writing (see "Glyph
|
* numbers specifying the default metrics for vertical writing (see "Glyph
|
||||||
* Metrics in CIDFonts" on page 340). Default value: [880 -1000].
|
* Metrics in CIDFonts" on page 340). Default value: [880 -1000].
|
||||||
@ -154,13 +112,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DW2", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* DW2() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; applies only to CIDFonts used for vertical writing) A description of
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "W2", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* W2() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; Type 2 CIDFonts only) A specification of the mapping from CIDs
|
/** (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
|
* 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
|
* mapping from CIDs to glyph indices: the glyph index for a particular CID
|
||||||
@ -197,26 +143,14 @@ public:
|
|||||||
return ret->podofo()->HasStream();
|
return ret->podofo()->HasStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* getCIDToGIDMapAsStream() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isCIDToGIDMapAName() const {
|
bool isCIDToGIDMapAName() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDToGIDMap", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getCIDToGIDMapAsName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCIDFontDictionary
|
#endif // __DEFINED__SkPdfCIDFontDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -534,13 +534,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Registry", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Registry() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) A string that uniquely names the character collection within the speci-
|
/** (Required) A string that uniquely names the character collection within the speci-
|
||||||
* fied registry-for example, Japan1.
|
* fied registry-for example, Japan1.
|
||||||
**/
|
**/
|
||||||
@ -548,13 +542,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ordering", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Ordering() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The supplement number of the character collection. An original charac-
|
/** (Required) The supplement number of the character collection. An original charac-
|
||||||
* ter collection has a supplement number of 0. Whenever additional CIDs are
|
* ter collection has a supplement number of 0. Whenever additional CIDs are
|
||||||
* assigned in a character collection, the supplement number is increased. Supple-
|
* assigned in a character collection, the supplement number is increased. Supple-
|
||||||
@ -565,13 +553,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Supplement", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Supplement() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCIDSystemInfoDictionary
|
#endif // __DEFINED__SkPdfCIDSystemInfoDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The PostScript name of the CMap. This should be the same as the
|
/** (Required) The PostScript name of the CMap. This should be the same as the
|
||||||
* value of CMapName in the CMap file itself.
|
* value of CMapName in the CMap file itself.
|
||||||
**/
|
**/
|
||||||
@ -547,13 +541,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CMapName", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CMapName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) A dictionary or array containing entries that define the character
|
/** (Required) A dictionary or array containing entries that define the character
|
||||||
* collection for the CIDFont or CIDFonts associated with the CMap. If the
|
* collection for the CIDFont or CIDFonts associated with the CMap. If the
|
||||||
* CMap selects only font number 0 and specifies character selectors that are
|
* CMap selects only font number 0 and specifies character selectors that are
|
||||||
@ -580,26 +568,14 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getCIDSystemInfoAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isCIDSystemInfoAArray() const {
|
bool isCIDSystemInfoAArray() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CIDSystemInfo", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* getCIDSystemInfoAsArray() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A code that determines the writing mode for any CIDFont with
|
/** (Optional) A code that determines the writing mode for any CIDFont with
|
||||||
* which this CMap is combined:
|
* which this CMap is combined:
|
||||||
* 0 Horizontal
|
* 0 Horizontal
|
||||||
@ -612,13 +588,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WMode", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long WMode() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The name of a predefined CMap, or a stream containing a CMap,
|
/** (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-
|
* 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
|
* fined differentially, specifying only the character mappings that differ from
|
||||||
@ -634,26 +604,14 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
return ret->podofo()->GetDataType() == ePdfDataType_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getUseCMapAsName() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isUseCMapAStream() const {
|
bool isUseCMapAStream() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UseCMap", "", &ret)) return false;
|
||||||
return ret->podofo()->HasStream();
|
return ret->podofo()->HasStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* getUseCMapAsStream() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCMapDictionary
|
#endif // __DEFINED__SkPdfCMapDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -534,13 +534,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* WhitePoint() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus
|
/** (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
|
* 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
|
* Color Spaces," below, for further discussion. All three of these numbers must
|
||||||
@ -550,13 +544,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* BlackPoint() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A number G defining the gamma for the gray (A) component. G
|
/** (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
|
* must be positive and will generally be greater than or equal to 1. Default
|
||||||
* value: 1.
|
* value: 1.
|
||||||
@ -565,13 +553,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double Gamma() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary
|
#endif // __DEFINED__SkPdfCalgrayColorSpaceDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WhitePoint", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* WhitePoint() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of three numbers [ XB YB ZB ] specifying the tristimulus value, in
|
/** (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.
|
* 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].
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackPoint", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* BlackPoint() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of three numbers [ GR GG GB ] specifying the gamma for the red,
|
/** (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:
|
* green, and blue (A, B, and C) components of the color space. Default value:
|
||||||
* [1.0 1.0 1.0].
|
* [1.0 1.0 1.0].
|
||||||
@ -563,13 +551,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Gamma", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Gamma() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of nine numbers [ XA YA ZA XB YB ZB XC YC ZC ] specifying
|
/** (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
|
* 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
|
* with respect to the final XYZ representation. Default value: the identity matrix
|
||||||
@ -579,13 +561,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Matrix", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Matrix() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCalrgbColorSpaceDictionary
|
#endif // __DEFINED__SkPdfCalrgbColorSpaceDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) The version of the PDF specification to which the
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Version() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; must be an indirect reference) The page tree node that is the
|
/** (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").
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Pages() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) A number tree (see Section 3.8.5, "Number Trees")
|
/** (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
|
* defining the page labeling for the document. The keys in this tree are
|
||||||
* page indices; the corresponding values are page label dictionaries (see
|
* 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;
|
return ret->podofo()->GetDataType() == ePdfDataType_Real || ret->podofo()->GetDataType() == ePdfDataType_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getPageLabelsAsNumber() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isPageLabelsATree() const {
|
bool isPageLabelsATree() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLabels", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Reference;
|
return ret->podofo()->GetDataType() == ePdfDataType_Reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfTree* getPageLabelsAsTree() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) The document's name dictionary (see Section 3.6.3,
|
/** (Optional; PDF 1.2) The document's name dictionary (see Section 3.6.3,
|
||||||
* "Name Dictionary").
|
* "Name Dictionary").
|
||||||
**/
|
**/
|
||||||
@ -620,13 +590,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Names() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1; must be an indirect reference) A dictionary of names
|
/** (Optional; PDF 1.1; must be an indirect reference) A dictionary of names
|
||||||
* and corresponding destinations (see "Named Destinations" on page
|
* and corresponding destinations (see "Named Destinations" on page
|
||||||
* 476).
|
* 476).
|
||||||
@ -635,13 +599,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dests", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Dests() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) A viewer preferences dictionary (see Section 8.1,
|
/** (Optional; PDF 1.2) A viewer preferences dictionary (see Section 8.1,
|
||||||
* "Viewer Preferences") specifying the way the document is to be dis-
|
* "Viewer Preferences") specifying the way the document is to be dis-
|
||||||
* played on the screen. If this entry is absent, viewer applications should
|
* played on the screen. If this entry is absent, viewer applications should
|
||||||
@ -651,13 +609,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ViewerPreferences", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* ViewerPreferences() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A name object specifying the page layout to be used when the
|
/** (Optional) A name object specifying the page layout to be used when the
|
||||||
* document is opened:
|
* document is opened:
|
||||||
* SinglePage Display one page at a time.
|
* SinglePage Display one page at a time.
|
||||||
@ -672,13 +624,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageLayout", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string PageLayout() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A name object specifying how the document should be dis-
|
/** (Optional) A name object specifying how the document should be dis-
|
||||||
* played when opened:
|
* played when opened:
|
||||||
* UseNone Neither document outline nor thumbnail im-
|
* UseNone Neither document outline nor thumbnail im-
|
||||||
@ -693,13 +639,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "PageMode", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string PageMode() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; must be an indirect reference) The outline dictionary that is the
|
/** (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
|
* root of the document's outline hierarchy (see Section 8.2.2, "Document
|
||||||
* Outline").
|
* Outline").
|
||||||
@ -708,13 +648,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Outlines", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Outlines() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1; must be an indirect reference) An array of thread
|
/** (Optional; PDF 1.1; must be an indirect reference) An array of thread
|
||||||
* dictionaries representing the document's article threads (see Section
|
* dictionaries representing the document's article threads (see Section
|
||||||
* 8.3.2, "Articles").
|
* 8.3.2, "Articles").
|
||||||
@ -723,13 +657,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Threads", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Threads() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) A value specifying a destination to be displayed or
|
/** (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
|
* 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")
|
* either an array defining a destination (see Section 8.2.1, "Destinations")
|
||||||
@ -747,26 +675,14 @@ public:
|
|||||||
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
return ret->podofo()->GetDataType() == ePdfDataType_Array;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* getOpenActionAsArray() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isOpenActionADictionary() const {
|
bool isOpenActionADictionary() const {
|
||||||
SkPdfObject* ret = NULL;
|
SkPdfObject* ret = NULL;
|
||||||
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return false;
|
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OpenAction", "", &ret)) return false;
|
||||||
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* getOpenActionAsDictionary() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) An additional-actions dictionary defining the actions
|
/** (Optional; PDF 1.4) An additional-actions dictionary defining the actions
|
||||||
* to be taken in response to various trigger events affecting the document
|
* to be taken in response to various trigger events affecting the document
|
||||||
* as a whole (see "Trigger Events" on page 514). (See also implementation
|
* as a whole (see "Trigger Events" on page 514). (See also implementation
|
||||||
@ -776,13 +692,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A URI dictionary containing document-level information for
|
/** (Optional) A URI dictionary containing document-level information for
|
||||||
* URI (uniform resource identifier) actions (see "URI Actions" on page
|
* URI (uniform resource identifier) actions (see "URI Actions" on page
|
||||||
* 523).
|
* 523).
|
||||||
@ -791,13 +701,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URI", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* URI() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) The document's interactive form (AcroForm) dic-
|
/** (Optional; PDF 1.2) The document's interactive form (AcroForm) dic-
|
||||||
* tionary (see Section 8.6.1, "Interactive Form Dictionary").
|
* tionary (see Section 8.6.1, "Interactive Form Dictionary").
|
||||||
**/
|
**/
|
||||||
@ -805,13 +709,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AcroForm", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AcroForm() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4; must be an indirect reference) A metadata stream
|
/** (Optional; PDF 1.4; must be an indirect reference) A metadata stream
|
||||||
* containing metadata for the document (see Section 9.2.2, "Metadata
|
* containing metadata for the document (see Section 9.2.2, "Metadata
|
||||||
* Streams").
|
* Streams").
|
||||||
@ -820,13 +718,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* Metadata() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) The document's structure tree root dictionary (see
|
/** (Optional; PDF 1.3) The document's structure tree root dictionary (see
|
||||||
* Section 9.6.1, "Structure Hierarchy").
|
* Section 9.6.1, "Structure Hierarchy").
|
||||||
**/
|
**/
|
||||||
@ -834,13 +726,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "StructTreeRoot", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* StructTreeRoot() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A mark information dictionary containing informa-
|
/** (Optional; PDF 1.4) A mark information dictionary containing informa-
|
||||||
* tion about the document's usage of Tagged PDF conventions (see Sec-
|
* tion about the document's usage of Tagged PDF conventions (see Sec-
|
||||||
* tion 9.7.1, "Mark Information Dictionary").
|
* tion 9.7.1, "Mark Information Dictionary").
|
||||||
@ -849,13 +735,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "MarkInfo", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* MarkInfo() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A language identifier specifying the natural language
|
/** (Optional; PDF 1.4) A language identifier specifying the natural language
|
||||||
* for all text in the document except where overridden by language speci-
|
* for all text in the document except where overridden by language speci-
|
||||||
* fications for structure elements or marked content (see Section 9.8.1,
|
* fications for structure elements or marked content (see Section 9.8.1,
|
||||||
@ -866,13 +746,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Lang", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Lang() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) A Web Capture information dictionary containing
|
/** (Optional; PDF 1.3) A Web Capture information dictionary containing
|
||||||
* state information used by the Acrobat Web Capture (AcroSpider) plug-
|
* state information used by the Acrobat Web Capture (AcroSpider) plug-
|
||||||
* in extension (see Section 9.9.1, "Web Capture Information Dictionary").
|
* in extension (see Section 9.9.1, "Web Capture Information Dictionary").
|
||||||
@ -881,13 +755,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpiderInfo", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* SpiderInfo() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) An array of output intent dictionaries describing the
|
/** (Optional; PDF 1.4) An array of output intent dictionaries describing the
|
||||||
* color characteristics of output devices on which the document might be
|
* color characteristics of output devices on which the document might be
|
||||||
* rendered (see "Output Intents" on page 684).
|
* rendered (see "Output Intents" on page 684).
|
||||||
@ -896,13 +764,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OutputIntents", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* OutputIntents() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCatalogDictionary
|
#endif // __DEFINED__SkPdfCatalogDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -539,13 +539,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "K", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long K() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()A flag indicating whether end-of-line bit patterns are required to be
|
/** ()A flag indicating whether end-of-line bit patterns are required to be
|
||||||
* present in the encoding. The CCITTFaxDecode filter always accepts
|
* present in the encoding. The CCITTFaxDecode filter always accepts
|
||||||
* end-of-line bit patterns, but requires them only if EndOfLine is true.
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfLine", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EndOfLine() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()A flag indicating whether the filter expects extra 0 bits before each
|
/** ()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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncodedByteAlign", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EncodedByteAlign() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()The width of the image in pixels. If the value is not a multiple of 8,
|
/** ()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-
|
* 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:
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Columns", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Columns() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()The height of the image in scan lines. If the value is 0 or absent, the
|
/** ()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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rows", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Rows() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()A flag indicating whether the filter expects the encoded data to be
|
/** ()A flag indicating whether the filter expects the encoded data to be
|
||||||
* terminated by an end-of-block pattern, overriding the Rows pa-
|
* terminated by an end-of-block pattern, overriding the Rows pa-
|
||||||
* rameter. If false, the filter stops when it has decoded the number of
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EndOfBlock", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EndOfBlock() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()A flag indicating whether 1 bits are to be interpreted as black pixels
|
/** ()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
|
* and 0 bits as white pixels, the reverse of the normal PDF convention
|
||||||
* for image data. Default value: false.
|
* for image data. Default value: false.
|
||||||
@ -638,13 +602,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BlackIs1", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BlackIs1() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ()The number of damaged rows of data to be tolerated before an
|
/** ()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
|
* error occurs. This entry applies only if EndOfLine is true and K is
|
||||||
* nonnegative. Tolerating a damaged row means locating its end in
|
* nonnegative. Tolerating a damaged row means locating its end in
|
||||||
@ -657,13 +615,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DamagedRowsBeforeError", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long DamagedRowsBeforeError() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCcittfaxdecodeFilterDictionary
|
#endif // __DEFINED__SkPdfCcittfaxdecodeFilterDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Opt() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfCheckboxFieldDictionary
|
#endif // __DEFINED__SkPdfCheckboxFieldDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -535,13 +535,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Opt() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
|
/** (Optional; inheritable) For scrollable list boxes, the top index (the index in the Opt array
|
||||||
* of the first option visible in the list).
|
* of the first option visible in the list).
|
||||||
**/
|
**/
|
||||||
@ -549,13 +543,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TI", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long TI() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Sometimes required, otherwise optional; inheritable; PDF 1.4) For choice fields that allow
|
/** (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,
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* I() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfChoiceFieldDictionary
|
#endif // __DEFINED__SkPdfChoiceFieldDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -531,13 +531,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* Metadata() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfComponentsWithMetadataDictionary
|
#endif // __DEFINED__SkPdfComponentsWithMetadataDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -548,13 +548,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransform", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long ColorTransform() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfDctdecodeFilterDictionary
|
#endif // __DEFINED__SkPdfDctdecodeFilterDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -542,13 +542,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Colorants", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Colorants() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfDeviceNColorSpaceDictionary
|
#endif // __DEFINED__SkPdfDeviceNColorSpaceDictionary
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
#include "SkPdfDictionary_autogen.h"
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DC", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* DC() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A JavaScript action to be performed before saving a document.
|
/** (Optional; PDF 1.4) A JavaScript action to be performed before saving a document.
|
||||||
* (The name WS stands for "will save.")
|
* (The name WS stands for "will save.")
|
||||||
**/
|
**/
|
||||||
@ -546,13 +540,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WS", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* WS() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A JavaScript action to be performed after saving a document. (The
|
/** (Optional; PDF 1.4) A JavaScript action to be performed after saving a document. (The
|
||||||
* name DS stands for "did save.")
|
* name DS stands for "did save.")
|
||||||
**/
|
**/
|
||||||
@ -560,13 +548,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DS", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* DS() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A JavaScript action to be performed before printing a document.
|
/** (Optional; PDF 1.4) A JavaScript action to be performed before printing a document.
|
||||||
* (The name WP stands for "will print.")
|
* (The name WP stands for "will print.")
|
||||||
**/
|
**/
|
||||||
@ -574,13 +556,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "WP", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* WP() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A JavaScript action to be performed after printing a document.
|
/** (Optional; PDF 1.4) A JavaScript action to be performed after printing a document.
|
||||||
* (The name DP stands for "did print.")
|
* (The name DP stands for "did print.")
|
||||||
**/
|
**/
|
||||||
@ -588,13 +564,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DP", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* DP() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfDocumentCatalogActionsDictionary
|
#endif // __DEFINED__SkPdfDocumentCatalogActionsDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -531,52 +531,28 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Title", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Title() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The name of the person who created the document.
|
/** (Optional) The name of the person who created the document.
|
||||||
**/
|
**/
|
||||||
bool has_Author() const {
|
bool has_Author() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Author", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Author() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) The subject of the document.
|
/** (Optional; PDF 1.1) The subject of the document.
|
||||||
**/
|
**/
|
||||||
bool has_Subject() const {
|
bool has_Subject() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subject", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subject() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) Keywords associated with the document.
|
/** (Optional; PDF 1.1) Keywords associated with the document.
|
||||||
**/
|
**/
|
||||||
bool has_Keywords() const {
|
bool has_Keywords() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Keywords", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Keywords() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) If the document was converted to PDF from another format, the
|
/** (Optional) If the document was converted to PDF from another format, the
|
||||||
* name of the application (for example, Adobe FrameMaker(R)) that created the
|
* name of the application (for example, Adobe FrameMaker(R)) that created the
|
||||||
* original document from which it was converted.
|
* original document from which it was converted.
|
||||||
@ -585,13 +561,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creator", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Creator() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) If the document was converted to PDF from another format, the
|
/** (Optional) If the document was converted to PDF from another format, the
|
||||||
* name of the application (for example, Acrobat Distiller) that converted it to
|
* name of the application (for example, Acrobat Distiller) that converted it to
|
||||||
* PDF.
|
* PDF.
|
||||||
@ -600,13 +570,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Producer", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Producer() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The date and time the document was created, in human-readable
|
/** (Optional) The date and time the document was created, in human-readable
|
||||||
* form (see Section 3.8.2, "Dates").
|
* form (see Section 3.8.2, "Dates").
|
||||||
**/
|
**/
|
||||||
@ -614,13 +578,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate CreationDate() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.1) The date and time the document was most recently
|
/** (Optional; PDF 1.1) The date and time the document was most recently
|
||||||
* modified, in human-readable form (see Section 3.8.2, "Dates").
|
* modified, in human-readable form (see Section 3.8.2, "Dates").
|
||||||
**/
|
**/
|
||||||
@ -628,13 +586,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate ModDate() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) A name object indicating whether the document has
|
/** (Optional; PDF 1.3) A name object indicating whether the document has
|
||||||
* been modified to include trapping information (see Section 9.10.5, "Trap-
|
* been modified to include trapping information (see Section 9.10.5, "Trap-
|
||||||
* ping Support"):
|
* ping Support"):
|
||||||
@ -656,13 +608,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Trapped", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Trapped() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfDocumentInformationDictionary
|
#endif // __DEFINED__SkPdfDocumentInformationDictionary
|
||||||
|
@ -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 "";
|
||||||
|
}
|
||||||
|
|
@ -531,39 +531,21 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Size() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The date and time when the embedded file was created.
|
/** (Optional) The date and time when the embedded file was created.
|
||||||
**/
|
**/
|
||||||
bool has_CreationDate() const {
|
bool has_CreationDate() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDate", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate CreationDate() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The date and time when the embedded file was last modified.
|
/** (Optional) The date and time when the embedded file was last modified.
|
||||||
**/
|
**/
|
||||||
bool has_ModDate() const {
|
bool has_ModDate() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDate ModDate() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A subdictionary containing additional information specific to
|
/** (Optional) A subdictionary containing additional information specific to
|
||||||
* Mac OS files (see Table 3.35).
|
* Mac OS files (see Table 3.35).
|
||||||
**/
|
**/
|
||||||
@ -571,13 +553,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Mac() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A 16-byte string that is the checksum of the bytes of the uncom-
|
/** (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
|
* pressed embedded file. The checksum is calculated by applying the standard
|
||||||
* MD5 message-digest algorithm (described in Internet RFC 1321, The MD5
|
* MD5 message-digest algorithm (described in Internet RFC 1321, The MD5
|
||||||
@ -588,13 +564,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CheckSum() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEmbeddedFileParameterDictionary
|
#endif // __DEFINED__SkPdfEmbeddedFileParameterDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The subtype of the embedded file. The value of this entry must be
|
/** (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-
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subtype() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An embedded file parameter dictionary containing additional, file-
|
/** (Optional) An embedded file parameter dictionary containing additional, file-
|
||||||
* specific information (see Table 3.34).
|
* specific information (see Table 3.34).
|
||||||
**/
|
**/
|
||||||
@ -565,13 +553,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Params", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Params() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEmbeddedFileStreamDictionary
|
#endif // __DEFINED__SkPdfEmbeddedFileStreamDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length1", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Length1() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required for Type 1 fonts) The length in bytes of the encrypted portion of the Type 1
|
/** (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
|
* font program (see below) after it has been decoded using the filters specified by the
|
||||||
* stream's Filter entry.
|
* stream's Filter entry.
|
||||||
@ -548,13 +542,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length2", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Length2() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required for Type 1 fonts) The length in bytes of the fixed-content portion of the
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length3", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Length3() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required if referenced from FontFile3; PDF 1.2) A name specifying the format of the
|
/** (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-
|
* 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
|
* FontType0C for Type 0 compact CIDFonts. When additional font formats are added
|
||||||
@ -580,13 +562,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Subtype() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A metadata stream containing metadata for the embedded font
|
/** (Optional; PDF 1.4) A metadata stream containing metadata for the embedded font
|
||||||
* program (see Section 9.2.2, "Metadata Streams").
|
* program (see Section 9.2.2, "Metadata Streams").
|
||||||
**/
|
**/
|
||||||
@ -594,13 +570,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Metadata", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* Metadata() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEmbeddedFontStreamDictionary
|
#endif // __DEFINED__SkPdfEmbeddedFontStreamDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Type() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The base encoding-that is, the encoding from which the Differences
|
/** (Optional) The base encoding-that is, the encoding from which the Differences
|
||||||
* entry (if present) describes differences-specified as the name of a predefined
|
* entry (if present) describes differences-specified as the name of a predefined
|
||||||
* encoding MacRomanEncoding, MacExpertEncoding, or WinAnsiEncoding (see
|
* encoding MacRomanEncoding, MacExpertEncoding, or WinAnsiEncoding (see
|
||||||
@ -554,13 +548,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BaseEncoding", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseEncoding() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; not recommended with TrueType fonts) An array describing the differ-
|
/** (Optional; not recommended with TrueType fonts) An array describing the differ-
|
||||||
* ences from the encoding specified by BaseEncoding or, if BaseEncoding is ab-
|
* ences from the encoding specified by BaseEncoding or, if BaseEncoding is ab-
|
||||||
* sent, from an implicit base encoding. The Differences array is described above.
|
* sent, from an implicit base encoding. The Differences array is described above.
|
||||||
@ -583,13 +571,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Differences() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEncodingDictionary
|
#endif // __DEFINED__SkPdfEncodingDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EncryptionRevision", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long EncryptionRevision() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEncryptedEmbeddedFileStreamDictionary
|
#endif // __DEFINED__SkPdfEncryptedEmbeddedFileStreamDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,13 +533,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Filter() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional but strongly recommended) A code specifying the algorithm to be used in en-
|
/** (Optional but strongly recommended) A code specifying the algorithm to be used in en-
|
||||||
* crypting and decrypting the document:
|
* crypting and decrypting the document:
|
||||||
* 0 An algorithm that is undocumented and no longer supported, and whose use is
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
double V() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4; only if V is 2 or 3) The length of the encryption key, in bits. The value
|
/** (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.
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Length", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Length() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfEncryptionCommonDictionary
|
#endif // __DEFINED__SkPdfEncryptionCommonDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -538,26 +538,14 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Version", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Version() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The FDF dictionary for this file (see Table 8.69).
|
/** (Required) The FDF dictionary for this file (see Table 8.69).
|
||||||
**/
|
**/
|
||||||
bool has_FDF() const {
|
bool has_FDF() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FDF", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* FDF() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFCatalogDictionary
|
#endif // __DEFINED__SkPdfFDFCatalogDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfFileSpec F() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of two strings constituting a file identifier (see
|
/** (Optional) An array of two strings constituting a file identifier (see
|
||||||
* Section 9.3, "File Identifiers") for the source or target file designated
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* ID() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of FDF field dictionaries (see "FDF Fields" on
|
/** (Optional) An array of FDF field dictionaries (see "FDF Fields" on
|
||||||
* page 564) describing the root fields (those with no ancestors in
|
* page 564) describing the root fields (those with no ancestors in
|
||||||
* the field hierarchy) to be exported or imported. This entry and
|
* the field hierarchy) to be exported or imported. This entry and
|
||||||
@ -564,13 +552,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Fields() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A status string to be displayed indicating the result of an
|
/** (Optional) A status string to be displayed indicating the result of an
|
||||||
* action, typically a submit-form action (see "Submit-Form Actions"
|
* action, typically a submit-form action (see "Submit-Form Actions"
|
||||||
* on page 550). The string is encoded with PDFDocEncoding. (See
|
* on page 550). The string is encoded with PDFDocEncoding. (See
|
||||||
@ -581,13 +563,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Status", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Status() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) An array of FDF page dictionaries (see "FDF
|
/** (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
|
* Pages" on page 566) describing new pages to be added to a PDF
|
||||||
* target document. The Fields and Status entries may not be present
|
* target document. The Fields and Status entries may not be present
|
||||||
@ -597,13 +573,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Pages", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Pages() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) The encoding to be used for any FDF field
|
/** (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
|
* 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-
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Encoding", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Encoding() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) An array of FDF annotation dictionaries (see
|
/** (Optional; PDF 1.3) An array of FDF annotation dictionaries (see
|
||||||
* "FDF Annotation Dictionaries" on page 568). The array can in-
|
* "FDF Annotation Dictionaries" on page 568). The array can in-
|
||||||
* clude annotations of any of the standard types listed in Table 8.14
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Annots", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Annots() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A stream containing all the bytes in all incre-
|
/** (Optional; PDF 1.4) A stream containing all the bytes in all incre-
|
||||||
* mental updates made to the underlying PDF document since it was
|
* mental updates made to the underlying PDF document since it was
|
||||||
* opened (see Section 3.4.5, "Incremental Updates"). If a submit-
|
* opened (see Section 3.4.5, "Incremental Updates"). If a submit-
|
||||||
@ -660,13 +618,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Differences", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfStream* Differences() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) The name of a browser frame in which the un-
|
/** (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
|
* derlying PDF document is to be opened. This mimics the behavior
|
||||||
* of the target attribute in HTML <href> tags.
|
* of the target attribute in HTML <href> tags.
|
||||||
@ -675,13 +627,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Target", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Target() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) An array of file specifications (see Section 3.10,
|
/** (Optional; PDF 1.4) An array of file specifications (see Section 3.10,
|
||||||
* "File Specifications") representing other FDF files embedded with-
|
* "File Specifications") representing other FDF files embedded with-
|
||||||
* in this one (Section 3.10.3, "Embedded File Streams").
|
* in this one (Section 3.10.3, "Embedded File Streams").
|
||||||
@ -690,13 +636,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EmbeddedFDFs", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* EmbeddedFDFs() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.4) A JavaScript dictionary (see Table 8.71) defin-
|
/** (Optional; PDF 1.4) A JavaScript dictionary (see Table 8.71) defin-
|
||||||
* ing document-level JavaScript scripts.
|
* ing document-level JavaScript scripts.
|
||||||
**/
|
**/
|
||||||
@ -704,13 +644,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "JavaScript", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* JavaScript() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFDictionary
|
#endif // __DEFINED__SkPdfFDFDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -533,26 +533,14 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Kids() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required) The partial field name (see "Field Names" on page 532).
|
/** (Required) The partial field name (see "Field Names" on page 532).
|
||||||
**/
|
**/
|
||||||
bool has_T() const {
|
bool has_T() const {
|
||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string T() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The field's value, whose format varies depending on the field type; see
|
/** (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.
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfObject* V() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags specifying various characteristics of the field (see Tables
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Ff() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags to be set (turned on) in the Ff entry of the form's cor-
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetFf", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long SetFf() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags to be cleared (turned off) in the Ff entry of the form's cor-
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrFf", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long ClrFf() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags specifying various characteristics of the field's widget anno-
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long F() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags to be set (turned on) in the F entry of the form's corre-
|
/** (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 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SetF", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long SetF() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A set of flags to be cleared (turned off) in the F entry of the form's corre-
|
/** (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 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ClrF", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long ClrF() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An appearance dictionary specifying the appearance of a pushbutton
|
/** (Optional) An appearance dictionary specifying the appearance of a pushbutton
|
||||||
* field (see "Pushbuttons" on page 539). The appearance dictionary's contents are as
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AP", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AP() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) A dictionary holding references to external PDF files contain-
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "APRef", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* APRef() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3; button fields only) An icon fit dictionary (see Table 8.73) speci-
|
/** (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-
|
* fying how to display a button field's icon within the annotation rectangle of its wid-
|
||||||
* get annotation.
|
* get annotation.
|
||||||
@ -708,13 +642,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "IF", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* IF() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required; choice fields only) An array of options to be presented to the user. Each
|
/** (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:
|
* element of the array can take either of two forms:
|
||||||
* * A text string representing one of the available options
|
* * A text string representing one of the available options
|
||||||
@ -726,13 +654,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Opt", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Opt() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An action to be performed when this field's widget annotation is activat-
|
/** (Optional) An action to be performed when this field's widget annotation is activat-
|
||||||
* ed (see Section 8.5, "Actions").
|
* ed (see Section 8.5, "Actions").
|
||||||
**/
|
**/
|
||||||
@ -740,13 +662,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* A() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An additional-actions dictionary defining the field's behavior in re-
|
/** (Optional) An additional-actions dictionary defining the field's behavior in re-
|
||||||
* sponse to various trigger events (see Section 8.5.2, "Trigger Events").
|
* sponse to various trigger events (see Section 8.5.2, "Trigger Events").
|
||||||
**/
|
**/
|
||||||
@ -754,13 +670,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFFieldDictionary
|
#endif // __DEFINED__SkPdfFDFFieldDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Page", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Page() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFFileAnnotationDictionary
|
#endif // __DEFINED__SkPdfFDFFileAnnotationDictionary
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
|
|
@ -531,13 +531,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Name() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The file containing the named page. If this key is absent, it is
|
/** (Optional) The file containing the named page. If this key is absent, it is
|
||||||
* assumed that the page resides in the associated PDF file.
|
* assumed that the page resides in the associated PDF file.
|
||||||
**/
|
**/
|
||||||
@ -545,13 +539,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfFileSpec F() const {
|
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFNamedPageReferenceDictionary
|
#endif // __DEFINED__SkPdfFDFNamedPageReferenceDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Templates", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Templates() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An FDF page information dictionary containing additional informa-
|
/** (Optional) An FDF page information dictionary containing additional informa-
|
||||||
* tion about the page. At the time of publication, no entries have been defined for
|
* tion about the page. At the time of publication, no entries have been defined for
|
||||||
* this dictionary.
|
* this dictionary.
|
||||||
@ -547,13 +541,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Info", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Info() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFPageDictionary
|
#endif // __DEFINED__SkPdfFDFPageDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TRef", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* TRef() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of references to FDF field dictionaries (see Table 8.72 on
|
/** (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
|
* page 564) describing the root fields to be imported (those with no ancestors in
|
||||||
* the field hierarchy).
|
* the field hierarchy).
|
||||||
@ -547,13 +541,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Fields() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) A flag specifying whether fields imported from the template may be
|
/** (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
|
* renamed in the event of name conflicts with existing fields; see below for further
|
||||||
* discussion. Default value: true.
|
* discussion. Default value: true.
|
||||||
@ -562,13 +550,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rename", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Rename() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFTemplateDictionary
|
#endif // __DEFINED__SkPdfFDFTemplateDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -532,13 +532,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Root", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Root() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFDFTrailerDictionary
|
#endif // __DEFINED__SkPdfFDFTrailerDictionary
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -541,13 +541,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FT", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string FT() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Required if this field is the child of another in the field hierarchy; absent other-
|
/** (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,
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Parent", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* Parent() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) An array of indirect references to the immediate children of this
|
/** (Optional) An array of indirect references to the immediate children of this
|
||||||
* field.
|
* field.
|
||||||
**/
|
**/
|
||||||
@ -571,13 +559,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfArray* Kids() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional) The partial field name (see "Field Names," below; see also imple-
|
/** (Optional) The partial field name (see "Field Names," below; see also imple-
|
||||||
* mentation notes 82 and 83 in Appendix H).
|
* mentation notes 82 and 83 in Appendix H).
|
||||||
**/
|
**/
|
||||||
@ -585,13 +567,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "T", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string T() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) An alternate field name, to be used in place of the actual
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TU", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TU() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.3) The mapping name to be used when exporting inter-
|
/** (Optional; PDF 1.3) The mapping name to be used when exporting inter-
|
||||||
* active form field data from the document.
|
* active form field data from the document.
|
||||||
**/
|
**/
|
||||||
@ -617,13 +587,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TM", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TM() const {
|
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 "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; inheritable) A set of flags specifying various characteristics of the
|
/** (Optional; inheritable) A set of flags specifying various characteristics of the
|
||||||
* field (see Table 8.50). Default value: 0.
|
* field (see Table 8.50). Default value: 0.
|
||||||
**/
|
**/
|
||||||
@ -631,13 +595,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Ff", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
long Ff() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; inheritable) The field's value, whose format varies depending on
|
/** (Optional; inheritable) The field's value, whose format varies depending on
|
||||||
* the field type; see the descriptions of individual field types for further infor-
|
* the field type; see the descriptions of individual field types for further infor-
|
||||||
* mation.
|
* mation.
|
||||||
@ -646,13 +604,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfObject* V() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; inheritable) The default value to which the field reverts when a
|
/** (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
|
* reset-form action is executed (see "Reset-Form Actions" on page 554). The
|
||||||
* format of this value is the same as that of V.
|
* format of this value is the same as that of V.
|
||||||
@ -661,13 +613,7 @@ public:
|
|||||||
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", NULL));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DV", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfObject* DV() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** (Optional; PDF 1.2) An additional-actions dictionary defining the field's
|
/** (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
|
* 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
|
* 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));
|
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AA", "", NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkPdfDictionary* AA() const {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __DEFINED__SkPdfFieldDictionary
|
#endif // __DEFINED__SkPdfFieldDictionary
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user