PDFDoc Class Reference

#include <PDFDoc.h>


Public Member Functions

 PDFDoc (GString *fileNameA, GString *ownerPassword=NULL, GString *userPassword=NULL)
 PDFDoc (BaseStream *strA, GString *ownerPassword=NULL, GString *userPassword=NULL)
 ~PDFDoc ()
GBool isOk ()
int getErrorCode ()
GStringgetFileName ()
XRefgetXRef ()
CataloggetCatalog ()
BaseStreamgetBaseStream ()
double getPageWidth (int page)
double getPageHeight (int page)
int getPageRotate (int page)
int getNumPages ()
GStringreadMetadata ()
ObjectgetStructTreeRoot ()
void displayPage (OutputDev *out, int page, double hDPI, double vDPI, int rotate, GBool crop, GBool doLinks, GBool(*abortCheckCbk)(void *data)=NULL, void *abortCheckCbkData=NULL)
void displayPages (OutputDev *out, int firstPage, int lastPage, double hDPI, double vDPI, int rotate, GBool crop, GBool doLinks, GBool(*abortCheckCbk)(void *data)=NULL, void *abortCheckCbkData=NULL)
void displayPageSlice (OutputDev *out, int page, double hDPI, double vDPI, int rotate, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, GBool(*abortCheckCbk)(void *data)=NULL, void *abortCheckCbkData=NULL)
int findPage (int num, int gen)
LinkActionfindLink (double x, double y)
GBool onLink (double x, double y)
LinkDestfindDest (GString *name)
Outline * getOutline ()
GBool isEncrypted ()
GBool okToPrint (GBool ignoreOwnerPW=gFalse)
GBool okToChange (GBool ignoreOwnerPW=gFalse)
GBool okToCopy (GBool ignoreOwnerPW=gFalse)
GBool okToAddNotes (GBool ignoreOwnerPW=gFalse)
GBool isLinearized ()
ObjectgetDocInfo (Object *obj)
ObjectgetDocInfoNF (Object *obj)
double getPDFVersion ()
GBool saveAs (GString *name)

Private Member Functions

GBool setup (GString *ownerPassword, GString *userPassword)
void checkHeader ()
void getLinks (Page *page)

Private Attributes

GStringfileName
FILE * file
BaseStreamstr
double pdfVersion
XRefxref
Catalogcatalog
Linkslinks
Outline * outline
GBool ok
int errCode


Detailed Description

Definition at line 36 of file PDFDoc.h.


Constructor & Destructor Documentation

PDFDoc::PDFDoc ( GString fileNameA,
GString ownerPassword = NULL,
GString userPassword = NULL 
)

PDFDoc::PDFDoc ( BaseStream strA,
GString ownerPassword = NULL,
GString userPassword = NULL 
)

PDFDoc::~PDFDoc (  ) 


Member Function Documentation

GBool PDFDoc::isOk (  )  [inline]

Definition at line 46 of file PDFDoc.h.

References NULL, ok, and xref.

00046 { return (xref != NULL) && ok; }

int PDFDoc::getErrorCode (  )  [inline]

Definition at line 49 of file PDFDoc.h.

References errCode.

00049 { return errCode; }

GString* PDFDoc::getFileName (  )  [inline]

Definition at line 52 of file PDFDoc.h.

References fileName.

00052 { return fileName; }

XRef* PDFDoc::getXRef (  )  [inline]

Definition at line 55 of file PDFDoc.h.

References xref.

00055 { return xref; }

Catalog* PDFDoc::getCatalog (  )  [inline]

Definition at line 58 of file PDFDoc.h.

References catalog.

00058 { return catalog; }

BaseStream* PDFDoc::getBaseStream (  )  [inline]

Definition at line 61 of file PDFDoc.h.

References str.

00061 { return str; }

double PDFDoc::getPageWidth ( int  page  )  [inline]

Definition at line 64 of file PDFDoc.h.

References catalog, Catalog::getPage(), and Page::getWidth().

00065     { return catalog->getPage(page)->getWidth(); }

double PDFDoc::getPageHeight ( int  page  )  [inline]

Definition at line 66 of file PDFDoc.h.

References catalog, Page::getHeight(), and Catalog::getPage().

00067     { return catalog->getPage(page)->getHeight(); }

int PDFDoc::getPageRotate ( int  page  )  [inline]

Definition at line 68 of file PDFDoc.h.

References catalog, Catalog::getPage(), and Page::getRotate().

00069     { return catalog->getPage(page)->getRotate(); }

int PDFDoc::getNumPages (  )  [inline]

Definition at line 72 of file PDFDoc.h.

References catalog, and Catalog::getNumPages().

00072 { return catalog->getNumPages(); }

GString* PDFDoc::readMetadata (  )  [inline]

Definition at line 76 of file PDFDoc.h.

References catalog, and Catalog::readMetadata().

00076 { return catalog->readMetadata(); }

Object* PDFDoc::getStructTreeRoot (  )  [inline]

Definition at line 79 of file PDFDoc.h.

References catalog, and Catalog::getStructTreeRoot().

00079 { return catalog->getStructTreeRoot(); }

void PDFDoc::displayPage ( OutputDev *  out,
int  page,
double  hDPI,
double  vDPI,
int  rotate,
GBool  crop,
GBool  doLinks,
GBool(*)(void *data)  abortCheckCbk = NULL,
void *  abortCheckCbkData = NULL 
)

void PDFDoc::displayPages ( OutputDev *  out,
int  firstPage,
int  lastPage,
double  hDPI,
double  vDPI,
int  rotate,
GBool  crop,
GBool  doLinks,
GBool(*)(void *data)  abortCheckCbk = NULL,
void *  abortCheckCbkData = NULL 
)

void PDFDoc::displayPageSlice ( OutputDev *  out,
int  page,
double  hDPI,
double  vDPI,
int  rotate,
GBool  crop,
int  sliceX,
int  sliceY,
int  sliceW,
int  sliceH,
GBool(*)(void *data)  abortCheckCbk = NULL,
void *  abortCheckCbkData = NULL 
)

int PDFDoc::findPage ( int  num,
int  gen 
) [inline]

Definition at line 104 of file PDFDoc.h.

References catalog, and Catalog::findPage().

00104 { return catalog->findPage(num, gen); }

LinkAction* PDFDoc::findLink ( double  x,
double  y 
) [inline]

Definition at line 108 of file PDFDoc.h.

References Links::find(), links, and NULL.

00109     { return links ? links->find(x, y) : (LinkAction *)NULL; }

GBool PDFDoc::onLink ( double  x,
double  y 
) [inline]

Definition at line 112 of file PDFDoc.h.

References links, and Links::onLink().

00112 { return links->onLink(x, y); }

LinkDest* PDFDoc::findDest ( GString name  )  [inline]

Definition at line 116 of file PDFDoc.h.

References catalog, Catalog::findDest(), and name.

00117     { return catalog->findDest(name); }

Outline* PDFDoc::getOutline (  )  [inline]

Definition at line 121 of file PDFDoc.h.

References outline.

00121 { return outline; }

GBool PDFDoc::isEncrypted (  )  [inline]

Definition at line 125 of file PDFDoc.h.

References XRef::isEncrypted(), and xref.

00125 { return xref->isEncrypted(); }

GBool PDFDoc::okToPrint ( GBool  ignoreOwnerPW = gFalse  )  [inline]

Definition at line 128 of file PDFDoc.h.

References XRef::okToPrint(), and xref.

00129     { return xref->okToPrint(ignoreOwnerPW); }

GBool PDFDoc::okToChange ( GBool  ignoreOwnerPW = gFalse  )  [inline]

Definition at line 130 of file PDFDoc.h.

References XRef::okToChange(), and xref.

00131     { return xref->okToChange(ignoreOwnerPW); }

GBool PDFDoc::okToCopy ( GBool  ignoreOwnerPW = gFalse  )  [inline]

Definition at line 132 of file PDFDoc.h.

References XRef::okToCopy(), and xref.

00133     { return xref->okToCopy(ignoreOwnerPW); }

GBool PDFDoc::okToAddNotes ( GBool  ignoreOwnerPW = gFalse  )  [inline]

Definition at line 134 of file PDFDoc.h.

References XRef::okToAddNotes(), and xref.

00135     { return xref->okToAddNotes(ignoreOwnerPW); }

GBool PDFDoc::isLinearized (  ) 

Object* PDFDoc::getDocInfo ( Object obj  )  [inline]

Definition at line 141 of file PDFDoc.h.

References XRef::getDocInfo(), NULL, and xref.

00141 { return xref != NULL ? xref->getDocInfo(obj) : NULL; }

Object* PDFDoc::getDocInfoNF ( Object obj  )  [inline]

Definition at line 142 of file PDFDoc.h.

References XRef::getDocInfoNF(), NULL, and xref.

00142 { return xref != NULL ? xref->getDocInfoNF(obj) : NULL; }

double PDFDoc::getPDFVersion (  )  [inline]

Definition at line 145 of file PDFDoc.h.

References pdfVersion.

00145 { return pdfVersion; }

GBool PDFDoc::saveAs ( GString name  ) 

GBool PDFDoc::setup ( GString ownerPassword,
GString userPassword 
) [private]

void PDFDoc::checkHeader (  )  [private]

void PDFDoc::getLinks ( Page page  )  [private]


Field Documentation

GString* PDFDoc::fileName [private]

Definition at line 157 of file PDFDoc.h.

Referenced by getFileName().

FILE* PDFDoc::file [private]

Definition at line 158 of file PDFDoc.h.

BaseStream* PDFDoc::str [private]

Definition at line 159 of file PDFDoc.h.

Referenced by getBaseStream().

double PDFDoc::pdfVersion [private]

Definition at line 160 of file PDFDoc.h.

Referenced by getPDFVersion().

XRef* PDFDoc::xref [private]

Definition at line 161 of file PDFDoc.h.

Referenced by getDocInfo(), getDocInfoNF(), getXRef(), isEncrypted(), isOk(), okToAddNotes(), okToChange(), okToCopy(), and okToPrint().

Catalog* PDFDoc::catalog [private]

Definition at line 162 of file PDFDoc.h.

Referenced by findDest(), findPage(), getCatalog(), getNumPages(), getPageHeight(), getPageRotate(), getPageWidth(), getStructTreeRoot(), and readMetadata().

Links* PDFDoc::links [private]

Definition at line 163 of file PDFDoc.h.

Referenced by findLink(), and onLink().

Outline* PDFDoc::outline [private]

Definition at line 165 of file PDFDoc.h.

Referenced by getOutline().

GBool PDFDoc::ok [private]

Definition at line 169 of file PDFDoc.h.

Referenced by isOk().

int PDFDoc::errCode [private]

Definition at line 170 of file PDFDoc.h.

Referenced by getErrorCode().


The documentation for this class was generated from the following file:
Generated on Fri Jan 9 14:45:38 2009 for libextractor by  doxygen 1.5.1