PoDoFo  0.9.1
Classes | Typedefs | Enumerations | Functions | Variables
PoDoFo Namespace Reference

Classes

class  PdfCanvas
class  PdfNamedColor
class  NamedColorComparatorPredicate
class  PdfColor
class  PdfContentsTokenizer
class  PdfData
class  PdfDataType
class  PdfDate
class  PdfEncoding
class  PdfSimpleEncoding
class  PdfDocEncoding
class  PdfWinAnsiEncoding
class  PdfMacRomanEncoding
class  PdfStandardEncoding
class  PdfSymbolEncoding
class  PdfZapfDingbatsEncoding
class  PdfEncodingFactory
class  PdfRC4Stream
class  PdfRC4OutputStream
class  PdfRC4InputStream
struct  MD5Context
 Structure representing an MD5 context while ecrypting. (For internal use only) More...
class  PdfEncrypt
class  PdfEncryptAES
class  PdfEncryptRC4
class  PdfError
class  PdfFileStream
class  PdfFilteredEncodeStream
class  PdfFilteredDecodeStream
class  PdfFilter
class  PdfFilterFactory
class  PdfHexFilter
class  PdfAscii85Filter
class  PdfFlateFilter
class  PdfRLEFilter
class  PdfLZWFilter
class  PdfInputDevice
class  PdfInputStream
class  PdfFileInputStream
class  PdfMemoryInputStream
class  PdfDeviceInputStream
class  PdfMemStream
class  PdfName
class  PdfObject
class  PdfObjectStreamParserObject
class  PdfOutputDevice
class  PdfOutputStream
class  PdfFileOutputStream
class  PdfMemoryOutputStream
class  PdfDeviceOutputStream
class  PdfBufferOutputStream
class  PdfParser
class  PdfParserObject
class  PdfRect
class  PdfRefCountedBuffer
class  PdfRefCountedInputDevice
class  PdfReference
class  PdfRijndael
 Class implementing the Rijndael cipher. (For internal use only) More...
class  PdfStream
class  PdfString
class  PdfTokenizer
class  PdfVariant
class  PdfVecObjects
class  PdfWriter
class  PdfXRef
class  PdfXRefStream
class  PdfXRefStreamParserObject
class  PdfAction
class  PdfAnnotation
class  PdfContents
class  PdfDestination
class  PdfEncodingDifference
class  PdfDifferenceEncoding
class  PdfDocument
class  PdfElement
class  PdfEncodingObjectFactory
class  PdfExtGState
class  PdfPushButton
class  PdfCheckBox
class  PdfTextField
class  PdfListField
class  PdfComboBox
class  PdfListBox
class  PdfFileSpec
class  PdfFont
struct  TFontCacheElement
class  PdfFontCache
class  PdfFontCID
class  PdfFontFactory
class  PdfFontMetrics
class  PdfFontSimple
class  PdfFontTrueType
class  PdfFontTTFSubset
class  PdfFontType1
class  PdfType1Encrypt
class  PdfFontType1Base14
class  PdfFunction
class  PdfSampledFunction
class  PdfExponentialFunction
class  PdfStitchingFunction
class  PdfIdentityEncoding
class  PdfImage
class  PdfInfo
class  PdfMemDocument
class  PdfOutlineItem
class  PdfOutlines
class  PdfPage
class  PdfPagesTree
class  PdfPagesTreeCache
class  PdfPainter
class  PdfPainterMM
class  PdfShadingPattern
class  PdfAxialShadingPattern
class  PdfFunctionBaseShadingPattern
class  PdfRadialShadingPattern
class  PdfSignatureField
class  PdfSignOutputDevice
class  PdfStreamedDocument
class  PdfTableModel
class  PdfSimpleTableModel
class  PdfTable
class  PdfXObject

Typedefs

typedef std::vector< PdfObjectPdfArrayBaseClass
typedef struct PoDoFo::MD5Context MD5_CTX
 Structure representing an MD5 context while ecrypting. (For internal use only)

Enumerations

enum  EPdfContentsType { ePdfContentsType_Keyword, ePdfContentsType_Variant, ePdfContentsType_ImageData }
enum  EPdfVersion {
  ePdfVersion_1_0 = 0, ePdfVersion_1_1, ePdfVersion_1_2, ePdfVersion_1_3,
  ePdfVersion_1_4, ePdfVersion_1_5, ePdfVersion_1_6, ePdfVersion_1_7
}
enum  EPdfWriteMode { ePdfWriteMode_Compact = 0x01, ePdfWriteMode_Clean = 0x02 }
enum  EPdfDataType {
  ePdfDataType_Bool, ePdfDataType_Number, ePdfDataType_Real, ePdfDataType_String,
  ePdfDataType_HexString, ePdfDataType_Name, ePdfDataType_Array, ePdfDataType_Dictionary,
  ePdfDataType_Null, ePdfDataType_Reference, ePdfDataType_RawData, ePdfDataType_Unknown
}
enum  EPdfFilter { ePdfFilter_ASCIIHexDecode, ePdfFilter_ASCII85Decode , ePdfFilter_FlateDecode, ePdfFilter_RunLengthDecode }
enum  EPdfFontType
enum  EPdfColorSpace {
  ePdfColorSpace_DeviceGray, ePdfColorSpace_DeviceRGB, ePdfColorSpace_DeviceCMYK, ePdfColorSpace_Separation,
  ePdfColorSpace_CieLab
}
enum  EPdfStrokeStyle
enum  EPdfLineCapStyle
enum  EPdfLineJoinStyle
enum  EPdfVerticalAlignment
enum  EPdfAlignment
enum  EPdfPageSize {
  ePdfPageSize_A0, ePdfPageSize_A1, ePdfPageSize_A2, ePdfPageSize_A3,
  ePdfPageSize_A4, ePdfPageSize_A5, ePdfPageSize_A6, ePdfPageSize_Letter,
  ePdfPageSize_Legal, ePdfPageSize_Tabloid
}
enum  EPdfPageMode
enum  EPdfPageLayout
enum  EPdfError {
  ePdfError_ErrOk = 0, ePdfError_TestFailed, ePdfError_InvalidHandle, ePdfError_FileNotFound,
  ePdfError_InvalidDeviceOperation, ePdfError_UnexpectedEOF, ePdfError_OutOfMemory, ePdfError_ValueOutOfRange,
  ePdfError_InternalLogic, ePdfError_InvalidEnumValue, ePdfError_PageNotFound, ePdfError_NoPdfFile,
  ePdfError_NoXRef, ePdfError_NoTrailer, ePdfError_NoNumber, ePdfError_NoObject,
  ePdfError_NoEOFToken, ePdfError_InvalidTrailerSize, ePdfError_InvalidLinearization, ePdfError_InvalidDataType,
  ePdfError_InvalidXRef, ePdfError_InvalidXRefStream, ePdfError_InvalidXRefType, ePdfError_InvalidPredictor,
  ePdfError_InvalidStrokeStyle, ePdfError_InvalidHexString, ePdfError_InvalidStream, ePdfError_InvalidStreamLength,
  ePdfError_InvalidKey, ePdfError_InvalidName, ePdfError_InvalidEncryptionDict, ePdfError_InvalidPassword,
  ePdfError_InvalidFontFile, ePdfError_InvalidContentStream, ePdfError_UnsupportedFilter, ePdfError_UnsupportedFontFormat,
  ePdfError_ActionAlreadyPresent, ePdfError_WrongDestinationType, ePdfError_MissingEndStream, ePdfError_Date,
  ePdfError_Flate, ePdfError_FreeType, ePdfError_SignatureError, ePdfError_MutexError,
  ePdfError_UnsupportedImageFormat, ePdfError_CannotConvertColor, ePdfError_NotImplemented, ePdfError_DestinationAlreadyPresent,
  ePdfError_ChangeOnImmutable, ePdfError_Unknown = 0xffff
}
enum  ELogSeverity {
  eLogSeverity_Critical, eLogSeverity_Error, eLogSeverity_Warning, eLogSeverity_Information,
  eLogSeverity_Debug, eLogSeverity_None, eLogSeverity_Unknown = 0xffff
}
enum  EPdfAction
enum  EPdfAnnotation
enum  EPdfAnnotationFlags
enum  EPdfDestinationType
enum  EPdfField
enum  EPdfHighlightingMode { ePdfHighlightingMode_None, ePdfHighlightingMode_Invert, ePdfHighlightingMode_InvertOutline, ePdfHighlightingMode_Push }
enum  EPdfFunctionType { ePdfFunctionType_Sampled = 0, ePdfFunctionType_Exponential = 2, ePdfFunctionType_Stitching = 3, ePdfFunctionType_PostScript = 4 }
enum  EPdfOutlineFormat { ePdfOutlineFormat_Default = 0x00, ePdfOutlineFormat_Italic = 0x01, ePdfOutlineFormat_Bold = 0x02, ePdfOutlineFormat_BoldItalic = 0x03 }

Functions

template<typename T >
const T PDF_MAX (const T a, const T b)
template<typename T >
const T PDF_MIN (const T a, const T b)
void PdfLocaleImbue (std::ios_base &s)
bool podofo_is_little_endian ()
void * podofo_malloc (size_t size)
void * podofo_realloc (void *buffer, size_t size)
void podofo_free (void *buffer)

Variables

const EPdfVersion ePdfVersion_Default = ePdfVersion_1_3
const int s_nNumWhiteSpaces = 6
 PDF Reference, Section 3.1.1, Table 3.1, White-space characters.

Detailed Description

All classes, functions, types and enums of PoDoFo are members of these namespace.

If you use PoDoFo, you might want to add the line: using namespace PoDoFo; to your application.

PODOFO_USE_UNORDERED_MAP

If you set this define, PoDoFo will use std::tr1::unordered_map instead of std::map for PdfDictionary.

Some benchmarking tests using callgrind have shown that unordered_map is a little faster for writing and AddKey but of course slower for GetKey and HasKey. As PdfDictionaries are usually very small the difference for GetKey and HasKey is not very large and should therefore be rarely noticeable.

By default this define is not set and std::map will be used.


Typedef Documentation

typedef std::vector<PdfObject> PoDoFo::PdfArrayBaseClass

This class represents a PdfArray Use it for all arrays that are written to a PDF file.

A PdfArray can hold any PdfVariant.

See also:
PdfVariant

Enumeration Type Documentation

Used in PdfError::LogMessage to specify the log level.

See also:
PdfError::LogMessage
Enumerator:
eLogSeverity_Critical 

Critical unexpected error

eLogSeverity_Error 

Error

eLogSeverity_Warning 

Warning

eLogSeverity_Information 

Information message

eLogSeverity_Debug 

Debug information

eLogSeverity_None 

No specified level

eLogSeverity_Unknown 

Unknown log level

The type of the action. PDF supports different action types, each of them has different keys and propeties.

Not all action types listed here are supported yet.

Please make also sure that the action type you use is supported by the PDF version you are using.

Enum for text alignment

The type of the annotation. PDF supports different annotation types, each of them has different keys and propeties.

Not all annotation types listed here are supported yet.

Please make also sure that the annotation type you use is supported by the PDF version you are using.

Flags that control the appearance of a PdfAnnotation. You can OR them together and pass it to PdfAnnotation::SetFlags.

Enum for the colorspaces supported by PDF.

Enumerator:
ePdfColorSpace_DeviceGray 

Gray

ePdfColorSpace_DeviceRGB 

RGB

ePdfColorSpace_DeviceCMYK 

CMYK

ePdfColorSpace_Separation 

Separation

ePdfColorSpace_CieLab 

CIE-Lab

An enum describing the type of a read token

Enumerator:
ePdfContentsType_Keyword 

The token is a PDF keyword.

ePdfContentsType_Variant 

The token is a PDF variant. A variant is usually a parameter to a keyword

ePdfContentsType_ImageData 

The "token" is raw inline image data found between ID and EI tags (see PDF ref section 4.8.6)

Every PDF datatype that can occur in a PDF file is referenced by an own enum (e.g. Bool or String).

See also:
PdfVariant

Remember to update PdfVariant::GetDataTypeString() when adding members here.

Enumerator:
ePdfDataType_Bool 

Boolean datatype: Accepts the values "true" and "false"

ePdfDataType_Number 

Number datatype for integer values

ePdfDataType_Real 

Real datatype for floating point numbers

ePdfDataType_String 

String datatype in PDF file. Strings have the form (Hallo World!) in PDF files.

See also:
PdfString
ePdfDataType_HexString 

HexString datatype in PDF file. Hex encoded strings have the form <AF00BE> in PDF files.

See also:
PdfString
ePdfDataType_Name 

Name datatype. Names are used as keys in dictionary to reference values.

See also:
PdfName
ePdfDataType_Array 

An array of other PDF data types.

ePdfDataType_Dictionary 

A dictionary associates keys with values. A key can have another dictionary as value.

ePdfDataType_Null 

The null datatype is always null.

ePdfDataType_Reference 

The reference datatype contains references to PDF objects in the PDF file of the form 4 0 R.

See also:
PdfObject
ePdfDataType_RawData 

Raw PDF data

ePdfDataType_Unknown 

The Datatype is unknown

Destination type, as per 12.3.2.2 of the Pdf spec.

(see table 151 in the pdf spec)

Error Code defines which are used in PdfError to describe the error.

If you add an error code to this enum, please also add it to PdfError::ErrorName and PdfError::ErrorMessage.

See also:
PdfError
Enumerator:
ePdfError_ErrOk 

The default value indicating no error.

ePdfError_TestFailed 

Used in PoDoFo tests, to indicate that a test failed for some reason.

ePdfError_InvalidHandle 

Null pointer was passed, but null pointer is not allowed.

ePdfError_FileNotFound 

A file was not found or cannot be opened.

ePdfError_InvalidDeviceOperation 

Tried to do something unsupported to an I/O device like seek a non-seekable input device

ePdfError_UnexpectedEOF 

End of file was reached but data was expected.

ePdfError_OutOfMemory 

Not enough memory to complete an operation.

ePdfError_ValueOutOfRange 

The specified memory is out of the allowed range.

ePdfError_InternalLogic 

An internal sanity check or assertion failed.

ePdfError_InvalidEnumValue 

An invalid enum value was specified.

ePdfError_PageNotFound 

The requested page could not be found in the PDF.

ePdfError_NoPdfFile 

The file is no PDF file.

ePdfError_NoXRef 

The PDF file has no or an invalid XRef table.

ePdfError_NoTrailer 

The PDF file has no or an invalid trailer.

ePdfError_NoNumber 

A number was expected in the PDF file, but the read string is no number.

ePdfError_NoObject 

A object was expected and non was found.

ePdfError_NoEOFToken 

The PDF file has no or an invalid EOF marker.

ePdfError_InvalidTrailerSize 

The trailer size is invalid.

ePdfError_InvalidLinearization 

The linearization directory of a web-optimized PDF file is invalid.

ePdfError_InvalidDataType 

The passed datatype is invalid or was not recognized

ePdfError_InvalidXRef 

The XRef table is invalid

ePdfError_InvalidXRefStream 

A XRef steam is invalid

ePdfError_InvalidXRefType 

The XRef type is invalid or was not found

ePdfError_InvalidPredictor 

Invalid or unimplemented predictor

ePdfError_InvalidStrokeStyle 

Invalid stroke style during drawing

ePdfError_InvalidHexString 

Invalid hex string

ePdfError_InvalidStream 

The stream is invalid

ePdfError_InvalidStreamLength 

The stream length is invlaid

ePdfError_InvalidKey 

The specified key is invalid

ePdfError_InvalidName 

The specified Name is not valid in this context

ePdfError_InvalidEncryptionDict 

The encryption dictionary is invalid or misses a required key

ePdfError_InvalidPassword 

The password used to open the PDF file was invalid

ePdfError_InvalidFontFile 

The font file is invalid

ePdfError_InvalidContentStream 

The content stream is invalid due to mismatched context pairing or other problems

ePdfError_UnsupportedFilter 

The requested filter is not yet implemented.

ePdfError_UnsupportedFontFormat 

This font format is not supported by PoDoFO.

ePdfError_ActionAlreadyPresent 

An Action was already present when trying to add a Destination

ePdfError_WrongDestinationType 

The requested field is not available for the given destination type

ePdfError_MissingEndStream 

The required token endstream was not found.

ePdfError_Date 

Date/time error

ePdfError_Flate 

Error in zlib

ePdfError_FreeType 

Error in FreeType

ePdfError_SignatureError 

Error in signature

ePdfError_MutexError 

Error during a mutex operation

ePdfError_UnsupportedImageFormat 

This image format is not supported by PoDoFO.

ePdfError_CannotConvertColor 

This color format cannot be converted.

ePdfError_NotImplemented 

This feature is currently not implemented.

ePdfError_DestinationAlreadyPresent 

An destination was already present when trying to add a Action

ePdfError_ChangeOnImmutable 

Changing values on immutable objects is not allowed.

ePdfError_Unknown 

Unknown error

The type of PDF field

Every filter that can be used to encode a stream in a PDF file is referenced by an own enum value. Common filters are ePdfFilter_FlateDecode (i.e. Zip) or ePdfFilter_ASCIIHexDecode

Enumerator:
ePdfFilter_ASCIIHexDecode 

Converts data from and to hexadecimal. Increases size of the data by a factor of 2!

See also:
PdfHexFilter
ePdfFilter_ASCII85Decode 

Converts to and from Ascii85 encoding.

See also:
PdfAscii85Filter
ePdfFilter_FlateDecode 

Compress data using the Flate algorithm of ZLib. This filter is recommended to be used always.

See also:
PdfFlateFilter
ePdfFilter_RunLengthDecode 

Run length decode data.

See also:
PdfRLEFilter

Enum for the different font formats supported by PoDoFo

The function type of a mathematical function in a PDF file.

Enumerator:
ePdfFunctionType_Sampled 

A sampled function (Type1)

ePdfFunctionType_Exponential 

An exponential interpolation function (Type2)

ePdfFunctionType_Stitching 

A stitching function (Type3)

ePdfFunctionType_PostScript 

A PostScript calculator function (Type4)

The possible highlighting modes for a PdfField. I.e the visual effect that is to be used when the mouse button is pressed.

The default value is ePdfHighlightingMode_Invert

Enumerator:
ePdfHighlightingMode_None 

Do no highlighting.

ePdfHighlightingMode_Invert 

Invert the PdfField.

ePdfHighlightingMode_InvertOutline 

Invert the fields border.

ePdfHighlightingMode_Push 

Display the fields down appearance (requires an additional appearance stream to be set)

Enum for line cap styles when drawing.

Enum for line join styles when drawing.

The title of an outline item can be displayed in different formating styles since PDF 1.4.

Enumerator:
ePdfOutlineFormat_Default 

Default format

ePdfOutlineFormat_Italic 

Italic

ePdfOutlineFormat_Bold 

Bold

ePdfOutlineFormat_BoldItalic 

Bold Italic

Enum holding the supported of types of "PageLayouts" that define how Acrobat will display the pages in relation to each other

See also:
PdfDocument

Enum holding the supported of types of "PageModes" that define which (if any) of the "panels" are opened in Acrobat when the document is opened.

See also:
PdfDocument

Enum holding the supported page sizes by PoDoFo. Can be used to construct a PdfRect structure with measurements of a page object.

See also:
PdfPage
Enumerator:
ePdfPageSize_A0 

DIN A0

ePdfPageSize_A1 

DIN A1

ePdfPageSize_A2 

DIN A2

ePdfPageSize_A3 

DIN A3

ePdfPageSize_A4 

DIN A4

ePdfPageSize_A5 

DIN A5

ePdfPageSize_A6 

DIN A6

ePdfPageSize_Letter 

Letter

ePdfPageSize_Legal 

Legal

ePdfPageSize_Tabloid 

Tabloid

Enum for the different stroke styles that can be set when drawing to a PDF file (mostly for line drawing).

Enum to identify diferent versions of the PDF file format

Enumerator:
ePdfVersion_1_0 

PDF 1.0

ePdfVersion_1_1 

PDF 1.1

ePdfVersion_1_2 

PDF 1.2

ePdfVersion_1_3 

PDF 1.3

ePdfVersion_1_4 

PDF 1.4

ePdfVersion_1_5 

PDF 1.5

ePdfVersion_1_6 

PDF 1.6

ePdfVersion_1_7 

PDF 1.7

Enum for vertical text alignment

Specify additional options for writing the PDF.

Enumerator:
ePdfWriteMode_Compact 

Try to write the PDF as compact as possible (Default)

ePdfWriteMode_Clean 

Create a PDF that is readable in a text editor, i.e. insert spaces and linebreaks between tokens.


Function Documentation

template<typename T >
const T PoDoFo::PDF_MAX ( const T  a,
const T  b 
)

PDF_MAX(x,y)

Returns:
the maximum of x and y
template<typename T >
const T PoDoFo::PDF_MIN ( const T  a,
const T  b 
)

PDF_MIN(x,y)

Returns:
the minimum of x and y
void PODOFO_API PoDoFo::PdfLocaleImbue ( std::ios_base &  )

Imbue the passed stream with a locale that will be safe to do I/O of the low level PDF format with.

PDF document structure I/O is done with the C++ standard library IOStreams code. By default, this will adapt to the current locale. That's not good at all when doing I/O of PDF data structures, which follow POSIX/english locale conventions irrespective of runtime locale. Make sure to to call this function on any stream you intend to use for PDF I/O. Avoid using this stream for anything that should be done in the regional locale.

Warning:
This method may throw ePdfError_InvalidDeviceOperation if your STL does not support the locale string in PdfIOLocale .

If you fail to call this on a stream you use for PDF I/O you will encounter problems like German and other European users getting numbers in the format "10110,4" or even "10.110,4" instead of "10110.4" .

PODOFO_API void PoDoFo::podofo_free ( void *  buffer)

Wrapper around free of the c-library used by PoDoFo.

Use this to free memory allocated inside of PoDoFo with podofo_malloc.

Check during runtime if the current architecture is big- or little-endian.

Returns:
true if the architecture is little-endian
PODOFO_API void * PoDoFo::podofo_malloc ( size_t  size)

Wrapper around malloc of the c-library used by PoDoFo.

Is used to allocate buffers inside of PoDoFo.

PODOFO_API void * PoDoFo::podofo_realloc ( void *  buffer,
size_t  size 
)

Wrapper around realloc of the c-library used by PoDoFo.


Variable Documentation

The default PDF Version used by new PDF documents in PoDoFo.