Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PDFDoc Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/qpdf/xpdf/PDFDoc.h>

Collaboration diagram for PDFDoc:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PDFDoc (GString *fileNameA, GString *ownerPassword=NULL, GString *userPassword=NULL, GBool printCommandsA=gFalse)
 PDFDoc (BaseStream *strA, GString *ownerPassword=NULL, GString *userPassword=NULL, GBool printCommandsA=gFalse)
 ~PDFDoc ()
GBool isOk ()
int getErrorCode ()
GStringgetFileName ()
XRefgetXRef ()
CataloggetCatalog ()
BaseStreamgetBaseStream ()
fouble getPageWidth (int page)
fouble getPageHeight (int page)
int getPageRotate (int page)
int getNumPages ()
GStringreadMetadata ()
ObjectgetStructTreeRoot ()
void displayPage (OutputDev *out, int page, fouble zoom, int rotate, GBool doLinks)
void displayPages (OutputDev *out, int firstPage, int lastPage, int zoom, int rotate, GBool doLinks)
int findPage (int num, int gen)
LinkActionfindLink (fouble x, fouble y)
GBool onLink (fouble x, fouble y)
LinkDestfindDest (GString *name)
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)
fouble 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
fouble pdfVersion
XRefxref
Catalogcatalog
Linkslinks
GBool printCommands
GBool ok
int errCode

Constructor & Destructor Documentation

PDFDoc::PDFDoc GString fileNameA,
GString ownerPassword = NULL,
GString userPassword = NULL,
GBool  printCommandsA = gFalse
 

Definition at line 41 of file PDFDoc.cc.

References catalog, GString::copy(), errCode, errNone, errOpenFile, error(), fileName, GString::getCString(), gFalse, Object::initNull(), links, GString::lowerCase(), NULL, ok, printCommands, setup(), str, GString::upperCase(), and xref.

PDFDoc::PDFDoc BaseStream strA,
GString ownerPassword = NULL,
GString userPassword = NULL,
GBool  printCommandsA = gFalse
 

Definition at line 89 of file PDFDoc.cc.

References catalog, errCode, errNone, fileName, gFalse, links, NULL, ok, printCommands, setup(), str, and xref.

PDFDoc::~PDFDoc  ) 
 

Definition at line 127 of file PDFDoc.cc.

References catalog, fileName, links, str, and xref.


Member Function Documentation

void PDFDoc::checkHeader  )  [private]
 

Definition at line 150 of file PDFDoc.cc.

References error(), Stream::getChar(), headerSearchSize, i, BaseStream::moveStart(), p, pdfVersion, str, supportedPDFVersionNum, and supportedPDFVersionStr.

Referenced by setup().

void PDFDoc::displayPage OutputDev out,
int  page,
fouble  zoom,
int  rotate,
GBool  doLinks
 

Definition at line 179 of file PDFDoc.cc.

References catalog, Page::display(), getLinks(), Catalog::getPage(), links, NULL, p, printCommands, and printf.

Referenced by displayPages().

void PDFDoc::displayPages OutputDev out,
int  firstPage,
int  lastPage,
int  zoom,
int  rotate,
GBool  doLinks
 

Definition at line 198 of file PDFDoc.cc.

References displayPage().

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

Definition at line 99 of file PDFDoc.h.

References catalog, and Catalog::findDest().

LinkAction* PDFDoc::findLink fouble  x,
fouble  y
[inline]
 

Definition at line 92 of file PDFDoc.h.

References Links::find(), and links.

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

Definition at line 88 of file PDFDoc.h.

References catalog, and Catalog::findPage().

BaseStream* PDFDoc::getBaseStream  )  [inline]
 

Definition at line 58 of file PDFDoc.h.

References str.

Catalog* PDFDoc::getCatalog  )  [inline]
 

Definition at line 55 of file PDFDoc.h.

References catalog.

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

Definition at line 119 of file PDFDoc.h.

References XRef::getDocInfo(), and xref.

int PDFDoc::getErrorCode  )  [inline]
 

Definition at line 46 of file PDFDoc.h.

References errCode.

GString* PDFDoc::getFileName  )  [inline]
 

Definition at line 49 of file PDFDoc.h.

References fileName.

void PDFDoc::getLinks Page page  )  [private]
 

Definition at line 254 of file PDFDoc.cc.

References catalog, Object::free(), Page::getAnnots(), Catalog::getBaseURI(), and links.

Referenced by displayPage().

int PDFDoc::getNumPages  )  [inline]
 

Definition at line 69 of file PDFDoc.h.

References catalog, and Catalog::getNumPages().

fouble PDFDoc::getPageHeight int  page  )  [inline]
 

Definition at line 63 of file PDFDoc.h.

References catalog, and Catalog::getPage().

int PDFDoc::getPageRotate int  page  )  [inline]
 

Definition at line 65 of file PDFDoc.h.

References catalog, and Catalog::getPage().

fouble PDFDoc::getPageWidth int  page  )  [inline]
 

Definition at line 61 of file PDFDoc.h.

References catalog, and Catalog::getPage().

fouble PDFDoc::getPDFVersion  )  [inline]
 

Definition at line 122 of file PDFDoc.h.

References pdfVersion.

Object* PDFDoc::getStructTreeRoot  )  [inline]
 

Definition at line 76 of file PDFDoc.h.

References catalog, and Catalog::getStructTreeRoot().

XRef* PDFDoc::getXRef  )  [inline]
 

Definition at line 52 of file PDFDoc.h.

References xref.

GBool PDFDoc::isEncrypted  )  [inline]
 

Definition at line 103 of file PDFDoc.h.

References XRef::isEncrypted(), and xref.

GBool PDFDoc::isLinearized  ) 
 

Definition at line 207 of file PDFDoc.cc.

References Object::free(), Object::getNum(), Parser::getObj(), BaseStream::getStart(), gFalse, gTrue, Object::initNull(), Object::isInt(), Object::isNum(), BaseStream::makeSubStream(), parser, str, and xref.

GBool PDFDoc::isOk  )  [inline]
 

Definition at line 43 of file PDFDoc.h.

References ok.

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

Definition at line 112 of file PDFDoc.h.

References XRef::okToAddNotes(), and xref.

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

Definition at line 108 of file PDFDoc.h.

References XRef::okToChange(), and xref.

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

Definition at line 110 of file PDFDoc.h.

References XRef::okToCopy(), and xref.

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

Definition at line 106 of file PDFDoc.h.

References XRef::okToPrint(), and xref.

GBool PDFDoc::onLink fouble  x,
fouble  y
[inline]
 

Definition at line 95 of file PDFDoc.h.

References links, and Links::onLink().

GString* PDFDoc::readMetadata  )  [inline]
 

Definition at line 73 of file PDFDoc.h.

References catalog, and Catalog::readMetadata().

GBool PDFDoc::saveAs GString name  ) 
 

Definition at line 237 of file PDFDoc.cc.

References Stream::close(), error(), f, Stream::getChar(), gFalse, gTrue, Stream::reset(), and str.

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

Definition at line 103 of file PDFDoc.cc.

References catalog, checkHeader(), errBadCatalog, errCode, error(), XRef::getErrorCode(), gFalse, gTrue, Catalog::isOk(), XRef::isOk(), printCommands, str, and xref.

Referenced by PDFDoc().


Member Data Documentation

Catalog* PDFDoc::catalog [private]
 

Definition at line 138 of file PDFDoc.h.

Referenced by displayPage(), findDest(), findPage(), getCatalog(), getLinks(), getNumPages(), getPageHeight(), getPageRotate(), getPageWidth(), getStructTreeRoot(), PDFDoc(), readMetadata(), setup(), and ~PDFDoc().

int PDFDoc::errCode [private]
 

Definition at line 143 of file PDFDoc.h.

Referenced by getErrorCode(), PDFDoc(), and setup().

FILE* PDFDoc::file [private]
 

Definition at line 134 of file PDFDoc.h.

GString* PDFDoc::fileName [private]
 

Definition at line 133 of file PDFDoc.h.

Referenced by getFileName(), PDFDoc(), and ~PDFDoc().

Links* PDFDoc::links [private]
 

Definition at line 139 of file PDFDoc.h.

Referenced by displayPage(), findLink(), getLinks(), onLink(), PDFDoc(), and ~PDFDoc().

GBool PDFDoc::ok [private]
 

Definition at line 142 of file PDFDoc.h.

Referenced by isOk(), and PDFDoc().

fouble PDFDoc::pdfVersion [private]
 

Definition at line 136 of file PDFDoc.h.

Referenced by checkHeader(), and getPDFVersion().

GBool PDFDoc::printCommands [private]
 

Definition at line 140 of file PDFDoc.h.

Referenced by displayPage(), PDFDoc(), and setup().

BaseStream* PDFDoc::str [private]
 

Definition at line 135 of file PDFDoc.h.

Referenced by checkHeader(), getBaseStream(), isLinearized(), PDFDoc(), saveAs(), setup(), and ~PDFDoc().

XRef* PDFDoc::xref [private]
 

Definition at line 137 of file PDFDoc.h.

Referenced by getDocInfo(), getXRef(), isEncrypted(), isLinearized(), okToAddNotes(), okToChange(), okToCopy(), okToPrint(), PDFDoc(), setup(), and ~PDFDoc().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:44:27 2005 for OPIE by  doxygen 1.4.2