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

Classes

class  charbuff_t
 
class  datahandle_t
 
class  InputStream
 
class  InputStreamDevice
 
class  nullable
 
class  NullStreamDevice
 
struct  Object
 
class  OutputStream
 
class  PdChoiceField
 
class  PdfAction
 
class  PdfAnnotation
 
class  PdfArray
 
class  PdfArrayIndirectIterableBase
 
class  PdfAscii85Filter
 
class  PdfAxialShadingPattern
 
class  PdfBuiltInEncoding
 
class  PdfCanvas
 
class  PdfCanvasInputDevice
 
struct  PdfCharCode
 
class  PdfCharCodeMap
 
class  PdfCheckBox
 
struct  PdfCID
 
class  PdfCIDToGIDMap
 
class  PdfColor
 
class  PdfComboBox
 
struct  PdfContent
 
class  PdfContents
 
class  PdfContentStreamOperators
 
class  PdfContentStreamReader
 
class  PdfCryptFilter
 
class  PdfData
 
class  PdfDataContainer
 
class  PdfDataProvider
 
class  PdfDate
 
class  PdfDestination
 
class  PdfDictionary
 
class  PdfDictionaryIndirectIterableBase
 
class  PdfDifferenceEncoding
 
class  PdfDifferenceList
 
class  PdfDocument
 
class  PdfDynamicEncoding
 
class  PdfElement
 
class  PdfEncoding
 
class  PdfEncodingFactory
 
class  PdfEncodingMap
 
class  PdfEncodingMapBase
 
class  PdfEncodingMapFactory
 
class  PdfEncodingMapOneByte
 
class  PdfEncodingShim
 
class  PdfEncrypt
 
class  PdfEncryptAESBase
 
class  PdfEncryptAESV2
 
class  PdfEncryptRC4
 
class  PdfEncryptRC4Base
 
class  PdfError
 
class  PdfExponentialFunction
 
class  PdfExtension
 
class  PdfExtGState
 
class  PdfFileSpec
 
class  PdfFilter
 
class  PdfFilterFactory
 
class  PdfFlateFilter
 
class  PdfFont
 
class  PdfFontCID
 
class  PdfFontCIDTrueType
 
class  PdfFontCIDType1
 
class  PdfFontConfigWrapper
 
class  PdfFontManager
 
class  PdfFontMetrics
 
class  PdfFontMetricsStandard14
 
class  PdfFontSimple
 
class  PdfFontTrueType
 
class  PdfFontTrueTypeSubset
 
class  PdfFontType1
 
class  PdfFontType3
 
class  PdfFunction
 
class  PdfFunctionBaseShadingPattern
 
class  PdfHexFilter
 
class  PdfIdentityEncoding
 
class  PdfImage
 
class  PdfImmediateWriter
 
class  PdfIndirectObjectList
 
class  PdfInfo
 
class  PdfListBox
 
class  PdfLZWFilter
 
class  PdfMacExpertEncoding
 
class  PdfMacRomanEncoding
 
class  PdfMemDocument
 
class  PdfMemoryObjectStream
 
class  PdfName
 
class  PdfNullEncodingMap
 
class  PdfObject
 
class  PdfObjectStream
 
class  PdfObjectStreamParser
 
class  PdfOutlineItem
 
class  PdfOutlines
 
class  PdfPage
 
class  PdfPageCollection
 
class  PdfPainter
 
class  PdfPainterPath
 
class  PdfPainterPathExtensions
 
class  PdfPainterTextObject
 
class  PdfParser
 
class  PdfParserObject
 
class  PdfPostScriptTokenizer
 
class  PdfPredefinedEncoding
 
class  PdfPredictorDecoder
 
class  PdfPushButton
 
class  PdfRadialShadingPattern
 
class  PdfRadioButton
 
class  PdfReference
 
class  PdfResources
 
class  PdfRLEFilter
 
class  PdfSampledFunction
 
class  PdfShadingPattern
 
class  PdfStandardEncoding
 
class  PdfStitchingFunction
 
class  PdfStreamedDocument
 
class  PdfStreamedObjectStream
 
class  PdfString
 
class  PdfStringScanContext
 
class  PdfStringStream
 
class  PdfSymbolEncoding
 
class  PdfTextBox
 
class  PdfTilingPattern
 
class  PdfTokenizer
 
class  PdfTriangleShadingPattern
 
class  PdfVariant
 
class  PdfWinAnsiEncoding
 
class  PdfWriter
 
class  PdfXObject
 
class  PdfXRef
 
class  PdfXRefStream
 
class  PdfXRefStreamParserObject
 
class  PdfZapfDingbatsEncoding
 
class  Rect
 
class  StreamDevice
 

Typedefs

using bufferview = cspan< char >
 
using bufferspan = mspan< char >
 
using unicodeview = cspan< char32_t >
 
template<class T , size_t Extent = tcb::dynamic_extent>
using cspan = tcb::span< const T, Extent >
 
template<class T , size_t Extent = tcb::dynamic_extent, typename std::enable_if<!std::is_const< T >::value, int >::type = 0>
using mspan = tcb::span< T, Extent >
 
using codepoint = char32_t
 
using PdfInlineImageHandler = std::function< bool(const PdfDictionary &imageDict, InputStreamDevice &device)>
 
using CIDToGIDMap = std::map< unsigned, unsigned >
 
using PdfEncodingMapConstPtr = std::shared_ptr< const PdfEncodingMap >
 
using PdfToUnicodeMapConstPtr = std::shared_ptr< const PdfEncodingMap >
 
using PdfFontMetricsConstPtr = std::shared_ptr< const PdfFontMetrics >
 

Enumerations

enum class  AlgebraicTrait { Tx , Ty }
 
enum class  FileMode {
  CreateNew = 1 , Create , Open , OpenOrCreate ,
  Truncate , Append
}
 
enum class  PdfAcroFormDefaulAppearance { None , BlackText12pt }
 
enum class  PdfActionType
 
enum class  PdfContentType {
}
 
enum class  PdfContentWarnings {
}
 
enum class  PdfContentReaderFlags { }
 
enum class  PdfVersion : uint8_t {
}
 
enum class  PdfStringState : uint8_t { RawBuffer , Ascii , PdfDocEncoding , Unicode }
 
enum class  PdfEncodingMapType : uint8_t { Indeterminate , Simple , CMap }
 
enum class  PdfWriteFlags { }
 
enum class  PdfDataType : uint8_t {
  Unknown = 0 , Bool , Number , Real ,
  String , Name , Array , Dictionary ,
  Null , Reference , RawData
}
 
enum class  PdfTextExtractFlags { }
 
enum class  PdfFilterType : uint8_t {
  None = 0 , ASCIIHexDecode , ASCII85Decode , LZWDecode ,
  FlateDecode , RunLengthDecode , CCITTFaxDecode , JBIG2Decode ,
  DCTDecode , JPXDecode , Crypt
}
 
enum class  PdfExportFormat { Png = 1 , Jpeg = 2 }
 
enum class  PdfFontDescriptorFlags : uint32_t { }
 
enum class  PdfFontType : uint8_t { }
 
enum class  PdfFontFileType : uint8_t { }
 
enum class  PdfFontStyle : uint8_t
 
enum class  PdfGlyphAccess : uint8_t { Width = 1 , FontProgram = 2 }
 
enum class  PdfFontAutoSelectBehavior { None = 0 , Standard14 = 1 , Standard14Alt = 2 }
 
enum class  PdfFontCreateFlags { None = 0 , DontEmbed = 1 , DontSubset = 2 , PreferNonCID = 4 }
 
enum class  PdfFontMatchBehaviorFlags { }
 
enum class  PdfColorSpace : uint8_t { }
 
enum class  PdfPixelFormat { }
 
enum class  PdfTextRenderingMode {
  Fill = 0 , Stroke , FillStroke , Invisible ,
  FillAddToClipPath , StrokeAddToClipPath , FillStrokeAddToClipPath , AddToClipPath
}
 
enum class  PdfStrokeStyle
 
enum class  PdfInfoInitial { }
 
enum class  PdfLineCapStyle
 
enum class  PdfLineJoinStyle
 
enum class  PdfVerticalAlignment
 
enum class  PdfHorizontalAlignment
 
enum class  PdfSaveOptions { }
 
enum class  PdfPageSize {
}
 
enum class  PdfPageMode
 
enum class  PdfPageLayout
 
enum class  PdfAnnotationType : uint8_t
 
enum class  PdfAnnotationFlags : uint32_t
 
enum class  PdfFieldType : uint32_t
 
enum class  PdfHighlightingMode { }
 
enum class  PdfAppearanceType { Normal = 0 , Rollover , Down }
 
enum class  PdfOperator
 
enum class  PdfRenderingIntent
 
enum class  PdfBlendMode
 
enum class  PdfDestinationType
 
enum class  PdfEncodingExportFlags { }
 
enum class  PdfKeyLength
 
enum class  PdfPermissions {
}
 
enum class  PdfEncryptAlgorithm { }
 
enum class  PdfErrorCode {
  Unknown = 0 , InvalidHandle , FileNotFound , InvalidDeviceOperation ,
  UnexpectedEOF , OutOfMemory , ValueOutOfRange , InternalLogic ,
  InvalidEnumValue , BrokenFile , PageNotFound , NoPdfFile ,
  NoXRef , NoTrailer , NoNumber , NoObject ,
  NoEOFToken , InvalidTrailerSize , InvalidDataType , InvalidXRef ,
  InvalidXRefStream , InvalidXRefType , InvalidPredictor , InvalidStrokeStyle ,
  InvalidHexString , InvalidStream , InvalidStreamLength , InvalidKey ,
  InvalidName , InvalidEncryptionDict , InvalidPassword , InvalidFontData ,
  InvalidContentStream , UnsupportedFilter , UnsupportedFontFormat , ActionAlreadyPresent ,
  WrongDestinationType , MissingEndStream , Date , Flate ,
  FreeType , SignatureError , UnsupportedImageFormat , CannotConvertColor ,
  NotImplemented , DestinationAlreadyPresent , ChangeOnImmutable , NotCompiled ,
  OutlineItemAlreadyPresent , NotLoadedForUpdate , CannotEncryptedForUpdate , XmpMetadata
}
 
enum class  PdfLogSeverity {
  None = 0 , Error , Warning , Information ,
  Debug
}
 
enum class  PdfFontConfigSearchFlags { }
 
enum class  TrueTypeFontFileType { Unknown , TTF , TTC , OTF }
 
enum class  PdfIdentityOrientation
 
enum class  PdfOutlineFormat { Default = 0x00 , Italic = 0x01 , Bold = 0x02 , BoldItalic = 0x03 }
 
enum class  PdfPainterFlags { }
 
enum class  PdfPathDrawMode { }
 
enum class  PdfPostScriptTokenType { }
 
enum class  PdfFunctionType { Sampled = 0 , Exponential = 2 , Stitching = 3 , PostScript = 4 }
 
enum class  PdfTilingPatternType
 

Functions

Matrix PODOFO_API GetFrameRotationTransform (const Rect &rect, double teta)
 
Matrix PODOFO_API GetFrameRotationTransformInverse (const Rect &rect, double teta)
 
Rect PODOFO_API TransformRectPage (const Rect &rect, const PdfPage &page, bool inputIsTransformed)
 
PODOFO_API int GetOperandCount (PdfOperator op)
 
PODOFO_API bool TryGetOperandCount (PdfOperator op, int &count)
 
PODOFO_API void SignDocument (PdfMemDocument &doc, StreamDevice &device, PdfSigner &signer, PdfSignature &signature, PdfSaveOptions saveOptions=PdfSaveOptions::None)
 
PdfColorSpace NameToColorSpaceRaw (const std::string_view &name)
 
std::string NormalizeFontName (const std::string_view &fontName)
 
std::string ExtractFontHints (const std::string_view &fontName, bool &isItalic, bool &isBold)
 
void LogMessage (PdfLogSeverity logSeverity, const std::string_view &msg)
 
bool CheckValidUTF8ToPdfDocEcondingChars (const std::string_view &view, bool &isAsciiEqual)
 

Variables

constexpr AlgebraicTrait Tx = AlgebraicTrait::Tx
 X Translation trait.
 
constexpr AlgebraicTrait Ty = AlgebraicTrait::Ty
 X Translation trait.
 
constexpr PdfVersion PdfVersionDefault = PdfVersion::V1_4
 

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

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

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.

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

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) 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) 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) 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) 2007 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) 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) 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) 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) 2009 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) 2010 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

Typedef Documentation

◆ bufferspan

using PoDoFo::bufferspan = typedef mspan<char>

Convenient writable char buffer span

◆ bufferview

using PoDoFo::bufferview = typedef cspan<char>

Convenient read-only char buffer span

◆ CIDToGIDMap

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

A backing storage for a CID to GID map

Remarks
It must preserve ordering

◆ codepoint

using PoDoFo::codepoint = typedef char32_t

A conventient 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

◆ cspan

template<class T , size_t Extent = tcb::dynamic_extent>
using PoDoFo::cspan = typedef tcb::span<const T, Extent>

Constant span

◆ mspan

template<class T , size_t Extent = tcb::dynamic_extent, typename std::enable_if<!std::is_const< T >::value, int >::type = 0>
using PoDoFo::mspan = typedef tcb::span<T, Extent>

Mutable span

◆ PdfEncodingMapConstPtr

using PoDoFo::PdfEncodingMapConstPtr = typedef std::shared_ptr<const PdfEncodingMap>

Convenience typedef for a const /Encoding map entry shared ptr

◆ PdfFontMetricsConstPtr

using PoDoFo::PdfFontMetricsConstPtr = typedef std::shared_ptr<const PdfFontMetrics>

Convenience typedef for a const PdfEncoding shared ptr

◆ 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

◆ PdfToUnicodeMapConstPtr

using PoDoFo::PdfToUnicodeMapConstPtr = typedef std::shared_ptr<const PdfEncodingMap>

Convenience alias for a const /ToUnicode CMap entry shared ptr

◆ unicodeview

using PoDoFo::unicodeview = typedef cspan<char32_t>

Unicode code point view

Enumeration Type Documentation

◆ AlgebraicTrait

enum class PoDoFo::AlgebraicTrait
strong
Enumerator
Tx 

X Translation.

Ty 

Y Translation.

◆ FileMode

enum class 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.

BlackText12pt 

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

◆ PdfActionType

enum class PoDoFo::PdfActionType
strong

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.

◆ PdfAnnotationFlags

enum class 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 class PoDoFo::PdfAnnotationType : uint8_t
strong

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.

◆ PdfAppearanceType

enum class PoDoFo::PdfAppearanceType
strong

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.

◆ PdfBlendMode

enum class PoDoFo::PdfBlendMode
strong

List of defined transparency blending modes

◆ PdfColorSpace

enum class PoDoFo::PdfColorSpace : uint8_t
strong

Enum for the colorspaces supported by PDF.

Enumerator
Lab 

CIE-Lab.

◆ PdfContentReaderFlags

enum class PoDoFo::PdfContentReaderFlags
strong
Enumerator
DontFollowXObjectForms 

Don't follow XObject Forms. Valid XObects are still reported as such.

◆ PdfContentType

enum class PoDoFo::PdfContentType
strong

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.

EndXObjectForm 

Issued when the end of a XObject form is detected.

UnexpectedKeyword 

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

◆ PdfContentWarnings

enum class PoDoFo::PdfContentWarnings
strong
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 class 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

enum class PoDoFo::PdfDestinationType
strong

Destination type, as per 12.3.2.2 of the Pdf spec.

(see table 151 in the pdf spec)

◆ PdfEncodingExportFlags

enum class PoDoFo::PdfEncodingExportFlags
strong
Enumerator
SkipToUnicode 

Skip exporting a /ToUnicode entry.

◆ PdfEncodingMapType

enum class PoDoFo::PdfEncodingMapType : uint8_t
strong
Enumerator
Indeterminate 

Indeterminate map type, such as identity encodings.

Simple 

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

CMap 

A proper CMap encoding or pre-defined CMap names.

◆ PdfEncryptAlgorithm

enum class PoDoFo::PdfEncryptAlgorithm
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 class 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 

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

FileNotFound 

A file was not found or cannot be opened.

InvalidDeviceOperation 

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.

BrokenFile 

The file content is broken.

PageNotFound 

The requested page could not be found in the PDF.

NoPdfFile 

The file is no PDF file.

NoXRef 

The PDF file has no or an invalid XRef table.

NoTrailer 

The PDF file has no or an invalid trailer.

NoNumber 

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

NoObject 

A object was expected and none was found.

NoEOFToken 

The PDF file has no or an invalid EOF marker.

InvalidTrailerSize 

The trailer size is invalid.

InvalidDataType 

The passed datatype is invalid or was not recognized.

InvalidXRef 

The XRef table is invalid.

InvalidXRefStream 

A XRef steam is invalid.

InvalidXRefType 

The XRef type is invalid or was not found.

InvalidPredictor 

Invalid or unimplemented predictor.

InvalidStrokeStyle 

Invalid stroke style during drawing.

InvalidHexString 

Invalid hex string.

InvalidStream 

The stream is invalid.

InvalidStreamLength 

The stream length 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.

ActionAlreadyPresent 

An Action was already present when trying to add a Destination.

WrongDestinationType 

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

MissingEndStream 

The required token endstream was not found.

Date 

Date/time error.

Flate 

Error in zlib.

FreeType 

Error in FreeType.

SignatureError 

Error in signature.

UnsupportedImageFormat 

This image format is not supported by PoDoFo.

CannotConvertColor 

This color format cannot be converted.

NotImplemented 

This feature is currently not implemented.

DestinationAlreadyPresent 

A destination was already present when trying to add an Action.

ChangeOnImmutable 

Changing values on immutable objects is not allowed.

NotCompiled 

This feature was disabled at compile time.

OutlineItemAlreadyPresent 

An outline item to be inserted was already in that outlines tree.

NotLoadedForUpdate 

The document had not been loaded for update.

CannotEncryptedForUpdate 

Cannot load encrypted documents for update.

XmpMetadata 

Error while creating or reading XMP metadata.

◆ PdfExportFormat

enum class PoDoFo::PdfExportFormat
strong
Enumerator
Png 

NOTE: Not yet supported.

◆ PdfFieldType

enum class PoDoFo::PdfFieldType : uint32_t
strong

The type of PDF field

◆ PdfFilterType

enum class 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

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

Enumerator
MatchPostScriptName 

Match postscript font name. The default is match family name. This search may be more specific.

◆ PdfFontCreateFlags

enum class PoDoFo::PdfFontCreateFlags
strong

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 class 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 class PoDoFo::PdfFontFileType : uint8_t
strong
Enumerator
Type1CCF 

Compact Font Representation for /Type1 fonts.

CIDType1 

This is a Type1 font that can be used only in CID Fonts.

OpenType 

OpenType font. This is /Subtype "OpenType" for /FontFile3.

◆ PdfFontMatchBehaviorFlags

Enumerator
NormalizePattern 

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

MatchPostScriptName 

Match postscript font name. The default is match family name. This search may be more specific.

◆ PdfFontStyle

enum class PoDoFo::PdfFontStyle : uint8_t
strong

Font style flags used during searches

◆ PdfFontType

enum class 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
CIDType1 

This is a "CIDFontType0".

CIDTrueType 

This is a "CIDFontType2".

◆ PdfFunctionType

enum class PoDoFo::PdfFunctionType
strong

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

Enumerator
Sampled 

A sampled function (Type1)

Exponential 

An exponential interpolation function (Type2)

Stitching 

A stitching function (Type3)

PostScript 

A PostScript calculator function (Type4)

◆ PdfGlyphAccess

enum class 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

enum class PoDoFo::PdfHighlightingMode
strong

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)

◆ PdfHorizontalAlignment

enum class PoDoFo::PdfHorizontalAlignment
strong

Enum for text alignment

◆ PdfIdentityOrientation

enum class PoDoFo::PdfIdentityOrientation
strong

Orientation for predefined CID identity encodings

◆ PdfInfoInitial

enum class PoDoFo::PdfInfoInitial
strong

Enum to specifiy 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.

◆ PdfKeyLength

enum class PoDoFo::PdfKeyLength
strong

A enum specifying a valid keylength for a PDF encryption key. Keys must be in the range 40 to 128 bit and have to be a multiple of 8.

Adobe Reader supports only keys with 40, 128 or 256 bits!

◆ PdfLineCapStyle

enum class PoDoFo::PdfLineCapStyle
strong

Enum for line cap styles when drawing.

◆ PdfLineJoinStyle

enum class PoDoFo::PdfLineJoinStyle
strong

Enum for line join styles when drawing.

◆ PdfLogSeverity

enum class PoDoFo::PdfLogSeverity
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.

◆ PdfOperator

enum class PoDoFo::PdfOperator
strong

List of PDF stream content operators

◆ PdfOutlineFormat

enum class PoDoFo::PdfOutlineFormat
strong

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

Enumerator
Default 

Default format.

Italic 

Italic.

Bold 

Bold.

BoldItalic 

Bold Italic.

◆ PdfPageLayout

enum class 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 class 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 class 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

enum class PoDoFo::PdfPainterFlags
strong
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

enum class PoDoFo::PdfPathDrawMode
strong

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 class PoDoFo::PdfPermissions
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

enum class PoDoFo::PdfPixelFormat
strong
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

enum class PoDoFo::PdfPostScriptTokenType
strong

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.

◆ PdfRenderingIntent

enum class PoDoFo::PdfRenderingIntent
strong

List of defined Rendering intents

◆ PdfSaveOptions

enum class PoDoFo::PdfSaveOptions
strong
Enumerator
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

NoModifyDateUpdate 
Deprecated:
Use NoMetadataUpdate instead

◆ PdfStringState

enum class PoDoFo::PdfStringState : uint8_t
strong
Enumerator
RawBuffer 

The string is an unvaluated raw buffer.

Ascii 

The string use characters that are in both Ascii and PdfDocEncoding charsets.

PdfDocEncoding 

The string uses characters that are in the whole PdfDocEncoding charset.

Unicode 

The string uses characters that are in the whole Unicode charset.

◆ PdfStrokeStyle

enum class PoDoFo::PdfStrokeStyle
strong

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

◆ PdfTextExtractFlags

enum class PoDoFo::PdfTextExtractFlags
strong
Enumerator
ComputeBoundingBox 

NOTE: Currently the bounding is inaccurate.

ExtractSubstring 

NOTE: Extract the matched substring.

◆ PdfTextRenderingMode

enum class PoDoFo::PdfTextRenderingMode
strong

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.

◆ PdfTilingPatternType

enum class PoDoFo::PdfTilingPatternType
strong

Enum for predefined tiling patterns.

◆ PdfVersion

enum class 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.

◆ PdfVerticalAlignment

enum class PoDoFo::PdfVerticalAlignment
strong

Enum for vertical text alignment

◆ PdfWriteFlags

enum class 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)

NoPDFAPreserve 

When writing compact (PdfWriteFlags::Clean is unset) code, preserving PDF/A compliance is not required.

◆ TrueTypeFontFileType

enum class PoDoFo::TrueTypeFontFileType
strong

Internal enum specifying the type of a fontfile.

Enumerator
Unknown 

Unknown.

TTF 

TrueType Font.

TTC 

TrueType Collection.

OTF 

OpenType Font.

Function Documentation

◆ CheckValidUTF8ToPdfDocEcondingChars()

bool PoDoFo::CheckValidUTF8ToPdfDocEcondingChars ( const std::string_view &  view,
bool &  isAsciiEqual 
)

Check if the chars in the given utf-8 view are elegible for PdfDocEncofing conversion

/param isPdfDocEncoding the given utf-8 string is coincident in PdfDocEncoding representation

◆ ExtractFontHints()

std::string PoDoFo::ExtractFontHints ( const std::string_view &  fontName,
bool &  isItalic,
bool &  isBold 
)

Extract base font name, removing known bold/italic/subset prefixes/suffixes

Returns
normalized font name

◆ GetFrameRotationTransform()

Matrix PoDoFo::GetFrameRotationTransform ( const Rect rect,
double  teta 
)

Get a rotation trasformation that aligns the rectangle to the axis after the rotation

◆ GetFrameRotationTransformInverse()

Matrix PoDoFo::GetFrameRotationTransformInverse ( const Rect rect,
double  teta 
)

Get an inverse rotation trasformation that aligns the rectangle to the axis after the rotation

◆ 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

◆ LogMessage()

void PoDoFo::LogMessage ( PdfLogSeverity  logSeverity,
const std::string_view &  msg 
)

Log a message to the logging system defined for PoDoFo.

Parameters
logSeveritythe severity of the log message
msgthe message to be logged

◆ NameToColorSpaceRaw()

PdfColorSpace PoDoFo::NameToColorSpaceRaw ( const std::string_view &  name)

Convert a name into a colorspace enum.

Parameters
namename representing a colorspace such as DeviceGray
Returns
colorspace enum or PdfColorSpace_Unknown if name is unknown

◆ NormalizeFontName()

std::string PoDoFo::NormalizeFontName ( const std::string_view &  fontName)

Normalize base font name, removing known bold/italic/subset prefixes/suffixes

◆ 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

Variable Documentation

◆ PdfVersionDefault

constexpr PdfVersion PoDoFo::PdfVersionDefault = PdfVersion::V1_4
constexpr

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