PoDoFo
0.9.6
|
Typedefs | |
typedef struct PoDoFo::MD5Context | MD5_CTX |
Structure representing an MD5 context while ecrypting. (For internal use only) | |
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_calloc (size_t nmemb, size_t size) |
void * | podofo_realloc (void *buffer, size_t size) |
void | podofo_free (void *buffer) |
bool | podofo_multiplication_overflow (size_t nmemb, size_t size) |
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. | |
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.
enum PoDoFo::ELogSeverity |
Used in PdfError::LogMessage to specify the log level.
enum PoDoFo::EPdfAction |
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.
An enum describing the type of a read token
enum PoDoFo::EPdfDataType |
Every PDF datatype that can occur in a PDF file is referenced by an own enum (e.g. Bool or String).
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.
|
ePdfDataType_HexString | HexString datatype in PDF file. Hex encoded strings have the form <AF00BE> in PDF files.
|
ePdfDataType_Name | Name datatype. Names are used as keys in dictionary to reference values.
|
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.
|
ePdfDataType_RawData | Raw PDF data |
ePdfDataType_Unknown | The Datatype is unknown. The value is chosen to enable value storage in 8-bit unsigned integer. |
Destination type, as per 12.3.2.2 of the Pdf spec.
(see table 151 in the pdf spec)
enum PoDoFo::EPdfError |
Error Code enum values 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().
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_BrokenFile | The file content is broken. |
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 none 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 invalid |
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 | A destination was already present when trying to add an Action |
ePdfError_ChangeOnImmutable | Changing values on immutable objects is not allowed. |
ePdfError_NotCompiled | This feature was disabled at compile time. |
ePdfError_OutlineItemAlreadyPresent | An outline item to be inserted was already in that outlines tree. |
ePdfError_NotLoadedForUpdate | The document had not been loaded for update. |
ePdfError_CannotEncryptedForUpdate | Cannot load encrypted documents for update. |
ePdfError_Unknown | Unknown error |
enum PoDoFo::EPdfField |
The type of PDF field
enum PoDoFo::EPdfFilter |
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_None | Do not use any filtering |
ePdfFilter_ASCIIHexDecode | Converts data from and to hexadecimal. Increases size of the data by a factor of 2!
|
ePdfFilter_ASCII85Decode | Converts to and from Ascii85 encoding.
|
ePdfFilter_FlateDecode | Compress data using the Flate algorithm of ZLib. This filter is recommended to be used always.
|
ePdfFilter_RunLengthDecode | Run length decode data.
|
enum PoDoFo::EPdfFontType |
Enum for the different font formats supported by PoDoFo
The function type of a mathematical function in a PDF file.
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
Enum for line cap styles when drawing.
Enum for line join styles when drawing.
Enum holding the supported of types of "PageLayouts" that define how Acrobat will display the pages in relation to each other
enum PoDoFo::EPdfPageMode |
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.
enum PoDoFo::EPdfPageSize |
Enum holding the supported page sizes by PoDoFo. Can be used to construct a PdfRect structure with measurements of a page object.
Enum for the different stroke styles that can be set when drawing to a PDF file (mostly for line drawing).
Enum for text rendering mode (Tr)
Enum for predefined tiling patterns.
enum PoDoFo::EPdfVersion |
Enum for vertical text alignment
const T PoDoFo::PDF_MAX | ( | const T | a, |
const T | b | ||
) |
PDF_MAX(x,y)
const T PoDoFo::PDF_MIN | ( | const T | a, |
const T | b | ||
) |
PDF_MIN(x,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.
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_calloc | ( | size_t | count, |
size_t | size | ||
) |
PODOFO_API void PoDoFo::podofo_free | ( | void * | buffer | ) |
bool PoDoFo::podofo_is_little_endian | ( | ) |
Check during runtime if the current architecture is big- or little-endian.
PODOFO_API void * PoDoFo::podofo_malloc | ( | size_t | size | ) |
PODOFO_API bool PoDoFo::podofo_multiplication_overflow | ( | size_t | nmemb, |
size_t | size | ||
) |
Check if multiplying two numbers will overflow. This is crucial when calculating buffer sizes that are the product of two numbers/
PODOFO_API void * PoDoFo::podofo_realloc | ( | void * | buffer, |
size_t | size | ||
) |
Wrapper around realloc of the c-library used by PoDoFo.
const EPdfVersion PoDoFo::ePdfVersion_Default = ePdfVersion_1_3 |
The default PDF Version used by new PDF documents in PoDoFo.