pdfobjects Namespace Reference

Namespaces

namespace  utils

Classes

class  CAnnotation
class  CArray
class  CContentStream
class  CDict
class  DictIdxComparator
class  CInlineImage
struct  PropertyTraitSimple< pNull >
struct  PropertyTraitSimple< pBool >
struct  PropertyTraitSimple< pInt >
struct  PropertyTraitSimple< pReal >
struct  PropertyTraitSimple< pString >
struct  PropertyTraitSimple< pName >
struct  PropertyTraitSimple< pRef >
class  CObjectSimple
class  ContentsChangeTag
class  CPage
class  CPageAnnots
class  CPageAttributes
class  CPageChanges
class  CPageContents
class  CPageDisplay
class  CPageFonts
class  ICPageModule
class  PdfFileDeleter
class  CPdf
class  CStream
class  CStreamsXpdfReader
class  CXref
struct  DisplayParams
class  CObjectFactory
class  XPdfObjectFactory
class  CNullFactory
class  CDictFactory
class  CArrayFactory
class  CPageFactory
struct  IndiRef
class  IProperty
class  SimpleGenericOperator
class  TextSimpleOperator
class  UnknownCompositePdfOperator
class  InlineImageCompositePdfOperator
class  PdfOperator
class  CompositePdfOperator
struct  AcceptingPdfOperatorIterator
struct  RejectingPdfOperatorIterator
struct  ChangePdfOperatorIterator
struct  Specification
class  StateUpdater
struct  TextSearchParams
class  XRefWriter

Typedefs

typedef
observer::ObserverHandler
< CContentStream
CContentStreamObserverSubject
typedef CObjectSimple< pNull > CNull
typedef CObjectSimple< pBool > CBool
typedef CObjectSimple< pInt > CInt
typedef CObjectSimple< pReal > CReal
typedef CObjectSimple< pString > CString
typedef CObjectSimple< pName > CName
typedef CObjectSimple< pRef > CRef
typedef std::map< IndiRef,
size_t, utils::IndComparator
PageTreeNodeCountCache
typedef std::map< IndiRef,
IndiRef, utils::IndComparator
PageTreeKidsParentCache
typedef std::pair< IndiRef,
enum ResolveRefState
ResolvedRefEntry
typedef std::map< IndiRef,
ResolvedRefEntry
*, utils::IndComparator
ResolvedRefStorage
typedef std::map< const
IndiRef, boost::shared_ptr
< IProperty >
, utils::IndComparator
IndirectMapping
typedef uintptr_t cpdf_id_t
typedef std::map< cpdf_id_t,
ResolvedRefStorage * > 
ResolvedRefMapping
typedef struct
pdfobjects::DisplayParams 
DisplayParams
typedef CObjectFactory< CIntCIntFactory
typedef CObjectFactory< CRealCRealFactory
typedef CObjectFactory< CStringCStringFactory
typedef CObjectFactory< CNameCNameFactory
typedef CObjectFactory< CBoolCBoolFactory
typedef CObjectFactory< CRefCRefFactory
typedef struct pdfobjects::IndiRef IndiRef
typedef
observer::ObserverHandler
< IProperty
IPropertyObserverSubject
typedef observer::IObserver
< IProperty
IPropertyObserver
typedef
AcceptingPdfOperatorIterator
< 4, itTextIterator > 
TextOperatorIterator
typedef struct
AcceptingPdfOperatorIterator
< 4, itFontIterator > 
FontOperatorIterator
typedef struct
AcceptingPdfOperatorIterator
< 1, itInlineImageIterator > 
InlineImageOperatorIterator
typedef struct
RejectingPdfOperatorIterator
< 38, itChangeableIterator > 
ChangeableOperatorIterator
typedef struct
AcceptingPdfOperatorIterator
< 4, itNonStrokingIterator > 
NonStrokingOperatorIterator
typedef struct
AcceptingPdfOperatorIterator
< 4, itStrokingIterator > 
StrokingOperatorIterator
typedef struct
AcceptingPdfOperatorIterator
< 24, itGraphicalIterator > 
GraphicalOperatorIterator
typedef struct
pdfobjects::TextSearchParams 
TextSearchParams

Enumerations

enum  ResolveRefState { STATE_NEW, STATE_RESOLVING, STATE_RESOLVED }
enum  PropertyType {
  pNull = objNull, pBool = objBool, pInt = objInt, pReal = objReal,
  pString = objString, pName = objName, pRef = objRef, pArray = objArray,
  pDict = objDict, pStream = objStream, pOther = objCmd, pOther1 = objError,
  pOther2 = objEOF, pOther3 = objNone
}
enum  IteratorType {
  itTextIterator, itFontIterator, itInlineImageIterator, itNonStrokingIterator,
  itStrokingIterator, itChangeableIterator, itGraphicalIterator
}

Functions

bool containsNonStrokingOperator (boost::shared_ptr< PdfOperator > oper)
bool containsStrokingOperator (boost::shared_ptr< PdfOperator > oper)
bool isOutline (boost::shared_ptr< IProperty > ip)
std::string getOutlineText (boost::shared_ptr< IProperty > ip)
bool isPage (boost::shared_ptr< IProperty > ip)
template size_t CPageContents::findText< std::vector< libs::Rectangle > > (std::string text, std::vector< libs::Rectangle > &recs, const TextSearchParams &params) const
void deleteResolveRefStorage (ResolvedRefStorage *storage)
void removeResolveRefMapping (const cpdf_id_t &orignalId, ResolvedRefMapping &map, const cpdf_id_t &id)
cpdf_id_t getIdFromCPdf (const CPdf *pdf)
CPdfgetCPdfFromId (const cpdf_id_t &id)
IndiRef createMapping (ResolvedRefStorage &container, XRefWriter &xref, IndiRef &oldRef, ResolvedRefEntry **entry)
template<typename IP >
boost::shared_ptr< CDictgetCDictFromDict (IP &ip, const std::string &key)
std::ostream & operator<< (std::ostream &out, const IndiRef &ref)
std::ostream & operator<< (std::ostream &out, const ::Ref &ref)
std::ostream & operator<< (std::ostream &out, PropertyType type)
std::ostream & operator<< (std::ostream &out,::ObjType type)
bool isPdfValid (boost::weak_ptr< CPdf > pdf)
bool hasValidPdf (const IProperty &ip)
template<typename T >
bool hasValidPdf (T ip)
bool isRefValid (const IndiRef *ref)
template<typename T >
bool hasValidRef (T ip)
bool hasValidRef (IProperty &ip)
template<PropertyType Type>
bool isIPType (const IProperty &ip)
template<PropertyType Type>
bool isIPType (boost::shared_ptr< IProperty > ip)
template<typename T >
bool isNull (T &ip)
template<typename T >
bool isInt (T &ip)
template<typename T >
bool isReal (T &ip)
template<typename T >
bool isNumber (T &ip)
template<typename T >
bool isString (T &ip)
template<typename T >
bool isName (T &ip)
template<typename T >
bool isRef (T &ip)
template<typename T >
bool isDict (T &ip)
template<typename T >
bool isArray (T &ip)
template<typename T >
bool isStream (T &ip)
template<int i>
std::string getStringType ()
template<>
std::string getStringType< 0 > ()
template<>
std::string getStringType< 1 > ()
template<>
std::string getStringType< 2 > ()
template<>
std::string getStringType< 3 > ()
template<>
std::string getStringType< 4 > ()
template<>
std::string getStringType< 5 > ()
template<>
std::string getStringType< 9 > ()
template<>
std::string getStringType< 6 > ()
template<>
std::string getStringType< 7 > ()
template<>
std::string getStringType< 8 > ()
boost::shared_ptr< PdfOperatorcreateOperator (const std::string &name, PdfOperator::Operands &operands)
boost::shared_ptr< PdfOperatorcreateOperator (const char *name, PdfOperator::Operands &operands)
boost::shared_ptr< PdfOperatorcreateOperatorTranslation (double x, double y)
boost::shared_ptr< PdfOperatorcreateOperatorScale (double width, double height)
boost::shared_ptr
< CompositePdfOperator
findCompositeOfPdfOperator (PdfOperator::Iterator it, boost::shared_ptr< PdfOperator > oper)
bool isCompositeOp (const PdfOperator *oper)
bool isCompositeOp (PdfOperator::Iterator it)
bool isCompositeOp (boost::shared_ptr< PdfOperator > oper)
bool isInlineImageOp (const PdfOperator *oper)
bool isInlineImageOp (boost::shared_ptr< PdfOperator > oper)
shared_ptr< PdfOperatorgetLastOperator (shared_ptr< PdfOperator > oper)
bool isPdfOp (const PdfOperator &op, const std::string &opn)
bool isPdfOp (const PdfOperator &op, const std::string &opn1, const std::string &opn2)
bool isPdfOp (const PdfOperator &op, const std::string &opn1, const std::string &opn2, const std::string &opn3)
bool isPdfOp (const PdfOperator &op, const std::string &opn1, const std::string &opn2, const std::string &opn3, const std::string &opn4)
template<typename T >
bool isPdfOp (const T &op, const std::string &opn)
template<typename T >
bool isPdfOp (const T &op, const std::string &opn1, const std::string &opn2)
template<typename T >
bool isPdfOp (const T &op, const std::string &opn1, const std::string &opn2, const std::string &opn3)
template<typename T >
bool isPdfOp (const T &op, const std::string &opn1, const std::string &opn2, const std::string &opn3, const std::string &opn4)
boost::shared_ptr< PdfOperatorgetLastOperator (boost::shared_ptr< PdfOperator > oper)
boost::shared_ptr< PdfOperatorgetLastOperator (PdfOperator::Iterator it)
bool checkAndFixOperator (const StateUpdater::CheckTypes &ops, PdfOperator::Operands &operands)
bool isSimpleOp (const StateUpdater::CheckTypes &chck)
bool isTextOp (const StateUpdater::CheckTypes &chck)
size_t getPrevFromTrailer (Object *trailer)

Variables

const int MAXOBJNUM = INT_MAX
const int MAXOBJGEN = 65535

Typedef Documentation

Factory class for CBool creation.

Use getInstance methods for instants creation.

typedef struct RejectingPdfOperatorIterator< 38, itChangeableIterator > pdfobjects::ChangeableOperatorIterator

Changeable operator iterator.

Constructed from an arbitrary operator, but it will always start from a valid common operator. This is done in the constructor.

This iterator excludes operators like q, Q etc.

Factory class for CInt creation.

Use getInstance methods for instants creation.

Factory class for CName creation.

Use getInstance methods for instants creation.

typedef uintptr_t pdfobjects::cpdf_id_t

Type for pdf identificator.

Factory class for CReal creation.

Use getInstance methods for instants creation.

Factory class for CRef creation.

Use getInstance methods for instants creation.

Factory class for CString creation.

Use getInstance methods for instants creation.

Graphical state parameters.

These parameters are used by xpdf when updating bounding boxex of content stream operators, displaying page etc.

Font operator iterator.

Constructed from an arbitrary operator, but it will always start from a valid font operator. This is done in the constructor.

This iterator traverses only through operators that alter graphical font state.

typedef struct AcceptingPdfOperatorIterator< 24, itGraphicalIterator > pdfobjects::GraphicalOperatorIterator

Graphical operator iterator.

Constructed from an arbitrary operator, but it will always start from a valid graphical operator. This is done in the constructor.

This iterator iterates over all graphical operators on a page this includes lines, rectangles, paths.

typedef std::map<const IndiRef, boost::shared_ptr<IProperty>, utils::IndComparator> pdfobjects::IndirectMapping

Indirect properties mapping type.

Two numbers specifying indirect reference of a pdf object.

typedef struct AcceptingPdfOperatorIterator< 1, itInlineImageIterator > pdfobjects::InlineImageOperatorIterator

Inline image iterator.

Constructed from an arbitrary operator, but it will always start from a valid inline image operator. This is done in the constructor.

typedef struct AcceptingPdfOperatorIterator< 4, itNonStrokingIterator > pdfobjects::NonStrokingOperatorIterator

"Non stroking" operator iterator.

This iterator traverses only operators that are connected with non stroking operations.

REMARK: See pdf specification for details.

See also:
StrokingOperatorIterator

Type for page tree kids array to parrent mapping.

See also:
CPdf::pageTreeKidsParentCache

Type for page tree node count chache. It is mapping where key is indirect reference of page tree node and associated value is current number of direct pages under this node.

Entry for reference translation mapping. Firts value stands for the new reference (translated one) and the second keeps state of the translation.

Type for mapping from pdfs to their resolved storage. Maps pdf identificators to their resolved reference storage.

Type for reference translation mappings. Key stands for reference in original property and associated value stands for reserved reference (with its current resolvetion state) which stands for resolved reference.
Mapping is used for adding indirect properties from different pdf. Referncies are bound to (unique in) specific document. If we want to insert subtree of indirect properties from one document to another we have to translate all referenced indirect objects which all needs translation. Therefore a new reference is created for each and this mapping holds translation from the original to the created one.

See also:
CPdf::addIndirectProperty
typedef struct AcceptingPdfOperatorIterator< 4, itStrokingIterator > pdfobjects::StrokingOperatorIterator

"Stroking" operator iterator.

This iterator traverses only operators that are connected with stroking operations.

REMARK: See pdf specification for details.

See also:
NonStrokingOperatorIterator

Text operator iterator.

Constructed from an arbitrary operator, but it will always start from a valid text operator. This is done in the constructor.

Text search parameters.

These parameters are used by xpdf when serching a text string.


Enumeration Type Documentation

Iterator types. Needed when constructing specific iterators using templates.

Enumerator:
itTextIterator 
itFontIterator 
itInlineImageIterator 
itNonStrokingIterator 
itStrokingIterator 
itChangeableIterator 
itGraphicalIterator 

Enum describing property type.

Enumerator:
pNull 
pBool 
pInt 
pReal 
pString 
pName 
pRef 
pArray 
pDict 
pStream 
pOther 
pOther1 
pOther2 
pOther3 

State of reference translation.

  • STATE_NEW represents a new mapping. This means that a new reference was for translation and it is not backed up by any real object.
  • STATE_RESOLVING represents mapping which is currently in translation meaning that the real object which will be backed by translated reference is in progress of construction.
  • STATE_RESOLVED represents mapping which is finally backed by real indirect object.
Enumerator:
STATE_NEW 
STATE_RESOLVING 
STATE_RESOLVED 

Function Documentation

bool pdfobjects::checkAndFixOperator ( const pdfobjects::StateUpdater::CheckTypes ops,
PdfOperator::Operands &  operands 
)

Check if the operands match the specification and replace operand with its stronger equivalent.

(e.g. When xpdf returns an object with integer type, but the operand can be a real, we have to convert it to real.)

Parameters:
ops Operator specification
operands Operand stack.
Returns:
True if type and count match, false otherwise.
bool pdfobjects::containsNonStrokingOperator ( boost::shared_ptr< PdfOperator >  oper  ) 

Tries to find first non stroking operator.

Some operators are modified by stroking operators some by nonstroking. (e.g. when changing color, we can change color either of a stroking operator using RG operator or of a nonstroking operator using rg operator. RG operator does not change color of nonstroking operators.)

Parameters:
oper Pdf operator that will be searched for a non stroking operator.
Returns:
True if found, false otherwise.
bool pdfobjects::containsStrokingOperator ( boost::shared_ptr< PdfOperator >  oper  ) 

Tries to find first stroking operator.

Some operators are modified by stroking operators some by nonstroking. (e.g. when changing color, we can change color either of a stroking operator using RG operator or of a nonstroking operator using rg operator. RG operator does not change color of nonstroking operators.)

Parameters:
oper Pdf operator that will be searched for a stroking operator.
Returns:
True if found, false otherwise.
template size_t pdfobjects::CPageContents::findText< std::vector< libs::Rectangle > > ( std::string  text,
std::vector< libs::Rectangle > &  recs,
const TextSearchParams &  params 
) const
IndiRef pdfobjects::createMapping ( ResolvedRefStorage &  container,
XRefWriter &  xref,
IndiRef &  oldRef,
ResolvedRefEntry **  entry 
)

Reserves new referenece and creates mapping.

Parameters:
container Resolved mapping container.
xref XRefWriter for new reference reservation.
oldRef Original reference.
entry Pointer for resolved ref mapping entry.

Reserves a new reference with XRefWriter::reserveRef method and if oldRef is valid reference (checks with isRefValid method) also creates mapping [oldRef, newRef to given container with STATE_NEW state and given entry will point to the mapping entry pointer.

Returns:
newly reseved reference entry.

References debug::DBG_DBG, isRefValid(), kernelPrintDbg, pdfobjects::XRefWriter::reserveRef(), and STATE_NEW.

Referenced by pdfobjects::CPdf::addIndirectProperty(), and pdfobjects::CPdf::subsReferencies().

boost::shared_ptr< PdfOperator > pdfobjects::createOperator ( const char *  name,
PdfOperator::Operands &  operands 
)

Factory function for operators creation. Transforms const char parameter to the string and delegates to createOperator(std::string&, PdfOperator::Operands&)

Parameters:
name Opertor name.
operands Operands for operator.
Returns:
Valid pdfoperator object.
Exceptions:
ElementBadTypeException if operator or its operands are not valid.
NotImplementedException if given operator is inline image (BI).
boost::shared_ptr< PdfOperator > pdfobjects::createOperator ( const std::string &  name,
PdfOperator::Operands &  operands 
)

Factory function for operators creation. Creates instance depending on type of the operator.
Note that this function doesn't cover inline images (BI operator).

Parameters:
name Opertor name.
operands Operands for operator.
Returns:
Valid pdfoperator object.
Exceptions:
ElementBadTypeException if operator or its operands are not valid.
NotImplementedException if given operator is inline image (BI).

Referenced by pdfobjects::CPageContents::addInlineImage(), pdfobjects::CPageContents::addText(), pdfobjects::SimpleGenericOperator::clone(), pdfobjects::ContentsChangeTag::create(), gui::Base::createOperator(), and pdfobjects::CPageDisplay::setTransformMatrix().

boost::shared_ptr< PdfOperator > pdfobjects::createOperatorScale ( double  width,
double  height 
)

Create scaling operator.

Referenced by pdfobjects::CPageContents::addInlineImage().

boost::shared_ptr< PdfOperator > pdfobjects::createOperatorTranslation ( double  x,
double  y 
)

Create translation operator.

Referenced by pdfobjects::CPageContents::addInlineImage().

void pdfobjects::deleteResolveRefStorage ( ResolvedRefStorage *  storage  ) 

Deallocates given storage (with all its elements).

Parameters:
storage Resolve storage to deallocate.

Referenced by pdfobjects::CPdf::invalidate(), and removeResolveRefMapping().

boost::shared_ptr< CompositePdfOperator > pdfobjects::findCompositeOfPdfOperator ( PdfOperator::Iterator  begin,
boost::shared_ptr< PdfOperator >  oper 
)

Find composite operator into which an operator belongs.

Parameters:
begin Start iterator.
oper Object we want to find the composite in which it resides.
Returns:
Composite operator.

Referenced by pdfobjects::CContentStream::deleteOperator(), pdfobjects::CContentStream::insertOperator(), and pdfobjects::CContentStream::replaceOperator().

template<typename IP >
boost::shared_ptr<CDict> pdfobjects::getCDictFromDict ( IP &  ip,
const std::string &  key 
) [inline]

Get dictionary from dictionary. If it is an indirect object, fetch the object.

Referenced by pdfobjects::CPageFonts::addSystemType1Font(), pdfobjects::CPageFonts::getFontIdsAndNames(), and pdfobjects::CPdf::getOutlines().

CPdf* pdfobjects::getCPdfFromId ( const cpdf_id_t &  id  ) 

Translates id to the pdf instance pointer.

Parameters:
id Pdf id generated by getIdFromCPdf.
Returns:
Pointer to CPdf instance associated with given id.

Referenced by pdfobjects::CPdf::releasePdfId(), and pdfobjects::CPdf::setPdfId().

cpdf_id_t pdfobjects::getIdFromCPdf ( const CPdf *  pdf  ) 

Translates pdf to its id. This translation can be reversed by getCPdfFromId method.

Returns:
id for pdf instance.

Referenced by pdfobjects::CPdf::setPdfId().

boost::shared_ptr<PdfOperator> pdfobjects::getLastOperator ( PdfOperator::Iterator  it  )  [inline]

Get last operator if a composite.

Parameters:
it Iterator.
Returns:
Iterator over last operator of a composite.

References iterator::DoubleListIterator< Item >::getCurrent(), and getLastOperator().

boost::shared_ptr<PdfOperator> pdfobjects::getLastOperator ( boost::shared_ptr< PdfOperator >  oper  ) 

Get last operator if a composite.

Parameters:
oper Operator.
Returns:
Last operator of a composite.
shared_ptr<PdfOperator> pdfobjects::getLastOperator ( shared_ptr< PdfOperator >  oper  ) 
std::string pdfobjects::getOutlineText ( boost::shared_ptr< IProperty >  ip  ) 

Get text from an outline.

Parameters:
ip Outline dictionary.
size_t pdfobjects::getPrevFromTrailer ( Object *  trailer  ) 

Gets value of the Prev field from given trailer.

Parameters:
trailer Trailer stream or dictionary.

This method correctly distinguishes between trailer dictionary and stream.

Returns:
Value of the Prev field or -1 on error (Prev not present or invalid value).

References debug::DBG_DBG, debug::DBG_ERR, ERR_OFFSET, pdfobjects::XPdfObjectFactory::getInstance(), and kernelPrintDbg.

Referenced by pdfobjects::XRefWriter::collectRevisions().

template<int i>
std::string pdfobjects::getStringType (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 0 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 1 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 2 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 3 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 4 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 5 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 6 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 7 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 8 > (  )  [inline]

Get string representation of specified type.

template<>
std::string pdfobjects::getStringType< 9 > (  )  [inline]

Get string representation of specified type.

template<typename T >
bool pdfobjects::hasValidPdf ( ip  )  [inline]

Checks whether iproprety belongs to a valid pdf.

Parameters:
ip Property to check.
Returns:
isPdfValid(ip-&getPdf()).

References isPdfValid().

bool pdfobjects::hasValidPdf ( const IProperty &  ip  )  [inline]

Checks whether iproprety belongs to a valid pdf.

Parameters:
ip Property to check.
Returns:
isPdfValid(ip-&getPdf()).

References pdfobjects::IProperty::getPdf(), and isPdfValid().

Referenced by pdfobjects::CPage::_check_validity(), pdfobjects::CPage::_objectChanged(), pdfobjects::CObjectSimple< Tp >::_objectChanged(), pdfobjects::CContentStream::_objectChanged(), pdfobjects::CArray::_objectChanged(), pdfobjects::CPdf::addProperty(), pdfobjects::CArray::addProperty(), pdfobjects::CPageContents::addToBack(), pdfobjects::CPageContents::addToFront(), pdfobjects::CContentStream::CContentStream(), pdfobjects::CPageContents::convert(), pdfobjects::CDict::delProperty(), pdfobjects::CArray::delProperty(), pdfobjects::IProperty::dispatchChange(), pdfobjects::CPageChanges::displayChange(), pdfobjects::CContentStream::frontInsertOperator(), pdfobjects::CPage::getPagePosition(), pdfobjects::CContentStream::insertOperator(), pdfobjects::CContentStream::OperandObserver::notify(), pdfobjects::CContentStream::CStreamObserver::notify(), pdfobjects::CStreamsXpdfReader< Container >::open(), pdfobjects::CPageContents::parse(), pdfobjects::CPageContents::remove(), pdfobjects::CPageContents::reparse(), pdfobjects::CContentStream::replaceOperator(), pdfobjects::CPageContents::setContents(), pdfobjects::CDict::setProperty(), pdfobjects::CArray::setProperty(), pdfobjects::CObjectSimple< Tp >::setStringRepresentation(), pdfobjects::CObjectSimple< Tp >::setValue(), and pdfobjects::CPdf::subsReferencies().

bool pdfobjects::hasValidRef ( IProperty &  ip  )  [inline]
template<typename T >
bool pdfobjects::hasValidRef ( ip  )  [inline]
template<typename T >
bool pdfobjects::isArray ( T &  ip  )  [inline]
bool pdfobjects::isCompositeOp ( boost::shared_ptr< PdfOperator >  oper  )  [inline]

Is an operator a composite.

References isCompositeOp().

bool pdfobjects::isCompositeOp ( PdfOperator::Iterator  it  )  [inline]

Is an operator a composite.

References iterator::DoubleListIterator< Item >::getCurrent(), and isCompositeOp().

bool pdfobjects::isCompositeOp ( const PdfOperator *  oper  )  [inline]

Is an operator a composite.

Referenced by getLastOperator(), and isCompositeOp().

template<typename T >
bool pdfobjects::isDict ( T &  ip  )  [inline]
bool pdfobjects::isInlineImageOp ( boost::shared_ptr< PdfOperator >  oper  )  [inline]

Is an operator an inline image.

References isInlineImageOp().

bool pdfobjects::isInlineImageOp ( const PdfOperator *  oper  )  [inline]

Is an operator an inline image.

Referenced by isInlineImageOp().

template<typename T >
bool pdfobjects::isInt ( T &  ip  )  [inline]
template<PropertyType Type>
bool pdfobjects::isIPType ( boost::shared_ptr< IProperty >  ip  )  [inline]

Is iproperty of a specified type.

template<PropertyType Type>
bool pdfobjects::isIPType ( const IProperty &  ip  )  [inline]

Is iproperty of a specified type.

References pdfobjects::IProperty::getType().

template<typename T >
bool pdfobjects::isName ( T &  ip  )  [inline]
template<typename T >
bool pdfobjects::isNull ( T &  ip  )  [inline]
template<typename T >
bool pdfobjects::isNumber ( T &  ip  )  [inline]

Is IProperty of specified type.

bool pdfobjects::isOutline ( boost::shared_ptr< IProperty >  ip  ) 

Checks whether the object is an ouline according to pdf specification.

Parameters:
ip This iproperty is checked whether it is an outline.
bool pdfobjects::isPage ( boost::shared_ptr< IProperty >  ip  ) 

Check whether iproperty claimed to be a page is conforming to the pdf specification. (p.118)

Parameters:
ip IProperty.
template<typename T >
bool pdfobjects::isPdfOp ( const T &  op,
const std::string &  opn1,
const std::string &  opn2,
const std::string &  opn3,
const std::string &  opn4 
) [inline]

References isPdfOp().

template<typename T >
bool pdfobjects::isPdfOp ( const T &  op,
const std::string &  opn1,
const std::string &  opn2,
const std::string &  opn3 
) [inline]

References isPdfOp().

template<typename T >
bool pdfobjects::isPdfOp ( const T &  op,
const std::string &  opn1,
const std::string &  opn2 
) [inline]

References isPdfOp().

template<typename T >
bool pdfobjects::isPdfOp ( const T &  op,
const std::string &  opn 
) [inline]

Is specific operator.

References isPdfOp().

bool pdfobjects::isPdfOp ( const PdfOperator &  op,
const std::string &  opn1,
const std::string &  opn2,
const std::string &  opn3,
const std::string &  opn4 
) [inline]
bool pdfobjects::isPdfOp ( const PdfOperator &  op,
const std::string &  opn1,
const std::string &  opn2,
const std::string &  opn3 
) [inline]
bool pdfobjects::isPdfOp ( const PdfOperator &  op,
const std::string &  opn1,
const std::string &  opn2 
) [inline]
bool pdfobjects::isPdfOp ( const PdfOperator &  op,
const std::string &  opn 
) [inline]
bool pdfobjects::isPdfValid ( boost::weak_ptr< CPdf >  pdf  )  [inline]

Checks whether pdf is valid.

Parameters:
pdf Pdf isntance to check.
Returns:
true if pdf is not NULL, false otherwise.

Referenced by hasValidPdf().

template<typename T >
bool pdfobjects::isReal ( T &  ip  )  [inline]

Is IProperty of specified type.

template<typename T >
bool pdfobjects::isRef ( T &  ip  )  [inline]
bool pdfobjects::isRefValid ( const IndiRef *  ref  )  [inline]

Checks whether given indirect reference is valid. Reference is valid, if it is non NULL and object number is greater than 0 and object number is not invalid.

Parameters:
ref Reference to check.
Returns:
true if reference is valid, false otherwise.

References pdfobjects::IndiRef::invalidnum, and pdfobjects::IndiRef::num.

Referenced by pdfobjects::CPdf::addIndirectProperty(), gui::RefPropertyDialog::check(), createMapping(), hasValidRef(), gui::QSPdf::referenceValid(), and pdfobjects::CPdf::subsReferencies().

bool pdfobjects::isSimpleOp ( const StateUpdater::CheckTypes &  chck  )  [inline]

Is it a simple or a composite operator.

Parameters:
chck Check type structure.
Returns:
True if the chck is a simple operator, false otherwise.

References pdfobjects::StateUpdater::CheckTypes::endTag.

template<typename T >
bool pdfobjects::isStream ( T &  ip  )  [inline]
template<typename T >
bool pdfobjects::isString ( T &  ip  )  [inline]
bool pdfobjects::isTextOp ( const StateUpdater::CheckTypes &  chck  )  [inline]

Is it a text operator (one which holds text to be displayed).

Parameters:
chck Check type structure.
Returns:
True if chck is a text operator, false otherwise.

References pdfobjects::StateUpdater::CheckTypes::name.

std::ostream & pdfobjects::operator<< ( std::ostream &  out,
::ObjType  type 
)

Prints xpdf object type.

Prints given type in human readable from instead of just number. Uses getStringType method to get string representation.

Parameters:
out String where to print.
type Xpdf type to print.
Returns:
Reference to given string.
std::ostream & pdfobjects::operator<< ( std::ostream &  out,
PropertyType  type 
)

Prints property type.

Prints given type in human readable from instead of just number. Uses getStringType method to get string representation.

Parameters:
out String where to print.
type Type to print.
Returns:
Reference to given string.
std::ostream& pdfobjects::operator<< ( std::ostream &  out,
const ::Ref &  ref 
) [inline]

Prints reference. Prints given xpdf reference in ref[num, gen] format.

Parameters:
out String where to print.
ref Reference to print.
Returns:
reference to given string.
std::ostream& pdfobjects::operator<< ( std::ostream &  out,
const IndiRef &  ref 
) [inline]

Prints reference. Prints given reference according to pdf specification.

Parameters:
out String where to print.
ref Reference to print.
Returns:
reference to given string.

References pdfobjects::IndiRef::gen, and pdfobjects::IndiRef::num.

void pdfobjects::removeResolveRefMapping ( const cpdf_id_t &  orignalId,
ResolvedRefMapping &  map,
const cpdf_id_t &  id 
)

Removes entry for given id from mapping.

Parameters:
originalId Id for cpdf owning map.
map Resolve mapping.
id PDF id.

Removes mapping entry for given id and deallocates associated resolve storage.

References debug::DBG_DBG, deleteResolveRefStorage(), and utilsPrintDbg.

Referenced by pdfobjects::CPdf::releasePdfId().


Variable Documentation

const int pdfobjects::MAXOBJGEN = 65535

Maximal object generation number.

Cross reference entry with this generation number can't be reused.

Referenced by pdfobjects::CXref::reserveRef().

const int pdfobjects::MAXOBJNUM = INT_MAX

Maximal object number.

Referenced by pdfobjects::CXref::reserveRef().