PoDoFo  1.0.0-dev
Classes | Typedefs | Enumerations | Functions | Variables
PoDoFo Namespace Reference

SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: MPL-2.0. More...

Classes

class  charbuff_t
 Convenient type for char array storage and/or buffer with std::string compatibility. More...
 
class  datahandle_t
 A const data provider that can hold a view to a static segments or a shared buffer. More...
 
class  InputStreamDevice
 This class represents an input device It optionally supports peeking. More...
 
class  InputStream
 An interface for reading blocks of data from a data source. More...
 
class  nullable
 Alternative to std::optional that supports reference (but not pointer) types. More...
 
class  OutputStream
 An interface for writing blocks of data to a data source. More...
 
class  Rect
 A rectangle defined by position and size. More...
 
class  StreamDevice
 This class provides an output device which operates either on a file or on a buffer in memory. More...
 
class  NullStreamDevice
 An StreamDevice device that does nothing. More...
 
class  PdfAction
 An action that can be performed in a PDF document. More...
 
struct  PdfAppearanceStream
 A qualified appearance stream, with type and state name. More...
 
class  PdfAnnotation
 An annotation to a PdfPage To create an annotation use PdfPage::CreateAnnotation. More...
 
class  PdfArrayIndirectIterableBase
 Helper class to iterate through array indirect objects. More...
 
class  PdfArray
 This class represents a PdfArray Use it for all arrays that are written to a PDF file. More...
 
class  PdfDataMember
 A class to inherit for classes that are stored as union members in a PdfVariant. More...
 
class  PdfDataProvider
 An helper class to inherit to provide common serialization methods. More...
 
class  PdfCanvas
 A interface that provides the necessary features for a painter to draw onto a PdfObject. More...
 
class  PdfCanvasInputDevice
 There are Pdfs spanning delimiters or begin/end tags into contents streams. More...
 
class  CodePointSpan
 A memory owning immutable block of code points, optimized for small segments as up to 3 elements can stay in the stack. More...
 
class  PdfCharCodeMap
 A bidirectional map from character code units to unspecified code points. More...
 
class  PdfCheckBox
 A checkbox can be checked or unchecked by the user. More...
 
class  PdChoiceField
 A list of items in a PDF file. More...
 
class  PdfCIDToGIDMap
 Helper class to handle the /CIDToGIDMap entry in a Type2 CID font or /TrueType fonts implicit CID to GID mapping. More...
 
class  PdfColor
 A color object can represent either a grayscale value, a RGB color, a CMYK color. More...
 
class  PdfColorSpaceInitializer
 A proxy class that can used to identify a color space choosing from several input types. More...
 
class  PdfColorSpaceFilter
 A class that implements methods to sample colors from a scanline buffer. More...
 
class  PdfColorSpaceFilterUnkown
 Unknown color space filter that default throws on implementations. More...
 
class  PdfColorSpaceFilterIndexed
 Color space as described by ISO 32000-2:2020 "8.6.6.3 Indexed colour spaces". More...
 
class  PdfColorSpaceFilterICCBased
 Color space as described by ISO 32000-2:2020 "8.6.5.5 ICCBased colour spaces". More...
 
class  PdfComboBox
 A combo box with a drop down list of items. More...
 
class  PdfContents
 A interface that provides a wrapper around "PDF content" - the instructions that are used to draw on the PDF "canvas". More...
 
class  PdfContentStreamOperators
 Pdf content stream callble operator interface ISO 32000 - 1:2008 "A.2 PDF Content Stream Operators". More...
 
struct  PdfContent
 Content as read from content streams. More...
 
class  PdfContentStreamReader
 Reader class to read content streams. More...
 
class  PdfData
 A datatype that allows to write arbitrary data to a PDF file. More...
 
class  PdfDataContainer
 A PdfDataProvider object with a PdfObject owner, specialized in holding objects. More...
 
class  PdfDate
 This class is a date datatype as specified in the PDF reference. More...
 
class  PdfDestination
 A destination in a PDF file. More...
 
class  PdfDictionaryIndirectIterableBase
 Helper class to iterate through indirect objects. More...
 
class  PdfDictionary
 The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such representations) Note: manipulation function accepts PdfName for the key, while getters accept std::string_view. More...
 
class  PdfDifferenceList
 A helper class for PdfDifferenceEncoding that can be used to create a differences array. More...
 
class  PdfDifferenceEncoding
 PdfDifferenceEncoding is an encoding, which is based on either the fonts encoding or a predefined encoding and defines differences to this base encoding. More...
 
class  PdfDocument
 PdfDocument is the core interface for working with PDF documents. More...
 
class  PdfElement
 PdfElement is a common base class for all elements in a PDF file. More...
 
class  PdfStringScanContext
 A PDF string context to iteratively scan a string and collect both CID and unicode codepoints. More...
 
class  PdfEncoding
 A PdfEncoding is in PdfFont to transform a text string into a representation so that it can be displayed in a PDF file. More...
 
struct  PdfCharCode
 A character code unit. More...
 
struct  PdfCID
 Represent a CID (Character ID) with full code unit information. More...
 
class  PdfEncodingFactory
 This factory creates a PdfEncoding from an existing object in the PDF. More...
 
class  PdfEncodingMap
 A PdfEncodingMap is a low level interface to convert between utf8 and encoded strings in and to determine correct CID mapping. More...
 
class  PdfEncodingMapBase
 Basic PdfEncodingMap implementation using a PdfCharCodeMap. More...
 
class  PdfEncodingMapOneByte
 PdfEncodingMap used by encodings like PdfBuiltInEncoding or PdfDifferenceEncoding that can define all their charset with a single one byte range. More...
 
class  PdfBuiltInEncoding
 A common base class for built-in encodings which are known by name. More...
 
class  PdfNullEncodingMap
 Dummy encoding map that will just throw exception. More...
 
class  PdfEncodingMapFactory
 This factory creates a PdfEncodingMap. More...
 
class  PdfEncrypt
 A class that is used to encrypt a PDF file and set document permissions on the PDF file. More...
 
class  PdfEncryptAESV2
 A class that is used to encrypt a PDF file (AES-128) More...
 
class  PdfEncryptRC4
 A class that is used to encrypt a PDF file (RC4 40-bit and 128-bit) More...
 
class  PdfEncryptSession
 A bundle of the encrypt object together a context. More...
 
class  PdfError
 The error handling class of the PoDoFo library. More...
 
class  PdfExtension
 PdfExtension is a simple class that describes a vendor-specific extension to the official specifications. More...
 
class  PdfExtGState
 This class wraps the ExtGState object used in the Resource Dictionary of a Content-supporting element (page, Pattern, etc.) The main usage is for transparency, but it also support a variety of prepress features. More...
 
class  PdfFileSpec
 A file specification is used in the PDF file to refer to another file. More...
 
class  PdfFont
 Before you can draw text on a PDF document, you have to create a font object first. More...
 
class  PdfFontCID
 A PdfFont that represents a CID-keyed font. More...
 
class  PdfFontCIDCFF
 A PdfFont that represents a CID-keyed font that has a CFF font backend (aka "CIDFontType0") More...
 
class  PdfFontCIDTrueType
 A PdfFont that represents a CID-keyed font that has a TrueType/OpenType font backend (aka "CIDFontType2") More...
 
class  PdfFontConfigWrapper
 This class initializes and destroys the FontConfig library. More...
 
class  PdfFontManager
 This class assists PdfDocument with caching font information. More...
 
class  PdfFontMetrics
 This abstract class provides access to font metrics information. More...
 
class  PdfFontMetricsStandard14
 This is the main class to handle the Standard14 metric data. More...
 
class  PdfFontSimple
 This is a common base class for simple, non CID-keyed fonts like Type1, TrueType and Type3. More...
 
class  PdfFontTrueType
 A PdfFont implementation that can be used to embed truetype fonts into a PDF file or to draw with truetype fonts. More...
 
class  PdfFontType1
 A PdfFont implementation that can be used to embed type1 fonts into a PDF file or to draw with type1 fonts. More...
 
class  PdfFontType3
 A PdfFont implementation that can be used to embed type3 fonts into a PDF file or to draw with type3 fonts. More...
 
class  PdfIdentityEncoding
 PdfIdentityEncoding is a two-byte encoding which can be used with TrueType fonts to represent all characters present in a font. More...
 
class  PdfImage
 A PdfImage object is needed when ever you want to embed an image file into a PDF document. More...
 
class  PdfIndirectObjectList
 A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will read the PdfFile into memory and create a PdfIndirectObjectList of all dictionaries found in the PDF file. More...
 
class  PdfInfo
 This class provides access to the documents info dictionary, which provides information about the PDF document. More...
 
class  PdfListBox
 A list box. More...
 
class  PdfMemDocument
 PdfMemDocument is the core class for reading and manipulating PDF files and writing them back to disk. More...
 
class  PdfMemoryObjectStream
 A PDF stream can be appended to any PdfObject and can contain arbitrary data. More...
 
class  PdfName
 This class represents a PdfName. More...
 
class  PdfNameTreeOperations
 A low level interface with operations to handle document name trees stored in the /Names element. More...
 
class  PdfNameTrees
 Interface to access names trees in the document. More...
 
class  PdfObject
 This class represents a PDF indirect Object in memory. More...
 
struct  Object
 Templatized object type getter helper. More...
 
class  PdfObjectStream
 A PDF stream can be appended to any PdfObject and can contain arbitrary data. More...
 
class  PdfOutlineItem
 A PDF outline item has an title and a destination. More...
 
class  PdfOutlines
 The main PDF outlines dictionary. More...
 
class  PdfPage
 PdfPage is one page in the pdf document. More...
 
class  PdfPageCollection
 Class for managing the tree of Pages in a PDF document Don't use this class directly. More...
 
class  PdfPainter
 This class provides an easy to use painter object which allows you to draw on a PDF page object. More...
 
class  PdfPainterPath
 This class describes PDF paths being written to a PdfPainter. More...
 
class  PdfPainterTextObject
 This class describes a manually handled PDF text object (content stream operators surrounded by BT . More...
 
class  PdfPostScriptTokenizer
 This class is a parser for general PostScript content in PDF documents. More...
 
class  PdfPredefinedEncoding
 A common base class for Pdf defined predefined encodings which are known by name. More...
 
class  PdfWinAnsiEncoding
 The WinAnsiEncoding is the default encoding in PoDoFo for contents on PDF pages. More...
 
class  PdfMacRomanEncoding
 MacRomanEncoding. More...
 
class  PdfMacExpertEncoding
 MacExpertEncoding. More...
 
class  PdfStandardEncoding
 StandardEncoding. More...
 
class  PdfSymbolEncoding
 Symbol Encoding. More...
 
class  PdfZapfDingbatsEncoding
 ZapfDingbats encoding. More...
 
class  PdfPredefinedToUnicodeCMap
 Represents a predefined ToUnicode CMap as the ones described in ISO 32000-2:2020 "9.10.2 Mapping character codes to Unicode values" that can be downloaded from https://github.com/adobe-type-tools/mapping-resources-pdf, folder "pdf2unicode". More...
 
class  PdfPushButton
 A push button is a button which has no state and value but can toggle actions. More...
 
class  PdfRadioButton
 A radio button TODO: This is just a stub. More...
 
class  PdfReference
 A reference is a pointer to a object in the PDF file of the form "4 0 R", where 4 is the object number and 0 is the generation number. More...
 
class  PdfResourceOperations
 Low level interface for resource handling operations Inherited by PdfResources. More...
 
class  PdfResources
 A interface that provides a wrapper around /Resources. More...
 
class  PdfSignerCms
 This class computes a CMS signature according to RFC 5652. More...
 
struct  PdfSigningResults
 Interchange signing procedure results. More...
 
class  PdfSigningContext
 A context that can be used to customize the signing process. More...
 
class  PdfStreamedDocument
 PdfStreamedDocument is the preferred class for creating new PDF documents. More...
 
class  PdfString
 A string that can be written to a PDF document. More...
 
class  PdfStringStream
 A specialized Pdf output string stream It supplies an iostream-like operator<< interface, while still inheriting OutputStream. More...
 
class  PdfTextBox
 A text field in a PDF file. More...
 
class  PdfTokenizer
 A simple tokenizer for PDF files and PDF content streams. More...
 
class  PdfVariant
 A variant data type which supports all data types supported by the PDF standard. More...
 
class  PdfXObject
 A XObject is a content stream with several drawing commands and data which can be used throughout a PDF document. More...
 
class  PdfNames
 A storage class for several known PdfName entries. More...
 

Typedefs

using bufferview = cspan< char >
 Convenient read-only char buffer span.
 
using bufferspan = mspan< char >
 Convenient writable char buffer span.
 
using unicodeview = cspan< char32_t >
 Unicode code point view.
 
using charbuff = charbuff_t<>
 
using datahandle = datahandle_t<>
 
template<class T , size_t Extent = tcb::dynamic_extent>
using cspan = tcb::span< const T, Extent >
 Constant span.
 
template<class T , size_t Extent = tcb::dynamic_extent, typename std::enable_if<!std::is_const_v< T >, int >::type = 0>
using mspan = tcb::span< T, Extent >
 Mutable span.
 
using VectorStreamDevice = ContainerStreamDevice< std::vector< char > >
 
using StringStreamDevice = ContainerStreamDevice< std::string >
 
using BufferStreamDevice = ContainerStreamDevice< charbuff >
 
using PdfArrayList = std::vector< PdfObject >
 
using PdfArrayIndirectIterable = PdfArrayIndirectIterableBase< PdfObject, PdfArrayList::iterator >
 
using PdfArrayConstIndirectIterable = PdfArrayIndirectIterableBase< const PdfObject, PdfArrayList::const_iterator >
 
using codepoint = char32_t
 A convenient typedef for an unspecified codepoint The underlying type is convenientely char32_t so it's a 32 bit fixed sized type that is also compatible with unicode code points.
 
using codepointview = cspan< codepoint >
 
using CodeUnitMap = std::unordered_map< PdfCharCode, CodePointSpan >
 
using CodeUnitRanges = std::set< CodeUnitRange, CodeUnitRangeInequality >
 
using PdfCIDToGIDMapConstPtr = std::shared_ptr< const PdfCIDToGIDMap >
 
using PdfCMapEncodingConstPtr = std::shared_ptr< const PdfCMapEncoding >
 Convenience typedef for a const CMap encoding shared ptr.
 
using PdfColorRaw = std::array< double, 6 >
 
using PdfColorSpaceFilterPtr = std::shared_ptr< const PdfColorSpaceFilter >
 Convenience alias for a constant PdfColorSpaceFilter shared ptr.
 
using LogMessageCallback = std::function< void(PdfLogSeverity logSeverity, const std::string_view &msg)>
 
using PdfInlineImageHandler = std::function< bool(const PdfDictionary &imageDict, InputStreamDevice &device)>
 Custom handler for inline images. More...
 
using Matrix2D = std::array< double, 6 >
 
using CIDToGIDMap = std::map< unsigned, unsigned >
 A backing storage for a CID to GID map. More...
 
using PdfFilterList = std::vector< PdfFilterType >
 
using PdfDictionaryIndirectIterable = PdfDictionaryIndirectIterableBase< PdfObject, PdfNameMap< PdfObject >::iterator >
 
using PdfDictionaryConstIndirectIterable = PdfDictionaryIndirectIterableBase< const PdfObject, PdfNameMap< PdfObject >::const_iterator >
 
using PdfDocumentFieldIterable = PdfDocumentFieldIterableBase< PdfField >
 
using PdfDocumentConstFieldIterable = PdfDocumentFieldIterableBase< const PdfField >
 
using PdfEncodingMapConstPtr = std::shared_ptr< const PdfEncodingMap >
 Convenience typedef for a const /Encoding map entry shared ptr.
 
using PdfBuiltInEncodingConstPtr = std::shared_ptr< const PdfBuiltInEncoding >
 Convenience typedef for a const /Encoding map entry shared ptr.
 
using PdfToUnicodeMapConstPtr = std::shared_ptr< const PdfEncodingMap >
 Convenience alias for a const /ToUnicode CMap entry shared ptr.
 
using PdErrorInfoStack = std::deque< PdfErrorInfo >
 
using UsedGIDsMap = std::map< unsigned, PdfCID >
 
using PdfFontMetricsConstPtr = std::shared_ptr< const PdfFontMetrics >
 Convenience typedef for a const PdfEncoding shared ptr.
 
using PdfFreeObjectList = std::deque< PdfReference >
 
template<typename TValue >
using PdfNameMap = std::map< PdfName, TValue, PdfNameInequality >
 
template<typename TValue >
using PdfNameHashMap = std::unordered_map< PdfName, TValue, PdfNameHashing, PdfNameEquality >
 
using PdfDestinations = PdfNameTree< PdfDestination >
 
using PdfEmbeddedFiles = PdfNameTree< PdfFileSpec >
 
using PdfPageFieldIterable = PdfPageFieldIterableBase< PdfField >
 
using PdfPageConstFieldIterable = PdfPageFieldIterableBase< const PdfField >
 
using PdfPainterStateStack = StateStack< PdfPainterState >
 
using PdfSigningService = std::function< void(bufferview hashToSign, bool dryrun, charbuff &signedHash)>
 
using PdfSignedHashHandler = std::function< void(bufferview signedhHash, bool dryrun)>
 
template<typename TValue >
using PdfStringMap = std::map< PdfString, TValue, PdfStringInequality >
 
template<typename TValue >
using PdfStringHashMap = std::unordered_map< PdfString, TValue, PdfStringHashing, PdfStringEquality >
 

Enumerations

enum class  AlgebraicTrait { Tx , Ty }
 
enum class  FileMode {
  CreateNew = 1 , Create , Open , OpenOrCreate ,
  Truncate , Append
}
 
enum class  DeviceAccess : uint8_t { Read = 1 , Write = 2 , ReadWrite = Read | Write }
 
enum class  SeekDirection : uint8_t { Begin = 0 , Current , End }
 
enum class  PdfAcroFormDefaulAppearance { None = 0 , ArialBlack }
 
enum class  PdfActionType {
  Unknown = 0 , GoTo , GoToR , GoToE ,
  Launch , Thread , URI , Sound ,
  Movie , Hide , Named , SubmitForm ,
  ResetForm , ImportData , JavaScript , SetOCGState ,
  Rendition , Trans , GoTo3DView , RichMediaExecute
}
 The type of the action. More...
 
enum class  PdfStreamAppendFlags { None = 0 , Prepend = 1 , NoSaveRestorePrior = 2 }
 
enum class  PdfColorSpacePixelFormat { Unknown = 0 , Grayscale , RGB , CMYK }
 Output pixel format for a PdfColorSpaceFilter.
 
enum class  PdfContentType {
  Unknown = 0 , Operator , ImageDictionary , ImageData ,
  DoXObject , BeginFormXObject , EndFormXObject , UnexpectedKeyword
}
 Type of the content read from a content stream. More...
 
enum class  PdfContentWarnings {
  None = 0 , InvalidOperator = 1 , SpuriousStackContent = 2 , InvalidXObject = 4 ,
  RecursiveXObject = 8 , InvalidImageDictionaryContent = 16 , MissingEndImage = 32
}
 
enum class  PdfContentReaderFlags { None = 0 , ThrowOnWarnings = 1 , SkipFollowFormXObjects = 2 , SkipHandleNonFormXObjects = 4 }
 
enum class  PdfLogSeverity : uint8_t {
  None = 0 , Error , Warning , Information ,
  Debug
}
 Used in PoDoFo::LogMessage to specify the log level. More...
 
enum class  PdfVersion : uint8_t {
  Unknown = 0 , V1_0 = 10 , V1_1 = 11 , V1_2 = 12 ,
  V1_3 = 13 , V1_4 = 14 , V1_5 = 15 , V1_6 = 16 ,
  V1_7 = 17 , V2_0 = 20
}
 Enum to identify different versions of the PDF file format. More...
 
enum class  PdfALevel : uint8_t {
  Unknown = 0 , L1B , L1A , L2B ,
  L2A , L2U , L3B , L3A ,
  L3U , L4E , L4F
}
 
enum class  PdfStringCharset : uint8_t { Unknown = 0 , Ascii , PdfDocEncoding , Unicode }
 
enum class  PdfEncodingMapType : uint8_t { Indeterminate = 0 , Simple , CMap }
 
enum class  PdfPredefinedEncodingType : uint8_t { Indeterminate = 0 , LegacyPredefined , PredefinedCMap , IdentityCMap }
 
enum class  PdfWModeKind : uint8_t { Horizontal = 0 , Vertical = 1 }
 
enum class  PdfWriteFlags {
  None = 0 , Clean = 1 , NoInlineLiteral = 2 , NoFlateCompress = 4 ,
  PdfAPreserve = 8 , SkipDelimiters = 16
}
 Specify additional options for writing the PDF. More...
 
enum class  PdfDataType : uint8_t {
  Unknown = 0 , Bool , Number , Real ,
  String , Name , Array , Dictionary ,
  Null , Reference , RawData
}
 Every PDF datatype that can occur in a PDF file is referenced by an own enum (e.g. More...
 
enum class  PdfTextExtractFlags {
  None = 0 , IgnoreCase = 1 , KeepWhiteTokens = 2 , TokenizeWords = 4 ,
  MatchWholeWord = 8 , RegexPattern = 16 , ComputeBoundingBox = 32 , RawCoordinates = 64 ,
  ExtractSubstring = 128
}
 
enum class  PdfXObjectType : uint8_t { Unknown = 0 , Form , Image , PostScript }
 
enum class  PdfFilterType : uint8_t {
  None = 0 , ASCIIHexDecode , ASCII85Decode , LZWDecode ,
  FlateDecode , RunLengthDecode , CCITTFaxDecode , JBIG2Decode ,
  DCTDecode , JPXDecode , Crypt
}
 Every filter that can be used to encode a stream in a PDF file is referenced by an own enum value. More...
 
enum class  PdfExportFormat { Png = 1 , Jpeg = 2 }
 
enum class  PdfFontDescriptorFlags : uint32_t {
  None = 0 , FixedPitch = 1 << 0 , Serif = 1 << 1 , Symbolic = 1 << 2 ,
  Script = 1 << 3 , NonSymbolic = 1 << 5 , Italic = 1 << 6 , AllCap = 1 << 16 ,
  SmallCap = 1 << 17 , ForceBold = 1 << 18
}
 Enum for the font descriptor flags. More...
 
enum class  PdfFontStretch : uint8_t {
  Unknown = 0 , UltraCondensed , ExtraCondensed , Condensed ,
  SemiCondensed , Normal , SemiExpanded , Expanded ,
  ExtraExpanded , UltraExpanded
}
 
enum class  PdfFontType : uint8_t {
  Unknown = 0 , Type1 , Type3 , TrueType ,
  CIDCFF , CIDTrueType
}
 Enum specifying the type of the font. More...
 
enum class  PdfFontFileType : uint8_t {
  Unknown = 0 , Type1 , Type1CFF , CIDKeyedCFF ,
  Type3 , TrueType , OpenTypeCFF
}
 
enum class  PdfFontStyle : uint8_t { None = 0 , Italic = 1 , Bold = 2 , Regular = None }
 Font style flags used during searches.
 
enum class  PdfGlyphAccess : uint8_t { Width = 1 , FontProgram = 2 }
 When accessing a glyph, there may be a difference in the glyph ID to retrieve the width or to index it within the font program. More...
 
enum class  PdfFontAutoSelectBehavior : uint8_t { None = 0 , Standard14 = 1 , Standard14Alt = 2 }
 Flags to control font creation. More...
 
enum class  PdfFontCreateFlags { None = 0 , DontEmbed = 1 , DontSubset = 2 , PreferNonCID = 4 }
 Font init flags. More...
 
enum class  PdfFontMatchBehaviorFlags : uint8_t { None , NormalizePattern = 1 , SkipMatchPostScriptName = 2 }
 
enum class  PdfColorSpaceType : uint8_t {
  Unknown = 0 , DeviceGray , DeviceRGB , DeviceCMYK ,
  CalGray , CalRGB , Lab , ICCBased ,
  Indexed , Pattern , Separation , DeviceN
}
 Enum for the colorspaces supported by PDF. More...
 
enum class  PdfPixelFormat {
  Unknown = 0 , Grayscale , RGB24 , BGR24 ,
  RGBA , BGRA , ARGB , ABGR
}
 
enum class  PdfTextRenderingMode {
  Fill = 0 , Stroke , FillStroke , Invisible ,
  FillAddToClipPath , StrokeAddToClipPath , FillStrokeAddToClipPath , AddToClipPath
}
 Enum for text rendering mode (Tr) More...
 
enum class  PdfStrokeStyle {
  Solid , Dash , Dot , DashDot ,
  DashDotDot
}
 Enum for the different stroke styles that can be set when drawing to a PDF file (mostly for line drawing).
 
enum class  PdfInfoInitial { None = 0 , WriteCreationTime = 1 , WriteModificationTime = 2 , WriteProducer = 4 }
 Enum to specify the initial information of the info dictionary. More...
 
enum class  PdfLineCapStyle { Butt = 0 , Round = 1 , Square = 2 }
 Enum for line cap styles when drawing.
 
enum class  PdfLineJoinStyle { Miter = 0 , Round = 1 , Bevel = 2 }
 Enum for line join styles when drawing.
 
enum class  PdfVerticalAlignment { Top = 0 , Center = 1 , Bottom = 2 }
 Enum for vertical text alignment.
 
enum class  PdfHorizontalAlignment { Left = 0 , Center = 1 , Right = 2 }
 Enum for text alignment.
 
enum class  PdfSaveOptions {
  None = 0 , _Reserved1 = 1 , _Reserved2 = 2 , NoFlateCompress = 4 ,
  NoCollectGarbage = 8 , NoMetadataUpdate = 16 , Clean = 32 , SaveOnSigning = 64 ,
  NoModifyDateUpdate = NoMetadataUpdate
}
 
enum class  PdfPageSize {
  Unknown = 0 , A0 , A1 , A2 ,
  A3 , A4 , A5 , A6 ,
  Letter , Legal , Tabloid
}
 Enum holding the supported page sizes by PoDoFo. More...
 
enum class  PdfPageMode {
  DontCare , UseNone , UseThumbs , UseBookmarks ,
  FullScreen , UseOC , UseAttachments
}
 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. More...
 
enum class  PdfPageLayout {
  Ignore , Default , SinglePage , OneColumn ,
  TwoColumnLeft , TwoColumnRight , TwoPageLeft , TwoPageRight
}
 Enum holding the supported of types of "PageLayouts" that define how Acrobat will display the pages in relation to each other. More...
 
enum class  PdfStandard14FontType {
  Unknown = 0 , TimesRoman , TimesItalic , TimesBold ,
  TimesBoldItalic , Helvetica , HelveticaOblique , HelveticaBold ,
  HelveticaBoldOblique , Courier , CourierOblique , CourierBold ,
  CourierBoldOblique , Symbol , ZapfDingbats
}
 
enum class  PdfAnnotationType : uint8_t {
  Unknown = 0 , Text , Link , FreeText ,
  Line , Square , Circle , Polygon ,
  PolyLine , Highlight , Underline , Squiggly ,
  StrikeOut , Stamp , Caret , Ink ,
  Popup , FileAttachement , Sound , Movie ,
  Widget , Screen , PrinterMark , TrapNet ,
  Watermark , Model3D , RichMedia , WebMedia ,
  Redact , Projection
}
 The type of the annotation. More...
 
enum class  PdfAnnotationFlags : uint32_t {
  None = 0x0000 , Invisible = 0x0001 , Hidden = 0x0002 , Print = 0x0004 ,
  NoZoom = 0x0008 , NoRotate = 0x0010 , NoView = 0x0020 , ReadOnly = 0x0040 ,
  Locked = 0x0080 , ToggleNoView = 0x0100 , LockedContents = 0x0200
}
 Flags that control the appearance of a PdfAnnotation. More...
 
enum class  PdfFieldType : uint32_t {
  Unknown = 0 , PushButton , CheckBox , RadioButton ,
  TextBox , ComboBox , ListBox , Signature
}
 The type of PDF field.
 
enum class  PdfHighlightingMode {
  Unknown = 0 , None , Invert , InvertOutline ,
  Push
}
 The possible highlighting modes for a PdfField. More...
 
enum class  PdfFieldFlags : uint8_t { ReadOnly = 1 , Required = 2 , NoExport = 4 }
 
enum class  PdfAppearanceType { Normal = 0 , Rollover , Down }
 Type of the annotation appearance. More...
 
enum class  PdfResourceType {
  Unknown = 0 , ExtGState , ColorSpace , Pattern ,
  Shading , XObject , Font , Properties
}
 
enum class  PdfKnownNameTree {
  Unknown = 0 , Dests , AP , JavaScript ,
  Pages , Templates , IDS , URLS ,
  EmbeddedFiles , AlternatePresentations , Renditions
}
 
enum class  PdfOperator {
  Unknown = 0 , w , J , j ,
  M , d , ri , i ,
  gs , q , Q , cm ,
  m , l , c , v ,
  y , h , re , S ,
  s , f , F , f_Star ,
  B , B_Star , b , b_Star ,
  n , W , W_Star , BT ,
  ET , Tc , Tw , Tz ,
  TL , Tf , Tr , Ts ,
  Td , TD , Tm , T_Star ,
  Tj , TJ , Quote , DoubleQuote ,
  d0 , d1 , CS , cs ,
  SC , SCN , sc , scn ,
  G , g , RG , rg ,
  K , k , sh , BI ,
  ID , EI , Do , MP ,
  DP , BMC , BDC , EMC ,
  BX , EX
}
 List of PDF stream content operators.
 
enum class  PdfRenderingIntent {
  Unknown = 0 , AbsoluteColorimetric , RelativeColorimetric , Perceptual ,
  Saturation
}
 List of defined Rendering intents.
 
enum class  PdfBlendMode {
  Unknown = 0 , Normal , Multiply , Screen ,
  Overlay , Darken , Lighten , ColorDodge ,
  ColorBurn , HardLight , SoftLight , Difference ,
  Exclusion , Hue , Saturation , Color ,
  Luminosity
}
 List of defined transparency blending modes.
 
enum class  PdfSignatureType { Unknown = 0 , PAdES_B = 1 , Pkcs7 = 2 }
 
enum class  PdfSignatureEncryption { Unknown = 0 , RSA }
 
enum class  PdfHashingAlgorithm { Unknown = 0 , SHA256 , SHA384 , SHA512 }
 
enum class  PdfDestinationFit {
  Unknown = 0 , Fit , FitH , FitV ,
  FitB , FitBH , FitBV
}
 
enum class  PdfDestinationType {
  Unknown = 0 , XYZ , Fit , FitH ,
  FitV , FitR , FitB , FitBH ,
  FitBV
}
 Destination type, as per 12.3.2.2 of the Pdf spec. More...
 
enum class  PdfKeyLength : uint16_t {
  Unknown = 0 , L40 = 40 , L48 = 48 , L56 = 56 ,
  L64 = 64 , L72 = 72 , L80 = 80 , L88 = 88 ,
  L96 = 96 , L104 = 104 , L112 = 112 , L120 = 120 ,
  L128 = 128
}
 A enum specifying a valid keylength for a PDF encryption key.
 
enum class  PdfPermissions : uint32_t {
  None = 0 , Print = 0x00000004 , Edit = 0x00000008 , Copy = 0x00000010 ,
  EditNotes = 0x00000020 , FillAndSign = 0x00000100 , Accessible = 0x00000200 , DocAssembly = 0x00000400 ,
  HighPrint = 0x00000800 , Default
}
 Set user permissions/restrictions on a document. More...
 
enum class  PdfEncryptionAlgorithm : uint8_t { None = 0 , RC4V1 = 1 , RC4V2 = 2 , AESV2 = 4 }
 The encryption algorithm. More...
 
enum class  PdfAuthResult : uint8_t { Unkwnon = 0 , Failed , User , Owner }
 
enum class  PdfErrorCode {
  Unknown = 0 , InvalidHandle , FileNotFound , IOError ,
  UnexpectedEOF , OutOfMemory , ValueOutOfRange , InternalLogic ,
  InvalidEnumValue , MaxRecursionReached , ObjectNotFound , BrokenFile ,
  InvalidPDF , InvalidTrailer , InvalidNumber , InvalidEncoding ,
  InvalidObject , InvalidEOFToken , InvalidDataType , InvalidXRef ,
  InvalidXRefStream , InvalidPredictor , InvalidStrokeStyle , InvalidStream ,
  InvalidKey , InvalidName , InvalidEncryptionDict , InvalidPassword ,
  InvalidFontData , InvalidContentStream , UnsupportedFilter , UnsupportedFontFormat ,
  WrongDestinationType , FlateError , FreeTypeError , UnsupportedPixelFormat ,
  UnsupportedImageFormat , CannotConvertColor , NotImplemented , ItemAlreadyPresent ,
  ChangeOnImmutable , XmpMetadataError , OpenSSLError
}
 Error Code enum values which are used in PdfError to describe the error. More...
 
enum class  PdfFontConfigSearchFlags : uint8_t { None = 0 , SkipMatchPostScriptName = 1 }
 
enum class  PdfIdentityOrientation : uint8_t { Unkwnown = 0 , Horizontal , Vertical }
 Orientation for predefined CID identity encodings.
 
enum class  PdfOutlineFormat { Default = 0 , Italic = 1 , Bold = 2 , BoldItalic = 3 }
 The title of an outline item can be displayed in different formatting styles since PDF 1.4. More...
 
enum class  PdfPainterFlags {
  None = 0 , Prepend = 1 , NoSaveRestorePrior = 2 , NoSaveRestore = 4 ,
  RawCoordinates = 8
}
 
enum class  PdfPathDrawMode {
  Stroke = 1 , Fill = 2 , StrokeFill = 3 , FillEvenOdd = 4 ,
  StrokeFillEvenOdd = 5
}
 An enum describing modes to draw paths and figures. More...
 
enum class  PdfDrawTextStyle { Regular = 0 , StrikeThrough = 1 , Underline = 2 }
 
enum class  PdfPostScriptTokenType {
  Unknown = 0 , Keyword , Variant , ProcedureEnter ,
  ProcedureExit
}
 An enum describing the type of a read token. More...
 
enum class  PdfCertPermission { NoPerms = 1 , FormFill = 2 , Annotations = 3 }
 
enum class  PdfSignerCmsFlags { None = 0 , ServiceDoWrapDigest = 1 , ServiceDoDryRun = 2 }
 
enum class  PdfSignatureAttributeFlags { None = 0 , SignedAttribute = 1 , AsOctetString = 2 }
 
enum class  PdfTokenType {
  Unknown = 0 , Literal , ParenthesisLeft , ParenthesisRight ,
  BraceLeft , BraceRight , AngleBracketLeft , AngleBracketRight ,
  DoubleAngleBracketsLeft , DoubleAngleBracketsRight , SquareBracketLeft , SquareBracketRight ,
  Slash
}
 
enum class  PdfPostScriptLanguageLevel { L1 = 1 , L2 = 2 }
 

Functions

template<typename = void>
bool operator== (const charbuff_t<> &lhs, const char *rhs)
 
template<typename = void>
bool operator== (const char *lhs, const charbuff_t<> &rhs)
 
template<typename = void>
bool operator== (const charbuff_t<> &lhs, const bufferview &rhs)
 
template<typename = void>
bool operator== (const bufferview &lhs, const charbuff_t<> &rhs)
 
template<typename = void>
bool operator== (const charbuff_t<> &lhs, const std::string_view &rhs) noexcept
 
template<typename = void>
bool operator== (const std::string_view &lhs, const charbuff_t<> &rhs) noexcept
 
template<typename = void>
bool operator== (const charbuff_t<> &lhs, const std::string &rhs) noexcept
 
template<typename = void>
bool operator== (const std::string &lhs, const charbuff_t<> &rhs) noexcept
 
template<typename T2 >
bool operator== (const nullable< T2 > &lhs, const nullable< T2 > &rhs)
 
template<typename T2 >
bool operator!= (const nullable< T2 > &lhs, const nullable< T2 > &rhs)
 
template<typename T2 >
bool operator== (const nullable< std::decay_t< T2 >> &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator!= (const nullable< std::decay_t< T2 >> &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator== (const nullable< T2 & > &lhs, const nullable< std::decay_t< T2 >> &rhs)
 
template<typename T2 >
bool operator!= (const nullable< T2 & > &lhs, const nullable< std::decay_t< T2 >> &rhs)
 
template<typename T2 >
bool operator== (const nullable< T2 & > &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator!= (const nullable< T2 & > &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator== (const nullable< T2 & > &lhs, const std::decay_t< T2 > &rhs)
 
template<typename T2 >
bool operator!= (const nullable< T2 & > &lhs, const std::decay_t< T2 > &rhs)
 
template<typename T2 >
bool operator== (const std::decay_t< T2 > &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator!= (const std::decay_t< T2 > &lhs, const nullable< T2 & > &rhs)
 
template<typename T2 >
bool operator== (const nullable< T2 > &lhs, const T2 &rhs)
 
template<typename T2 >
bool operator!= (const nullable< T2 > &lhs, const T2 &rhs)
 
template<typename T2 >
bool operator== (const T2 &lhs, const nullable< T2 > &rhs)
 
template<typename T2 >
bool operator!= (const T2 &lhs, const nullable< T2 > &rhs)
 
template<typename T2 >
bool operator== (const nullable< T2 > &lhs, std::nullptr_t)
 
template<typename T2 >
bool operator!= (const nullable< T2 > &lhs, std::nullptr_t)
 
template<typename T2 >
bool operator== (std::nullptr_t, const nullable< T2 > &rhs)
 
template<typename T2 >
bool operator!= (std::nullptr_t, const nullable< T2 > &rhs)
 
Matrix PODOFO_API GetFrameRotationTransform (const Rect &rect, double teta)
 Get a rotation transformation that aligns the rectangle to the axis after the rotation.
 
Matrix PODOFO_API GetFrameRotationTransformInverse (const Rect &rect, double teta)
 Get an inverse rotation transformation that aligns the rectangle to the axis after the rotation.
 
Rect PODOFO_API TransformRectPage (const Rect &rect, const PdfPage &page, bool inputIsTransformed)
 Transform the given rect accordingly to the page rotation. More...
 
PdfName operator""_n (const char *name, size_t length)
 Create a PdfName from a string literal without checking for PdfDocEncoding characters. More...
 
PODOFO_API PdfOperator GetPdfOperator (const std::string_view &opstr)
 
PODOFO_API bool TryGetPdfOperator (const std::string_view &opstr, PdfOperator &op)
 
PODOFO_API int GetOperandCount (PdfOperator op)
 Get the operands count of the operator. More...
 
PODOFO_API bool TryGetOperandCount (PdfOperator op, int &count)
 Get the operands count of the operator. More...
 
PODOFO_API std::string_view GetPdfOperatorName (PdfOperator op)
 
PODOFO_API bool TryGetPdfOperatorName (PdfOperator op, std::string_view &opstr)
 
PODOFO_API void SignDocument (PdfMemDocument &doc, StreamDevice &device, PdfSigner &signer, PdfSignature &signature, PdfSaveOptions saveOptions=PdfSaveOptions::None)
 Sign the document on the given signature field. More...
 
template<typename T >
std::string_view ToString (T value)
 
template<typename T >
bool TryConvertTo (const std::string_view &str, T &value)
 
template<typename T >
ConvertTo (const std::string_view &str)
 

Variables

template<class... T>
constexpr bool always_false = false
 
constexpr AlgebraicTrait Tx = AlgebraicTrait::Tx
 X Translation trait.
 
constexpr AlgebraicTrait Ty = AlgebraicTrait::Ty
 X Translation trait.
 
constexpr PdfVersion PdfVersionDefault = PdfVersion::V1_4
 The default PDF Version used by new PDF documents in PoDoFo.
 

Detailed Description

SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: MPL-2.0.

SPDX-FileCopyrightText: (C) 2007 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2023 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2023 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: MPL-2.0.

SPDX-FileCopyrightText: (C) 2011 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2011 Petr Pytelka SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2007 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2021 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2006 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2021 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2006 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2024 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2010 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2008 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2011 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2006 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-License-Identifier: LGPL-2.0-or-later.

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

SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2021 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: MPL-2.0.

SPDX-FileCopyrightText: (C) 2007 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

SPDX-FileCopyrightText: (C) 2006 Dominik Seichter domse.nosp@m.icht.nosp@m.er@we.nosp@m.b.de SPDX-FileCopyrightText: (C) 2020 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later.

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

Typedef Documentation

◆ CIDToGIDMap

using PoDoFo::CIDToGIDMap = typedef std::map<unsigned, unsigned>

A backing storage for a CID to GID map.

Remarks
It must preserve ordering

◆ PdfInlineImageHandler

using PoDoFo::PdfInlineImageHandler = typedef std::function<bool(const PdfDictionary& imageDict, InputStreamDevice& device)>

Custom handler for inline images.

Parameters
imageDictdictionary for the inline image
Returns
false if EOF

Enumeration Type Documentation

◆ AlgebraicTrait

Enumerator
Tx 

X Translation.

Ty 

Y Translation.

◆ FileMode

enum PoDoFo::FileMode
strong
Enumerator
CreateNew 

Create a new file (throw if existing) for writing/reading.

Create 

Create a new file or truncate existing one for writing/reading.

Open 

Open an existing file for reading and/or writing.

OpenOrCreate 

Open an existing file or create a new one for writing/reading.

Truncate 

Truncate an existing file for writing/reading.

Append 

Open an existing file and seek to the end for writing.

◆ PdfAcroFormDefaulAppearance

Enumerator
None 

Do not add a default appearrance.

ArialBlack 

Add a default appearance with Arial embedded and black text if no other DA key is present.

◆ PdfActionType

enum PoDoFo::PdfActionType
strong

The type of the action.

PDF supports different action types, each of them has different keys and properties.

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.

◆ PdfAnnotationFlags

enum PoDoFo::PdfAnnotationFlags : uint32_t
strong

Flags that control the appearance of a PdfAnnotation.

You can OR them together and pass it to PdfAnnotation::SetFlags.

◆ PdfAnnotationType

enum PoDoFo::PdfAnnotationType : uint8_t
strong

The type of the annotation.

PDF supports different annotation types, each of them has different keys and properties.

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.

◆ PdfAppearanceType

Type of the annotation appearance.

Enumerator
Normal 

Normal appearance.

Rollover 

Rollover appearance; the default is PdfAnnotationAppearance::Normal.

Down 

Down appearance; the default is PdfAnnotationAppearance::Normal.

◆ PdfAuthResult

enum PoDoFo::PdfAuthResult : uint8_t
strong
Enumerator
Failed 

Failed to authenticate to this PDF.

User 

Success authenticating a user for this PDF.

Owner 

Success authenticating the owner for this PDF.

◆ PdfColorSpaceType

enum PoDoFo::PdfColorSpaceType : uint8_t
strong

Enum for the colorspaces supported by PDF.

Enumerator
Lab 

CIE-Lab.

◆ PdfContentReaderFlags

Enumerator
SkipFollowFormXObjects 

Don't follow Form XObject.

SkipHandleNonFormXObjects 

Don't handle non Form XObjects (PdfImage, PdfXObjectPostScript). Doesn't influence traversing of Form XObject(s)

◆ PdfContentType

Type of the content read from a content stream.

Enumerator
Operator 

The token is a PDF operator.

ImageDictionary 

Inline image dictionary.

ImageData 

Raw inline image data found between ID and EI tags (see PDF ref section 4.8.6)

DoXObject 

Issued when a Do operator is found and it is handled by the reader. NOTE: for Form XObjects BeginFormXObject is issued instead, unless PdfContentReaderFlags::SkipFollowFormXObject is used.

BeginFormXObject 

Issued when a Form XObject is being followed.

EndFormXObject 

Issued when a Form XObject has just been followed.

UnexpectedKeyword 

An unexpected keyword that can be a custom operator or invalid PostScript content

◆ PdfContentWarnings

Enumerator
InvalidOperator 

Unknown operator or insufficient operand count. Applies to Operator.

SpuriousStackContent 

Operand count for the operator are more than necessary.

InvalidXObject 

Invalid or not found XObject.

RecursiveXObject 

Recursive XObject call detected. Applies to DoXObject.

InvalidImageDictionaryContent 

Found invalid content while reading inline image dictionary. Applies to ImageDictionary.

MissingEndImage 

Missing end inline image EI operator.

◆ PdfDataType

enum PoDoFo::PdfDataType : uint8_t
strong

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
Unknown 

The Datatype is unknown. The value is chosen to enable value storage in 8-bit unsigned integer.

Bool 

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

Number 

Number datatype for integer values.

Real 

Real datatype for floating point numbers.

String 

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

See also
PdfString
Name 

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

See also
PdfName
Array 

An array of other PDF data types.

Dictionary 

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

Null 

The null datatype is always null.

Reference 

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

See also
PdfObject
RawData 

Raw PDF data.

◆ PdfDestinationType

Destination type, as per 12.3.2.2 of the Pdf spec.

(see table 151 in the pdf spec)

◆ PdfEncodingMapType

enum PoDoFo::PdfEncodingMapType : uint8_t
strong
Enumerator
Indeterminate 

Indeterminate map type, such as non standard identity encodings.

Simple 

A legacy encoding, such as predefined, Type1 font built-in, or difference.

CMap 

A proper CMap encoding or pre-defined CMap names.

◆ PdfEncryptionAlgorithm

enum PoDoFo::PdfEncryptionAlgorithm : uint8_t
strong

The encryption algorithm.

Enumerator
RC4V1 

RC4 Version 1 encryption using a 40bit key.

RC4V2 

RC4 Version 2 encryption using a key with 40-128bit.

AESV2 

AES encryption with a 128 bit key (PDF1.6)

◆ PdfErrorCode

enum PoDoFo::PdfErrorCode
strong

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().

See also
PdfError
Enumerator
Unknown 

Unknown error.

InvalidHandle 

Unexpected null pointer or invalid state.

FileNotFound 

A file was not found or cannot be opened.

IOError 

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

UnexpectedEOF 

End of file was reached but data was expected.

OutOfMemory 

Not enough memory to complete an operation.

ValueOutOfRange 

The specified memory is out of the allowed range.

InternalLogic 

An internal sanity check or assertion failed.

InvalidEnumValue 

An invalid enum value was specified.

MaxRecursionReached 

Reached maximum recursion depth.

ObjectNotFound 

An object was requested but was not found.

BrokenFile 

The file content is broken.

InvalidPDF 

The file is no PDF file.

InvalidTrailer 

The PDF file has no or an invalid trailer.

InvalidNumber 

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

InvalidEncoding 

Invalid encoding information.

InvalidObject 

Invalid object or none none was found.

InvalidEOFToken 

The PDF file has no or an invalid EOF marker.

InvalidDataType 

The passed datatype is invalid or was not recognized.

InvalidXRef 

The XRef table is invalid.

InvalidXRefStream 

A XRef stream is invalid.

InvalidPredictor 

Invalid or unimplemented predictor.

InvalidStrokeStyle 

Invalid stroke style during drawing.

InvalidStream 

The stream is invalid.

InvalidKey 

The specified key is invalid.

InvalidName 

The specified Name is not valid in this context.

InvalidEncryptionDict 

The encryption dictionary is invalid or misses a required key.

InvalidPassword 

The password used to open the PDF file was invalid.

InvalidFontData 

The font file is invalid.

InvalidContentStream 

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

UnsupportedFilter 

The requested filter is not yet implemented.

UnsupportedFontFormat 

This font format is not supported by PoDoFo.

WrongDestinationType 

The requested field is not available for the given destination type.

FlateError 

Error in zlib.

FreeTypeError 

Error in FreeType.

UnsupportedPixelFormat 

This pixel format is not supported by PoDoFo.

UnsupportedImageFormat 

This image format is not supported by PoDoFo.

CannotConvertColor 

This color format cannot be converted.

NotImplemented 

This feature is currently not implemented.

ItemAlreadyPresent 

An item to be inserted is already in this container.

ChangeOnImmutable 

Changing values on immutable objects is not allowed.

XmpMetadataError 

Error while creating or reading XMP metadata.

OpenSSLError 

OpenSSL error.

◆ PdfExportFormat

Enumerator
Png 

NOTE: Not yet supported.

◆ PdfFilterType

enum PoDoFo::PdfFilterType : uint8_t
strong

Every filter that can be used to encode a stream in a PDF file is referenced by an own enum value.

Common filters are PdfFilterType::FlateDecode (i.e. Zip) or PdfFilterType::ASCIIHexDecode

Enumerator
None 

Do not use any filtering.

ASCIIHexDecode 

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

See also
PdfHexFilter
ASCII85Decode 

Converts to and from Ascii85 encoding.

See also
PdfAscii85Filter
FlateDecode 

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

See also
PdfFlateFilter
RunLengthDecode 

Run length decode data.

See also
PdfRLEFilter

◆ PdfFontAutoSelectBehavior

enum PoDoFo::PdfFontAutoSelectBehavior : uint8_t
strong

Flags to control font creation.

Enumerator
None 

No auto selection.

Standard14 

Automatically select a Standard14 font if the fontname matches one of them.

Standard14Alt 

Automatically select a Standard14 font if the fontname matches one of them (standard and alternative names)

◆ PdfFontConfigSearchFlags

enum PoDoFo::PdfFontConfigSearchFlags : uint8_t
strong
Enumerator
SkipMatchPostScriptName 

Skip matching postscript font name.

◆ PdfFontCreateFlags

Font init flags.

Enumerator
None 

No special settings.

DontEmbed 

Do not embed font data. Not embedding Standard14 fonts implies non CID.

DontSubset 

Don't subset font data (includes all the font glyphs)

PreferNonCID 

Prefer non CID, simple fonts (/Type1, /TrueType)

◆ PdfFontDescriptorFlags

enum PoDoFo::PdfFontDescriptorFlags : uint32_t
strong

Enum for the font descriptor flags.

See ISO 32000-1:2008 Table 121 — Font flags

Enumerator
Symbolic 

Font contains glyphs outside the Standard Latin character set. It does not mean the font is a symbol like font.

NonSymbolic 

Font uses the Standard Latin character set or a subset of it. It does not mean the font uses only textual/non symbolic characters.

Italic 

Glyphs have dominant vertical strokes that are slanted.

ForceBold 

Determine whether bold glyphs shall be painted with extra pixels even.

◆ PdfFontFileType

enum PoDoFo::PdfFontFileType : uint8_t
strong
Enumerator
Type1CFF 

Compact Font representation for a Type1 font, as described by Adobe Technical Note #5176 "The Compact Font Format Specification".

CIDKeyedCFF 

A Compact Font representation of a CID keyed font, as described by Adobe Technical Note #5176 "The Compact Font Format Specification".

TrueType 

A TrueType/OpenType font that has a "glyf" table.

OpenTypeCFF 

OpenType font with a "CFF"/"CFF2" table, as described in ISO/IEC 14496-22.

◆ PdfFontMatchBehaviorFlags

enum PoDoFo::PdfFontMatchBehaviorFlags : uint8_t
strong
Enumerator
NormalizePattern 

Normalize search pattern, removing subset prefixes like "ABCDEF+" and extract flags from it (like ",Bold", "-Italic")

SkipMatchPostScriptName 

Skip matching postscript font name.

◆ PdfFontType

enum PoDoFo::PdfFontType : uint8_t
strong

Enum specifying the type of the font.

It doesn't necessarily specify the underline font file type, as per the value Standard14. To know that, refer to PdfFontMetrics::GetFontFileType()

Enumerator
CIDCFF 

This is a "/CIDFontType0" font.

CIDTrueType 

This is a "/CIDFontType2" font.

◆ PdfGlyphAccess

enum PoDoFo::PdfGlyphAccess : uint8_t
strong

When accessing a glyph, there may be a difference in the glyph ID to retrieve the width or to index it within the font program.

Enumerator
Width 

The glyph is accessed in the widths arrays (/Widths, /W1 keys)

FontProgram 

The glyph is accessed in the font program.

◆ PdfHighlightingMode

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 PdfHighlightingMode::Invert

Enumerator
None 

Do no highlighting.

Invert 

Invert the PdfField.

InvertOutline 

Invert the fields border.

Push 

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

◆ PdfInfoInitial

Enum to specify the initial information of the info dictionary.

Enumerator
WriteCreationTime 

Write the creation time (current time). Default for new documents.

WriteModificationTime 

Write the modification time (current time). Default for loaded documents.

WriteProducer 

Write producer key. Default for new documents.

◆ PdfLogSeverity

enum PoDoFo::PdfLogSeverity : uint8_t
strong

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

See also
PoDoFo::LogMessage
Enumerator
None 

Logging disabled.

Error 

Error.

Warning 

Warning.

Information 

Information message.

Debug 

Debug information.

◆ PdfOutlineFormat

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

Enumerator
Default 

Default format.

Italic 

Italic.

Bold 

Bold.

BoldItalic 

Bold Italic.

◆ PdfPageLayout

enum PoDoFo::PdfPageLayout
strong

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

See also
PdfDocument

◆ PdfPageMode

enum PoDoFo::PdfPageMode
strong

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

◆ PdfPageSize

enum PoDoFo::PdfPageSize
strong

Enum holding the supported page sizes by PoDoFo.

Can be used to construct a Rect structure with measurements of a page object.

See also
PdfPage
Enumerator
A0 

DIN A0.

A1 

DIN A1.

A2 

DIN A2.

A3 

DIN A3.

A4 

DIN A4.

A5 

DIN A5.

A6 

DIN A6.

Letter 

Letter.

Legal 

Legal.

Tabloid 

Tabloid.

◆ PdfPainterFlags

Enumerator
Prepend 

Does nothing for now.

NoSaveRestorePrior 

Do not perform a Save/Restore or previous content. Implies RawCoordinates.

NoSaveRestore 

Do not perform a Save/Restore of added content in this painting session.

RawCoordinates 

Does nothing for now.

◆ PdfPathDrawMode

An enum describing modes to draw paths and figures.

Enumerator
Fill 

Fill using the the non-zero winding number rule to determine the region to fill.

StrokeFill 

Stroke and fill using the the even-odd rule to determine the region to fill.

FillEvenOdd 

Fill using the the even-odd rule to determine the region to fill.

StrokeFillEvenOdd 

Stroke and fill using the the even-odd rule to determine the region to fill.

◆ PdfPermissions

enum PoDoFo::PdfPermissions : uint32_t
strong

Set user permissions/restrictions on a document.

Enumerator
Print 

Allow printing the document.

Edit 

Allow modifying the document besides annotations, form fields or changing pages.

Copy 

Allow text and graphic extraction.

EditNotes 

Add or modify text annotations or form fields (if PdfPermissions::Edit is set also allow to create interactive form fields including signature)

FillAndSign 

Fill in existing form or signature fields.

Accessible 

Extract text and graphics to support user with disabilities.

DocAssembly 

Assemble the document: insert, create, rotate delete pages or add bookmarks.

HighPrint 

Print a high resolution version of the document.

◆ PdfPixelFormat

Enumerator
RGBA 

This is known to be working in Apple CGImage created with rgb colorspace and kCGBitmapByteOrder32Big | kCGImageAlphaLast bitmapInfo.

BGRA 

This is known to be used in Windows GDI Bitmap.

ABGR 

This is known to be used in JDK BufferedImage.TYPE_4BYTE_ABGR.

◆ PdfPostScriptTokenType

An enum describing the type of a read token.

Enumerator
Keyword 

The token is a PDF keyword.

Variant 

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

ProcedureEnter 

Procedure enter delimiter.

ProcedureExit 

Procedure enter delimiter.

◆ PdfPredefinedEncodingType

enum PoDoFo::PdfPredefinedEncodingType : uint8_t
strong
Enumerator
Indeterminate 

Indeterminate predefined map type.

LegacyPredefined 

A legacy predefined encoding, such as "WinAnsiEncoding", "MacRomanEncoding" or "MacExpertEncoding".

PredefinedCMap 

A predefined CMap, see ISO 32000-2:2020 "9.7.5.2 Predefined CMaps".

IdentityCMap 

A predefined identity CMap that is either "Identity-H" or "Identity-V".

◆ PdfSaveOptions

Enumerator
NoFlateCompress 

Don't flate compress plain/uncompressed streams.

Remarks
Already compressed objects will not be affected
NoMetadataUpdate 

Don't update the trailer "/Info/ModDate" with current time and synchronize XMP metadata "/Catalog/Metadata".

Use this option to produce deterministic PDF output, or if you want to manually handle the manipulation of the XMP packet

SaveOnSigning 

Save the document on a signing operation, instead of performing an incremental update.

It has no effect on a regular save operation

NoModifyDateUpdate 
Deprecated:
Use NoMetadataUpdate instead

◆ PdfSignatureAttributeFlags

Enumerator
None 

The attribute is a signed attribute. By default, it is unsigned.

SignedAttribute 

The input is interpreted as a raw octet string.

◆ PdfSignerCmsFlags

Enumerator
None 

When supplying a PdfSigningService, specify if the service expects a bare digest (the default), or if should be wrapped in a ASN.1 structure with encryption and hashing type (PKCS#1 v1.5 encpasulation), and the signing service will just perform an encryption with private key.

ServiceDoWrapDigest 

When supplying an external PdfSigningService, specify if the service should be called for a dry run.

◆ PdfStringCharset

enum PoDoFo::PdfStringCharset : uint8_t
strong
Enumerator
Unknown 

Unknown charset.

Ascii 

UTF-8 string that have characters that are in both Ascii and PdfDocEncoding charsets.

PdfDocEncoding 

UTF-8 string that have characters that are in the whole PdfDocEncoding charset.

Unicode 

UTF-8 string that have characters that are in the whole Unicode charset.

◆ PdfTextExtractFlags

Enumerator
ComputeBoundingBox 

NOTE: Currently the bounding is inaccurate.

ExtractSubstring 

NOTE: Extract the matched substring.

◆ PdfTextRenderingMode

Enum for text rendering mode (Tr)

Compare ISO 32000-1:2008, Table 106 "Text rendering modes"

Enumerator
Fill 

Default mode, fill text.

Stroke 

Stroke text.

FillStroke 

Fill, then stroke text.

Invisible 

Neither fill nor stroke text (invisible)

FillAddToClipPath 

Fill text and add to path for clipping.

StrokeAddToClipPath 

Stroke text and add to path for clipping.

FillStrokeAddToClipPath 

Fill, then stroke text and add to path for clipping.

AddToClipPath 

Add text to path for clipping.

◆ PdfVersion

enum PoDoFo::PdfVersion : uint8_t
strong

Enum to identify different versions of the PDF file format.

Enumerator
V1_0 

PDF 1.0.

V1_1 

PDF 1.1.

V1_2 

PDF 1.2.

V1_3 

PDF 1.3.

V1_4 

PDF 1.4.

V1_5 

PDF 1.5.

V1_6 

PDF 1.6.

V1_7 

PDF 1.7.

V2_0 

PDF 2.0.

◆ PdfWriteFlags

enum PoDoFo::PdfWriteFlags
strong

Specify additional options for writing the PDF.

Enumerator
Clean 

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

NoInlineLiteral 

Don't write spaces before literal types (numerical, references, null)

PdfAPreserve 

Preserve PDFA compliance during writing (NOTE: it does not itself convert the document to PDF/A)

SkipDelimiters 

Skip delimiters in serialization of strings and outer dictionaries/arrays.

Function Documentation

◆ GetOperandCount()

int PoDoFo::GetOperandCount ( PdfOperator  op)

Get the operands count of the operator.

Returns
count the number of operand, -1 means variadic number of operands

◆ operator""_n()

PdfName PoDoFo::operator""_n ( const char *  name,
size_t  length 
)
inline

Create a PdfName from a string literal without checking for PdfDocEncoding characters.

Remarks
Use with caution: only string literals should be used, not fixed size char arrays. Only ASCII charset is supported

◆ SignDocument()

void PoDoFo::SignDocument ( PdfMemDocument doc,
StreamDevice device,
PdfSigner &  signer,
PdfSignature &  signature,
PdfSaveOptions  saveOptions = PdfSaveOptions::None 
)

Sign the document on the given signature field.

Parameters
docthe document to be signed
devicethe input/output device where the document will be saved
signerthe signer implementation that will compute the signature
signaturethe signature field where the signature will be applied
optionsdocument saving options

◆ TransformRectPage()

Rect PoDoFo::TransformRectPage ( const Rect rect,
const PdfPage page,
bool  inputIsTransformed 
)

Transform the given rect accordingly to the page rotation.

Parameters
inputIsTransformedif true the input rectangle is already transformed, if false the input is canonically oriented in top-right quandrant

◆ TryGetOperandCount()

bool PoDoFo::TryGetOperandCount ( PdfOperator  op,
int &  count 
)

Get the operands count of the operator.

Parameters
countthe number of operand, -1 means variadic number of operands