PDF Toolbox
Loading...
Searching...
No Matches
Macros | Functions
PdfToolbox_PtxPdfContent.h File Reference
#include "PdfToolbox_Types.h"
#include "PdfToolbox_PtxSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLBOX_CALL
 
#define PtxPdfContent_Font_CreateFromSystem   PtxPdfContent_Font_CreateFromSystemA
 
#define PtxPdfContent_Font_GetBaseFont   PtxPdfContent_Font_GetBaseFontA
 
#define PtxPdfContent_TextGenerator_GetWidth   PtxPdfContent_TextGenerator_GetWidthA
 
#define PtxPdfContent_TextGenerator_Show   PtxPdfContent_TextGenerator_ShowA
 
#define PtxPdfContent_TextGenerator_ShowLine   PtxPdfContent_TextGenerator_ShowLineA
 
#define PtxPdfContent_Glyph_GetText   PtxPdfContent_Glyph_GetTextA
 
#define PtxPdfContent_TextFragment_GetText   PtxPdfContent_TextFragment_GetTextA
 

Functions

PDFTOOLBOX_EXPORT TPtxPdfContent_Transparency *PDFTOOLBOX_CALL PtxPdfContent_Transparency_New (double dAlpha)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_BlendMode PDFTOOLBOX_CALL PtxPdfContent_Transparency_GetBlendMode (TPtxPdfContent_Transparency *pTransparency)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Transparency_SetBlendMode (TPtxPdfContent_Transparency *pTransparency, TPtxPdfContent_BlendMode iBlendMode)
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Transparency_GetAlpha (TPtxPdfContent_Transparency *pTransparency)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Transparency_SetAlpha (TPtxPdfContent_Transparency *pTransparency, double dAlpha)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_Stroke_New (TPtxPdfContent_Paint *pPaint, double dLineWidth)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetPaint (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetPaint (TPtxPdfContent_Stroke *pStroke, TPtxPdfContent_Paint *pPaint)
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineWidth (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineWidth (TPtxPdfContent_Stroke *pStroke, double dLineWidth)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_LineCapStyle PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineCapStyle (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineCapStyle (TPtxPdfContent_Stroke *pStroke, TPtxPdfContent_LineCapStyle iLineCapStyle)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_LineJoinStyle PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineJoinStyle (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineJoinStyle (TPtxPdfContent_Stroke *pStroke, TPtxPdfContent_LineJoinStyle iLineJoinStyle)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetDashArray (TPtxPdfContent_Stroke *pStroke, double *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetDashArray (TPtxPdfContent_Stroke *pStroke, const double *pDashArray, size_t nDashArrays)
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetDashPhase (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetDashPhase (TPtxPdfContent_Stroke *pStroke, double dDashPhase)
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetMiterLimit (TPtxPdfContent_Stroke *pStroke)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetMiterLimit (TPtxPdfContent_Stroke *pStroke, double dMiterLimit)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Fill *PDFTOOLBOX_CALL PtxPdfContent_Fill_New (TPtxPdfContent_Paint *pPaint)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_Fill_GetPaint (TPtxPdfContent_Fill *pFill)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Fill_SetPaint (TPtxPdfContent_Fill *pFill, TPtxPdfContent_Paint *pPaint)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_InsideRule PDFTOOLBOX_CALL PtxPdfContent_Fill_GetInsideRule (TPtxPdfContent_Fill *pFill)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Fill_SetInsideRule (TPtxPdfContent_Fill *pFill, TPtxPdfContent_InsideRule iInsideRule)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Image *PDFTOOLBOX_CALL PtxPdfContent_Image_Create (TPtxPdf_Document *pTargetDocument, const TPtxSys_StreamDescriptor *pStreamDesc)
 Create an image object from image data. Supported formats are:
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Image_Extract (TPtxPdfContent_Image *pImage, const TPtxSys_StreamDescriptor *pStreamDesc, const TPtxPdfContent_ImageType *pImageType)
 Extract embedded image from PDF.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ImageType PDFTOOLBOX_CALL PtxPdfContent_Image_GetDefaultImageType (TPtxPdfContent_Image *pImage)
 Default extracted image type. The default image type that will be extracted, based on the way that the image data is compressed and stored in the PDF file. The type of the output image is ePtxPdfContent_ImageType_Jpeg for embedded JPEG and JPEG2000 images. In all other cases the image type will be ePtxPdfContent_ImageType_Tiff.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Image_GetSize (TPtxPdfContent_Image *pImage, TPtxGeomInt_Size *pSize)
 The size of the image in samples. Samples are often also called pixels.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Image_GetSamples (TPtxPdfContent_Image *pImage, unsigned char *pBuffer, size_t nBufferSize)
 The raw content of the image.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Image_GetBitsPerComponent (TPtxPdfContent_Image *pImage)
 the number of bits per component. The number of bits used to represent each color component. Only a single value may be specified; the number of bits is the same for all color components. Valid values are 1, 2, 4, and 8.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_Image_GetColorSpace (TPtxPdfContent_Image *pImage)
 the color space in which image samples are specified.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ImageMask *PDFTOOLBOX_CALL PtxPdfContent_ImageMask_Create (TPtxPdf_Document *pTargetDocument, const TPtxSys_StreamDescriptor *pStreamDesc)
 Create an image mask object from image data. Supported formats are:
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ImageMask_Extract (TPtxPdfContent_ImageMask *pImageMask, const TPtxSys_StreamDescriptor *pStreamDesc, const TPtxPdfContent_ImageType *pImageType)
 Extract image mask from PDF.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ImageMask_GetSize (TPtxPdfContent_ImageMask *pImageMask, TPtxGeomInt_Size *pSize)
 The size of the image mask in samples.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_Create (TPtxPdf_Document *pTargetDocument, const TPtxSys_StreamDescriptor *pStreamDesc, BOOL bEmbedded)
 Create a new font object from font file data. Supported formats are:
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_CreateFromSystemA (TPtxPdf_Document *pTargetDocument, const char *szFamily, const char *szStyle, BOOL bEmbedded)
 Create a new font object from an installed font. The returned font object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_CreateFromSystemW (TPtxPdf_Document *pTargetDocument, const WCHAR *szFamily, const WCHAR *szStyle, BOOL bEmbedded)
 Create a new font object from an installed font. The returned font object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetCharacterWidth (TPtxPdfContent_Font *pFont, int iCharacter)
 the width of a single glyph.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Font_GetBaseFontA (TPtxPdfContent_Font *pFont, char *pBuffer, size_t nBufferSize)
 the PostScript name of the font
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Font_GetBaseFontW (TPtxPdfContent_Font *pFont, WCHAR *pBuffer, size_t nBufferSize)
 the PostScript name of the font
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Font_GetWeight (TPtxPdfContent_Font *pFont, TPtxPdfContent_FontWeight *pWeight)
 the visual weight of the font. Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. If the font does not define this value, NULL is returned.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetItalicAngle (TPtxPdfContent_Font *pFont)
 the italic angle of the font. The angle is expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. (For example, the 9-o’clock position is 90 degrees, and the 3-o’clock position is –90 degrees.) The value is negative for fonts that slope to the right, as almost all italic fonts do.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetAscent (TPtxPdfContent_Font *pFont)
 the ascent of the font. The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetDescent (TPtxPdfContent_Font *pFont)
 the descent of the font. The maximum depth below the baseline reached by glyphs in this font. The value is a negative number.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetCapHeight (TPtxPdfContent_Font *pFont)
 the cap height of the font. The vertical coordinate of the top of flat capital letters, measured from the baseline.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Font_GetLeading (TPtxPdfContent_Font *pFont, double *pLeading)
 the leading of the font.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_Group_Create (TPtxPdf_Document *pTargetDocument, const TPtxGeomReal_Size *pSize)
 Create an empty group object. The returned group object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_Group_CopyFromPage (TPtxPdf_Document *pTargetDocument, TPtxPdf_Page *pPage, TPtxPdf_PageCopyOptions *pOptions)
 Create a group object from a page.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetSize (TPtxPdfContent_Group *pGroup, TPtxGeomReal_Size *pSize)
 the size of the group.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Content *PDFTOOLBOX_CALL PtxPdfContent_Group_GetContent (TPtxPdfContent_Group *pGroup)
 the group content. If the group is writable, the content object can be used to apply new content on the group.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetIsolated (TPtxPdfContent_Group *pGroup)
 the transparency isolation behavior
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_SetIsolated (TPtxPdfContent_Group *pGroup, BOOL bIsolated)
 the transparency isolation behavior
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetKnockout (TPtxPdfContent_Group *pGroup)
 the transparency knockout behavior
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_SetKnockout (TPtxPdfContent_Group *pGroup, BOOL bKnockout)
 the transparency knockout behavior
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_CreateProcessColorSpace (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_ProcessColorSpaceType iType)
 Get the canonical grayscale, RGB, or CMYK color space. Depending on the PDF/A compliance and the output intent, this is either a device color space (TPtxPdfContent_DeviceGrayColorSpace, TPtxPdfContent_DeviceRgbColorSpace, TPtxPdfContent_DeviceCmykColorSpace), a calibrated color space (TPtxPdfContent_CalibratedGrayColorSpace, TPtxPdfContent_CalibratedRgbColorSpace), or an ICC-based color space (4-channel TPtxPdfContent_IccBasedColorSpace). The returned color space object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_Copy (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_ColorSpace *pColorSpace)
 Copy a color space Copy a color space object from an input document to the given pTargetDocument. The returned object is associated with the given target document but not yet part of it.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_GetComponentCount (TPtxPdfContent_ColorSpace *pColorSpace)
 the number of components in the color space.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpaceType PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_GetType (TPtxPdfContent_ColorSpace *pColorSpace)
 Get actual derived type of base type TPtxPdfContent_ColorSpace.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_IccBasedColorSpace *PDFTOOLBOX_CALL PtxPdfContent_IccBasedColorSpace_Create (TPtxPdf_Document *pTargetDocument, const TPtxSys_StreamDescriptor *pProfile)
 Create an new ICC-based color space from an ICC color profile. The returned color space object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_IccBasedColorSpace *PDFTOOLBOX_CALL PtxPdfContent_IccBasedColorSpace_Copy (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_IccBasedColorSpace *pColorSpace)
 Copy an ICC-based color space Copy an ICC-based color space object from an input document to the given pTargetDocument. The returned object is associated with the given target document but not yet part of it.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Subpath_GetCount (TPtxPdfContent_Subpath *pSubpath)
 Get the number of elements in the list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_Get (TPtxPdfContent_Subpath *pSubpath, int iIndex, TPtxPdfContent_PathSegment *pPathSegment)
 Returns the element at the specified position in the given list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_GetStartPoint (TPtxPdfContent_Subpath *pSubpath, TPtxGeomReal_Point *pStartPoint)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_IsClosed (TPtxPdfContent_Subpath *pSubpath)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Path *PDFTOOLBOX_CALL PtxPdfContent_Path_New (void)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_PathIterator *PDFTOOLBOX_CALL PtxPdfContent_Path_GetIterator (TPtxPdfContent_Path *pPath)
 Get an iterator for this enumerable.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Subpath *PDFTOOLBOX_CALL PtxPdfContent_PathIterator_GetValue (TPtxPdfContent_PathIterator *pPathIterator)
 Get the current element or NULLif no elements are left.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathIterator_MoveNext (TPtxPdfContent_PathIterator *pPathIterator)
 Move the iterator to the next element.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentGenerator *PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_New (TPtxPdfContent_Content *pContent, BOOL bPrepend)
 Create a new content generator for appending or prepending to the content of a group.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Save (TPtxPdfContent_ContentGenerator *pContentGenerator)
 Save the current graphics state The graphics state is stored on the graphics state stack. The following properties are affected:
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Restore (TPtxPdfContent_ContentGenerator *pContentGenerator)
 Restore the graphics state. The most recently saved state is restored and removed from the graphics state stack. The following properties are affected:
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Transform (TPtxPdfContent_ContentGenerator *pContentGenerator, const TPtxGeomReal_AffineTransform *pTransform)
 Modify the current transform matrix by concatenating the specified matrix.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintImage (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Image *pImage, const TPtxGeomReal_Rectangle *pTargetRect)
 Paint an image.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintImageMask (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_ImageMask *pImageMask, const TPtxGeomReal_Rectangle *pTargetRect, TPtxPdfContent_Paint *pPaint)
 Paint an image (stencil) mask.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintPath (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Path *pPath, TPtxPdfContent_Fill *pFill, TPtxPdfContent_Stroke *pStroke)
 Paint a path. The path is first filled and then stroked The blend mode for filling and stroking must be the same.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintText (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Text *pText)
 Paint text.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_ClipWithPath (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Path *pPath, TPtxPdfContent_InsideRule iInsideRule)
 Intersect clip path with path. Update the current clip path by intersecting with the given path.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_ClipWithText (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Text *pText)
 Intersect clip path with text. Update the current clip path by intersecting with the given text.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintGroup (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_Group *pGroup, const TPtxGeomReal_Rectangle *pTargetRect, TPtxPdfContent_Transparency *pTransparency)
 Paint a group.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_AppendContentElement (TPtxPdfContent_ContentGenerator *pContentGenerator, TPtxPdfContent_ContentElement *pContentElement)
 Paint a content element.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Close (TPtxPdfContent_ContentGenerator *pObject)
 Close object.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_PathGenerator *PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_New (TPtxPdfContent_Path *pPath)
 Create a new path generator for appending to a path.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_MoveTo (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Point *pTarget)
 Move the current position. Begin a new subpath by moving the current point to the specified coordinates, omitting any connecting line segment. If the previous path construction operator in the current path was also MoveTo, the new MoveTo overrides it; no vestige of the previous MoveTo operation remains in the path.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_LineTo (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Point *pTarget)
 Draw a line. Append a straight line segment from the current point to the target coordinates. The current position is changed to the target position.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_BezierTo (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Point *pControlPoint1, const TPtxGeomReal_Point *pControlPoint2, const TPtxGeomReal_Point *pTarget)
 Draw a bezier curve.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_CloseSubpath (TPtxPdfContent_PathGenerator *pPathGenerator)
 Close the current subpath. Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath. This operator terminates the current subpath; appending another segment to the current path will begin a new subpath, even if the new segment begins at the endpoint reached by the closeSubpath() operation. If the current subpath has already been closed, CloseSubpath() does nothing.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddRectangle (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Rectangle *pRectangle)
 Append a rectangle to the current path as a complete subpath.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddCircle (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Point *pCenter, double dRadius)
 Append a circle to the current path as a complete subpath.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddEllipse (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Rectangle *pRectangle)
 Add an ellipse to the current path as a complete subpath.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddArc (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Rectangle *pRectangle, double dAlpha1, double dAlpha2)
 Add an elliptical arc to the current path.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddPie (TPtxPdfContent_PathGenerator *pPathGenerator, const TPtxGeomReal_Rectangle *pRectangle, double dAlpha1, double dAlpha2)
 Add an elliptical piece of pie to the current path as a complete subpath.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_Close (TPtxPdfContent_PathGenerator *pObject)
 Close object.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_TextGenerator *PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_New (TPtxPdfContent_Text *pText, TPtxPdfContent_Font *pFont, double dFontSize, const TPtxGeomReal_Point *pLocation)
 Create a new text generator for appending text to a text content object. All parameters that cannot be set in the constructor are set to default values:
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_GetWidthA (TPtxPdfContent_TextGenerator *pTextGenerator, const char *szText)
 Get the width of a text string. The width of a text string as if it would be shown with the current settings.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_GetWidthW (TPtxPdfContent_TextGenerator *pTextGenerator, const WCHAR *szText)
 Get the width of a text string. The width of a text string as if it would be shown with the current settings.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowA (TPtxPdfContent_TextGenerator *pTextGenerator, const char *szText)
 Show a text string. The text is shown using the current settings.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowW (TPtxPdfContent_TextGenerator *pTextGenerator, const WCHAR *szText)
 Show a text string. The text is shown using the current settings.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowLineA (TPtxPdfContent_TextGenerator *pTextGenerator, const char *szText)
 Show a text string and go to the next line.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowLineW (TPtxPdfContent_TextGenerator *pTextGenerator, const WCHAR *szText)
 Show a text string and go to the next line.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_MoveTo (TPtxPdfContent_TextGenerator *pTextGenerator, const TPtxGeomReal_Point *pTarget)
 Move the current position. This also also sets the beginning of the current line to the specified position, which will affect the PtxPdfContent_TextGenerator_ShowLine method.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFill (TPtxPdfContent_TextGenerator *pTextGenerator, TPtxPdfContent_Paint *pFill)
 The paint for filling The fill paint or NULL if the text should not be filled.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetStroke (TPtxPdfContent_TextGenerator *pTextGenerator, TPtxPdfContent_Stroke *pStroke)
 The stroke properties The stroke properties or NULL if the text should not be stroked.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFont (TPtxPdfContent_TextGenerator *pTextGenerator, TPtxPdfContent_Font *pFont)
 the current font. The font is used for all subsequent PtxPdfContent_TextGenerator_Show and PtxPdfContent_TextGenerator_ShowLine calls.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFontSize (TPtxPdfContent_TextGenerator *pTextGenerator, double dFontSize)
 the current font size.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetCharacterSpacing (TPtxPdfContent_TextGenerator *pTextGenerator, double dCharacterSpacing)
 the current character spacing.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetWordSpacing (TPtxPdfContent_TextGenerator *pTextGenerator, double dWordSpacing)
 the current word spacing.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetHorizontalScaling (TPtxPdfContent_TextGenerator *pTextGenerator, double dHorizontalScaling)
 the current horizontal scaling.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetLeading (TPtxPdfContent_TextGenerator *pTextGenerator, double dLeading)
 the current leading.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetRise (TPtxPdfContent_TextGenerator *pTextGenerator, double dRise)
 the current rise of the baseline.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_Close (TPtxPdfContent_TextGenerator *pObject)
 Close object.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_Paint_Create (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_ColorSpace *pColorSpace, const double *pColor, size_t nColors, TPtxPdfContent_Transparency *pTransparency)
 Create an new paint. Transparency is supported by PDF 1.4 or higher and by PDF/A-2 or higher. The returned paint object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_Paint_GetColorSpace (TPtxPdfContent_Paint *pPaint)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Paint_GetColor (TPtxPdfContent_Paint *pPaint, double *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Transparency *PDFTOOLBOX_CALL PtxPdfContent_Paint_GetTransparency (TPtxPdfContent_Paint *pPaint)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetTextA (TPtxPdfContent_Glyph *pGlyph, char *pBuffer, size_t nBufferSize)
 glyph text This is the glyph's associated text.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetTextW (TPtxPdfContent_Glyph *pGlyph, WCHAR *pBuffer, size_t nBufferSize)
 glyph text This is the glyph's associated text.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetPosition (TPtxPdfContent_Glyph *pGlyph, TPtxGeomReal_Point *pPosition)
 glyph position
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetWidth (TPtxPdfContent_Glyph *pGlyph)
 glyph width This is the width of the glyph.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetCount (TPtxPdfContent_TextFragment *pTextFragment)
 Get the number of elements in the list.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Glyph *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_Get (TPtxPdfContent_TextFragment *pTextFragment, int iIndex)
 Returns the element at the specified position in the given list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_Remove (TPtxPdfContent_TextFragment *pTextFragment, int iIndex)
 Remove certain element from list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetBoundingBox (TPtxPdfContent_TextFragment *pTextFragment, TPtxGeomReal_Rectangle *pBoundingBox)
 the bounding box This is a rectangle that encompasses all parts of the text fragment.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTransform (TPtxPdfContent_TextFragment *pTextFragment, TPtxGeomReal_AffineTransform *pTransform)
 the transform to be applied to the bounding box rectangle Use this transform matrix to compute the actual location of the text fragment's bounding box.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTextA (TPtxPdfContent_TextFragment *pTextFragment, char *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTextW (TPtxPdfContent_TextFragment *pTextFragment, WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetStroke (TPtxPdfContent_TextFragment *pTextFragment)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Fill *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFill (TPtxPdfContent_TextFragment *pTextFragment)
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFontSize (TPtxPdfContent_TextFragment *pTextFragment)
 The font size.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetCharacterSpacing (TPtxPdfContent_TextFragment *pTextFragment)
 The additional spacing between glyphs When the glyph for each character in the text is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. It is subject to scaling by the horizontal scaling if the writing mode is horizontal.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetWordSpacing (TPtxPdfContent_TextFragment *pTextFragment)
 The additional spacing between words Word spacing works the same way as character spacing, but applies only to the space character, code 32.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetHorizontalScaling (TPtxPdfContent_TextFragment *pTextFragment)
 The horizontal scaling factor The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified relative to the normal width of the glyphs, with 1 being the normal width.
 
PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetRise (TPtxPdfContent_TextFragment *pTextFragment)
 The rise of the baseline The text rise specifies the distance to move the baseline up or down from its default location. Positive values of text rise move the baseline up. Adjustments to the baseline are useful for drawing superscripts or subscripts.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_WritingMode PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetWritingMode (TPtxPdfContent_TextFragment *pTextFragment)
 The writing direction This is the writing mode for the text fragment. It applies to all contained TPtxPdfContent_Glyphs.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFont (TPtxPdfContent_TextFragment *pTextFragment)
 The font The returned TPtxPdfContent_Font can only be used for extraction purposes. Specifically, using this object in PtxPdfContent_TextGenerator_New or in PtxPdfContent_TextGenerator_SetFont results in a ePtx_Error_IllegalArgument error.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Text *PDFTOOLBOX_CALL PtxPdfContent_Text_Create (TPtxPdf_Document *pTargetDocument)
 Create a text The returned text object is not yet used on any page, but it is associated with the given target document.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Text_GetCount (TPtxPdfContent_Text *pText)
 Get the number of elements in the list.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_TextFragment *PDFTOOLBOX_CALL PtxPdfContent_Text_Get (TPtxPdfContent_Text *pText, int iIndex)
 Returns the element at the specified position in the given list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Text_Clear (TPtxPdfContent_Text *pText)
 Clear list.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Text_Remove (TPtxPdfContent_Text *pText, int iIndex)
 Remove certain element from list.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElement *PDFTOOLBOX_CALL PtxPdfContent_ContentElement_Copy (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_ContentElement *pContentElement)
 Copy a content element The returned object is associated with the given target document but not yet part of it.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetBoundingBox (TPtxPdfContent_ContentElement *pContentElement, TPtxGeomReal_Rectangle *pBoundingBox)
 the bounding box This is a rectangle that encompasses all parts of an element.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetTransform (TPtxPdfContent_ContentElement *pContentElement, TPtxGeomReal_AffineTransform *pTransform)
 the transform to be applied to the alignment rectangle Use this transform matrix to compute the actual location of the element's alignment rectangle.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_SetTransform (TPtxPdfContent_ContentElement *pContentElement, const TPtxGeomReal_AffineTransform *pTransform)
 the transform to be applied to the alignment rectangle Use this transform matrix to compute the actual location of the element's alignment rectangle.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElementType PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetType (TPtxPdfContent_ContentElement *pContentElement)
 Get actual derived type of base type TPtxPdfContent_ContentElement.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Text *PDFTOOLBOX_CALL PtxPdfContent_TextElement_GetText (TPtxPdfContent_TextElement *pTextElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_GroupElement *PDFTOOLBOX_CALL PtxPdfContent_GroupElement_CopyWithoutContent (TPtxPdf_Document *pTargetDocument, TPtxPdfContent_GroupElement *pGroupElement)
 Copy a group element without copying its content Create a new group element, taking a given group element as a template. The newly created group has the same properties, such as geometric transform, clipping, and soft mask, but it's content is empty. The returned object is associated with the given target document but not yet part of it.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_GroupElement_GetGroup (TPtxPdfContent_GroupElement *pGroupElement)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetAlignmentBox (TPtxPdfContent_PathElement *pPathElement, TPtxGeomReal_Rectangle *pAlignmentBox)
 the box for alignment This is a rectangle that may not encompass all parts of an element, but is usefull for alignment.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Path *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetPath (TPtxPdfContent_PathElement *pPathElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetStroke (TPtxPdfContent_PathElement *pPathElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Fill *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetFill (TPtxPdfContent_PathElement *pPathElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Image *PDFTOOLBOX_CALL PtxPdfContent_ImageElement_GetImage (TPtxPdfContent_ImageElement *pImageElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ImageMask *PDFTOOLBOX_CALL PtxPdfContent_ImageMaskElement_GetImageMask (TPtxPdfContent_ImageMaskElement *pImageMaskElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_ImageMaskElement_GetPaint (TPtxPdfContent_ImageMaskElement *pImageMaskElement)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentExtractor *PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_New (TPtxPdfContent_Content *pContent)
 Create a new content extractor.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentExtractorIterator *PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_GetIterator (TPtxPdfContent_ContentExtractor *pContentExtractor)
 Get an iterator for this enumerable.
 
PDFTOOLBOX_EXPORT TPtxPdfContent_UngroupingSelection PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_GetUngrouping (TPtxPdfContent_ContentExtractor *pContentExtractor)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_SetUngrouping (TPtxPdfContent_ContentExtractor *pContentExtractor, TPtxPdfContent_UngroupingSelection iUngrouping)
 
PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElement *PDFTOOLBOX_CALL PtxPdfContent_ContentExtractorIterator_GetValue (TPtxPdfContent_ContentExtractorIterator *pContentExtractorIterator)
 Get the current element or NULLif no elements are left.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentExtractorIterator_MoveNext (TPtxPdfContent_ContentExtractorIterator *pContentExtractorIterator)
 Move the iterator to the next element.
 

Macro Definition Documentation

◆ PDFTOOLBOX_CALL

#define PDFTOOLBOX_CALL

◆ PtxPdfContent_Font_CreateFromSystem

#define PtxPdfContent_Font_CreateFromSystem   PtxPdfContent_Font_CreateFromSystemA

◆ PtxPdfContent_Font_GetBaseFont

#define PtxPdfContent_Font_GetBaseFont   PtxPdfContent_Font_GetBaseFontA

◆ PtxPdfContent_Glyph_GetText

#define PtxPdfContent_Glyph_GetText   PtxPdfContent_Glyph_GetTextA

◆ PtxPdfContent_TextFragment_GetText

#define PtxPdfContent_TextFragment_GetText   PtxPdfContent_TextFragment_GetTextA

◆ PtxPdfContent_TextGenerator_GetWidth

#define PtxPdfContent_TextGenerator_GetWidth   PtxPdfContent_TextGenerator_GetWidthA

◆ PtxPdfContent_TextGenerator_Show

#define PtxPdfContent_TextGenerator_Show   PtxPdfContent_TextGenerator_ShowA

◆ PtxPdfContent_TextGenerator_ShowLine

#define PtxPdfContent_TextGenerator_ShowLine   PtxPdfContent_TextGenerator_ShowLineA

Function Documentation

◆ PtxPdfContent_ColorSpace_Copy()

PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_Copy ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_ColorSpace * pColorSpace )

Copy a color space Copy a color space object from an input document to the given pTargetDocument. The returned object is associated with the given target document but not yet part of it.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pColorSpacea color space of a different document
Returns
the copied color space, associated with the current document.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ColorSpace_CreateProcessColorSpace()

PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_CreateProcessColorSpace ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_ProcessColorSpaceType iType )

Get the canonical grayscale, RGB, or CMYK color space. Depending on the PDF/A compliance and the output intent, this is either a device color space (TPtxPdfContent_DeviceGrayColorSpace, TPtxPdfContent_DeviceRgbColorSpace, TPtxPdfContent_DeviceCmykColorSpace), a calibrated color space (TPtxPdfContent_CalibratedGrayColorSpace, TPtxPdfContent_CalibratedRgbColorSpace), or an ICC-based color space (4-channel TPtxPdfContent_IccBasedColorSpace). The returned color space object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]iTypethe color space type
Returns
newly created color space object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ColorSpace_GetComponentCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_ColorSpace_GetComponentCount ( TPtxPdfContent_ColorSpace * pColorSpace)

the number of components in the color space.

Parameters
[in,out]pColorSpaceActs as a handle to the native object of type TPtxPdfContent_ColorSpace.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ColorSpace_GetType()

Get actual derived type of base type TPtxPdfContent_ColorSpace.

This function is invoked prior to downcasting to ascertain the derived object type.

Parameters
[in,out]pColorSpaceActs as a handle to a native object.
Returns
The item of the enumeration TPtxPdfContent_ColorSpaceType that refers to the actual derived type. 0 in case of an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_ContentElement_Copy()

PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElement *PDFTOOLBOX_CALL PtxPdfContent_ContentElement_Copy ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_ContentElement * pContentElement )

Copy a content element The returned object is associated with the given target document but not yet part of it.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pContentElementa content element of a different document
Returns
the copied content element, associated with the current document

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentElement_GetBoundingBox()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetBoundingBox ( TPtxPdfContent_ContentElement * pContentElement,
TPtxGeomReal_Rectangle * pBoundingBox )

the bounding box This is a rectangle that encompasses all parts of an element.

Parameters
[in,out]pContentElementActs as a handle to the native object of type TPtxPdfContent_ContentElement.
[out]pBoundingBoxRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentElement_GetTransform()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetTransform ( TPtxPdfContent_ContentElement * pContentElement,
TPtxGeomReal_AffineTransform * pTransform )

the transform to be applied to the alignment rectangle Use this transform matrix to compute the actual location of the element's alignment rectangle.

Parameters
[in,out]pContentElementActs as a handle to the native object of type TPtxPdfContent_ContentElement.
[out]pTransformRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentElement_GetType()

PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElementType PDFTOOLBOX_CALL PtxPdfContent_ContentElement_GetType ( TPtxPdfContent_ContentElement * pContentElement)

Get actual derived type of base type TPtxPdfContent_ContentElement.

This function is invoked prior to downcasting to ascertain the derived object type.

Parameters
[in,out]pContentElementActs as a handle to a native object.
Returns
The item of the enumeration TPtxPdfContent_ContentElementType that refers to the actual derived type. 0 in case of an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_ContentElement_SetTransform()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentElement_SetTransform ( TPtxPdfContent_ContentElement * pContentElement,
const TPtxGeomReal_AffineTransform * pTransform )

the transform to be applied to the alignment rectangle Use this transform matrix to compute the actual location of the element's alignment rectangle.

Parameters
[in,out]pContentElementActs as a handle to the native object of type TPtxPdfContent_ContentElement.
[in]pTransformSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractor_GetIterator()

PDFTOOLBOX_EXPORT TPtxPdfContent_ContentExtractorIterator *PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_GetIterator ( TPtxPdfContent_ContentExtractor * pContentExtractor)

Get an iterator for this enumerable.

Parameters
[in,out]pContentExtractorActs as a handle to the native object of type TPtxPdfContent_ContentExtractor.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractor_GetUngrouping()

PDFTOOLBOX_EXPORT TPtxPdfContent_UngroupingSelection PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_GetUngrouping ( TPtxPdfContent_ContentExtractor * pContentExtractor)

Configures the extractor's behavior regarding the selection of groups to be un-grouped. Default value: ePtxPdfContent_UngroupingSelection_None.

Parameters
[in,out]pContentExtractorActs as a handle to the native object of type TPtxPdfContent_ContentExtractor.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractor_New()

Create a new content extractor.

Parameters
[in,out]pContentthe content object of a page or group
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractor_SetUngrouping()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentExtractor_SetUngrouping ( TPtxPdfContent_ContentExtractor * pContentExtractor,
TPtxPdfContent_UngroupingSelection iUngrouping )

Configures the extractor's behavior regarding the selection of groups to be un-grouped. Default value: ePtxPdfContent_UngroupingSelection_None.

Parameters
[in,out]pContentExtractorActs as a handle to the native object of type TPtxPdfContent_ContentExtractor.
[in]iUngroupingSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractorIterator_GetValue()

PDFTOOLBOX_EXPORT TPtxPdfContent_ContentElement *PDFTOOLBOX_CALL PtxPdfContent_ContentExtractorIterator_GetValue ( TPtxPdfContent_ContentExtractorIterator * pContentExtractorIterator)

Get the current element or NULLif no elements are left.

Parameters
[in,out]pContentExtractorIteratorActs as a handle to the native object of type TPtxPdfContent_ContentExtractorIterator.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentExtractorIterator_MoveNext()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentExtractorIterator_MoveNext ( TPtxPdfContent_ContentExtractorIterator * pContentExtractorIterator)

Move the iterator to the next element.

Parameters
[in,out]pContentExtractorIteratorActs as a handle to the native object of type TPtxPdfContent_ContentExtractorIterator.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_AppendContentElement()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_AppendContentElement ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_ContentElement * pContentElement )

Paint a content element.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pContentElementthe content element to be painted
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_ClipWithPath()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_ClipWithPath ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Path * pPath,
TPtxPdfContent_InsideRule iInsideRule )

Intersect clip path with path. Update the current clip path by intersecting with the given path.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pPaththe path to intersect with the current clip path
[in]iInsideRulethe inside rule of the path argument
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_ClipWithText()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_ClipWithText ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Text * pText )

Intersect clip path with text. Update the current clip path by intersecting with the given text.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pTextthe text to intersect with the current clip path
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_Close()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Close ( TPtxPdfContent_ContentGenerator * pObject)

Close object.

Close disposable objects by invoking this function.

Parameters
[in]pObjectDisposable object.
Returns
TRUE if the object was closed successfully; FALSE if an error occured while closing the object. Retrieve the error code by calling Ptx_GetLastError .

◆ PtxPdfContent_ContentGenerator_New()

PDFTOOLBOX_EXPORT TPtxPdfContent_ContentGenerator *PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_New ( TPtxPdfContent_Content * pContent,
BOOL bPrepend )

Create a new content generator for appending or prepending to the content of a group.

Parameters
[in,out]pContentthe content object of a page or group
[in]bPrependTRUE for prepending to the content (apply content to background of page), FALSE for appending (apply content to foreground of page)
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_PaintGroup()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintGroup ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Group * pGroup,
const TPtxGeomReal_Rectangle * pTargetRect,
TPtxPdfContent_Transparency * pTransparency )

Paint a group.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pGroupthe group to be painted
[in]pTargetRectthe target rectangle in the current coordinate system. If targetRect is NULL, a default rectangle [0, 0, width, height] is used, where width and height are the dimensions of the given pGroup's Size
[in,out]pTransparencythe transparency to be used when painting the group. If Transparency is NULL, then the group is painted opaquely.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_PaintImage()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintImage ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Image * pImage,
const TPtxGeomReal_Rectangle * pTargetRect )

Paint an image.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pImagethe image to be painted
[in]pTargetRectthe target rectangle in the current coordinate system. If targetRect is NULL, the unit rectangle [0, 0, 1, 1] is used.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_PaintImageMask()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintImageMask ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_ImageMask * pImageMask,
const TPtxGeomReal_Rectangle * pTargetRect,
TPtxPdfContent_Paint * pPaint )

Paint an image (stencil) mask.

An image mask is a monochrome image, in which each sample is specified by a single bit. However, instead of being painted in opaque black and white, the image mask is treated as a stencil mask that is partly opaque and partly transparent. Sample values in the image do not represent black and white pixels; rather, they designate places on the content that should either be marked with the given paint or masked out (not marked at all). Areas that are masked out retain their former content.

The effect is like applying paint in the current color through a cut-out stencil, which allows the paint to reach the page in some places and masks it out in others.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pImageMaskthe image (stencil) mask
[in]pTargetRectthe target rectangle in the current coordinate system. If targetRect is NULL, the unit rectangle [0, 0, 1, 1] is used.
[in,out]pPaintthe paint for filling marked pixels
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_PaintPath()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintPath ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Path * pPath,
TPtxPdfContent_Fill * pFill,
TPtxPdfContent_Stroke * pStroke )

Paint a path. The path is first filled and then stroked The blend mode for filling and stroking must be the same.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pPaththe path to be painted
[in,out]pFillthe fill properties or NULL if the path should not be filled
[in,out]pStrokethe stroke properties or NULL if the path should not be stroked
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_PaintText()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_PaintText ( TPtxPdfContent_ContentGenerator * pContentGenerator,
TPtxPdfContent_Text * pText )

Paint text.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in,out]pTextthe text to be painted
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_Restore()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Restore ( TPtxPdfContent_ContentGenerator * pContentGenerator)

Restore the graphics state. The most recently saved state is restored and removed from the graphics state stack. The following properties are affected:

  • The current transform matrix
  • The current clip path
Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_Save()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Save ( TPtxPdfContent_ContentGenerator * pContentGenerator)

Save the current graphics state The graphics state is stored on the graphics state stack. The following properties are affected:

  • The current transform matrix
  • The current clip path
Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ContentGenerator_Transform()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ContentGenerator_Transform ( TPtxPdfContent_ContentGenerator * pContentGenerator,
const TPtxGeomReal_AffineTransform * pTransform )

Modify the current transform matrix by concatenating the specified matrix.

Parameters
[in,out]pContentGeneratorActs as a handle to the native object of type TPtxPdfContent_ContentGenerator.
[in]pTransformthe transform that is applied to the current transform
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Fill_GetInsideRule()

Parameters
[in,out]pFillActs as a handle to the native object of type TPtxPdfContent_Fill.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Fill_GetPaint()

Parameters
[in,out]pFillActs as a handle to the native object of type TPtxPdfContent_Fill.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Fill_New()

Parameters
[in,out]pPaint
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Fill_SetInsideRule()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Fill_SetInsideRule ( TPtxPdfContent_Fill * pFill,
TPtxPdfContent_InsideRule iInsideRule )
Parameters
[in,out]pFillActs as a handle to the native object of type TPtxPdfContent_Fill.
[in]iInsideRuleSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Fill_SetPaint()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Fill_SetPaint ( TPtxPdfContent_Fill * pFill,
TPtxPdfContent_Paint * pPaint )
Parameters
[in,out]pFillActs as a handle to the native object of type TPtxPdfContent_Fill.
[in,out]pPaintSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_Create ( TPtxPdf_Document * pTargetDocument,
const TPtxSys_StreamDescriptor * pStreamDesc,
BOOL bEmbedded )

Create a new font object from font file data. Supported formats are:

  • Type1
  • CFF
  • TrueType
  • OpenType The returned font object is not yet used on any page, but it is associated with the given target document.
Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]pStreamDescthe font file data stream
[in]bEmbeddedTRUE if the font shall be embedded in the document. Note that this parameter must be TRUE for PDF/A documents.
Returns
the newly created font object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_CreateFromSystemA()

PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_CreateFromSystemA ( TPtxPdf_Document * pTargetDocument,
const char * szFamily,
const char * szStyle,
BOOL bEmbedded )

Create a new font object from an installed font. The returned font object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]szFamilythe font family name (e.g. "Arial")
[in]szStylethe font style (e.g. "Bold")
[in]bEmbeddedTRUE if the font shall be embedded in the document. Note that this parameter must be TRUE for PDF/A documents.
Returns
the newly created font object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_CreateFromSystemW()

PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_Font_CreateFromSystemW ( TPtxPdf_Document * pTargetDocument,
const WCHAR * szFamily,
const WCHAR * szStyle,
BOOL bEmbedded )

Create a new font object from an installed font. The returned font object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]szFamilythe font family name (e.g. "Arial")
[in]szStylethe font style (e.g. "Bold")
[in]bEmbeddedTRUE if the font shall be embedded in the document. Note that this parameter must be TRUE for PDF/A documents.
Returns
the newly created font object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetAscent()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetAscent ( TPtxPdfContent_Font * pFont)

the ascent of the font. The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetBaseFontA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Font_GetBaseFontA ( TPtxPdfContent_Font * pFont,
char * pBuffer,
size_t nBufferSize )

the PostScript name of the font

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetBaseFontW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Font_GetBaseFontW ( TPtxPdfContent_Font * pFont,
WCHAR * pBuffer,
size_t nBufferSize )

the PostScript name of the font

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetCapHeight()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetCapHeight ( TPtxPdfContent_Font * pFont)

the cap height of the font. The vertical coordinate of the top of flat capital letters, measured from the baseline.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetCharacterWidth()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetCharacterWidth ( TPtxPdfContent_Font * pFont,
int iCharacter )

the width of a single glyph.

The width of a unicode character (in pt) relative to a font size of 1 pt.

If an error occurs (because the font or the owning document has already been closed) this method returns 0. But a return value of 0 is not generally an indication for failure.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
[in]iCharacterthe unicode character code.
Returns
the width of the character

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_Font_GetDescent()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetDescent ( TPtxPdfContent_Font * pFont)

the descent of the font. The maximum depth below the baseline reached by glyphs in this font. The value is a negative number.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetItalicAngle()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Font_GetItalicAngle ( TPtxPdfContent_Font * pFont)

the italic angle of the font. The angle is expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. (For example, the 9-o’clock position is 90 degrees, and the 3-o’clock position is –90 degrees.) The value is negative for fonts that slope to the right, as almost all italic fonts do.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetLeading()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Font_GetLeading ( TPtxPdfContent_Font * pFont,
double * pLeading )

the leading of the font.

The vertical distance between two adjacent base lines in multiline text.

This is a recomended value when generating several lines of text. If the font does not define this value, NULL is returned.

Note that PtxPdfContent_TextGenerator_New uses a fixed value of 1.2 instead of this property to initialize the PtxPdfContent_TextGenerator_SetLeading in order to maintain backward compatibility with earlier versions.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
[out]pLeadingRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Font_GetWeight()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Font_GetWeight ( TPtxPdfContent_Font * pFont,
TPtxPdfContent_FontWeight * pWeight )

the visual weight of the font. Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. If the font does not define this value, NULL is returned.

Parameters
[in,out]pFontActs as a handle to the native object of type TPtxPdfContent_Font.
[out]pWeightRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Glyph_GetPosition()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetPosition ( TPtxPdfContent_Glyph * pGlyph,
TPtxGeomReal_Point * pPosition )

glyph position

This is the position of the glyph within its TPtxPdfContent_TextFragment. To find the point on the page this position has to be transformed with PtxPdfContent_TextFragment_GetTransform.

The extent of the glyph with respect to its position depends on the text fragment's PtxPdfContent_TextFragment_GetWritingMode. In ePtxPdfContent_WritingMode_Horizontal writing mode, the glyph's position is at the left of the glyph on the height of the base line. In ePtxPdfContent_WritingMode_Vertical writing mode, the glyph's position is at the middle of the glyph's horizontal extent, vertically at the top.

Parameters
[in,out]pGlyphActs as a handle to the native object of type TPtxPdfContent_Glyph.
[out]pPositionRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Glyph_GetTextA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetTextA ( TPtxPdfContent_Glyph * pGlyph,
char * pBuffer,
size_t nBufferSize )

glyph text This is the glyph's associated text.

Parameters
[in,out]pGlyphActs as a handle to the native object of type TPtxPdfContent_Glyph.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Glyph_GetTextW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetTextW ( TPtxPdfContent_Glyph * pGlyph,
WCHAR * pBuffer,
size_t nBufferSize )

glyph text This is the glyph's associated text.

Parameters
[in,out]pGlyphActs as a handle to the native object of type TPtxPdfContent_Glyph.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Glyph_GetWidth()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Glyph_GetWidth ( TPtxPdfContent_Glyph * pGlyph)

glyph width This is the width of the glyph.

Parameters
[in,out]pGlyphActs as a handle to the native object of type TPtxPdfContent_Glyph.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_CopyFromPage()

PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_Group_CopyFromPage ( TPtxPdf_Document * pTargetDocument,
TPtxPdf_Page * pPage,
TPtxPdf_PageCopyOptions * pOptions )

Create a group object from a page.

From a given page in an input document, create a group object in the given target document. The returned object is associated with the target document but not yet part of it.

A group that contains interactive elements can be painted once only. Interactive elements are annotations, group fields, outlines or logical structure information. If a group needs to be painted multiple times, interactive elements can be flattened or the group can be copied multiple times from the page.

There are some interactive elements such as form fields or text annotations that cannot be rotated. So if you plan to rotate the group, it is recommended to flatten form fields and annotations.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pPagea page of a different document
[in,out]pOptionsthe copy options
Returns
the copied group, associated with the current document.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_Group_Create ( TPtxPdf_Document * pTargetDocument,
const TPtxGeomReal_Size * pSize )

Create an empty group object. The returned group object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]pSizethe size of the group
Returns
the newly created group object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_GetContent()

the group content. If the group is writable, the content object can be used to apply new content on the group.

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_GetIsolated()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetIsolated ( TPtxPdfContent_Group * pGroup)

the transparency isolation behavior

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_GetKnockout()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetKnockout ( TPtxPdfContent_Group * pGroup)

the transparency knockout behavior

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_GetSize()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_GetSize ( TPtxPdfContent_Group * pGroup,
TPtxGeomReal_Size * pSize )

the size of the group.

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
[out]pSizeRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_SetIsolated()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_SetIsolated ( TPtxPdfContent_Group * pGroup,
BOOL bIsolated )

the transparency isolation behavior

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
[in]bIsolatedSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Group_SetKnockout()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Group_SetKnockout ( TPtxPdfContent_Group * pGroup,
BOOL bKnockout )

the transparency knockout behavior

Parameters
[in,out]pGroupActs as a handle to the native object of type TPtxPdfContent_Group.
[in]bKnockoutSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_GroupElement_CopyWithoutContent()

PDFTOOLBOX_EXPORT TPtxPdfContent_GroupElement *PDFTOOLBOX_CALL PtxPdfContent_GroupElement_CopyWithoutContent ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_GroupElement * pGroupElement )

Copy a group element without copying its content Create a new group element, taking a given group element as a template. The newly created group has the same properties, such as geometric transform, clipping, and soft mask, but it's content is empty. The returned object is associated with the given target document but not yet part of it.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pGroupElementa group element of a different document
Returns
the new group element, associated with the current document

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_GroupElement_GetGroup()

PDFTOOLBOX_EXPORT TPtxPdfContent_Group *PDFTOOLBOX_CALL PtxPdfContent_GroupElement_GetGroup ( TPtxPdfContent_GroupElement * pGroupElement)

This group element's group object.

Parameters
[in,out]pGroupElementActs as a handle to the native object of type TPtxPdfContent_GroupElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_IccBasedColorSpace_Copy()

PDFTOOLBOX_EXPORT TPtxPdfContent_IccBasedColorSpace *PDFTOOLBOX_CALL PtxPdfContent_IccBasedColorSpace_Copy ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_IccBasedColorSpace * pColorSpace )

Copy an ICC-based color space Copy an ICC-based color space object from an input document to the given pTargetDocument. The returned object is associated with the given target document but not yet part of it.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pColorSpacean ICC-based color space of a different document
Returns
the copied color space, associated with the current document.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_IccBasedColorSpace_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_IccBasedColorSpace *PDFTOOLBOX_CALL PtxPdfContent_IccBasedColorSpace_Create ( TPtxPdf_Document * pTargetDocument,
const TPtxSys_StreamDescriptor * pProfile )

Create an new ICC-based color space from an ICC color profile. The returned color space object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]pProfilethe color profile data stream
Returns
newly created color profile object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_Image *PDFTOOLBOX_CALL PtxPdfContent_Image_Create ( TPtxPdf_Document * pTargetDocument,
const TPtxSys_StreamDescriptor * pStreamDesc )

Create an image object from image data. Supported formats are:

  • BMP
  • DIB
  • JPEG
  • JPEG2000
  • JBIG2
  • PNG
  • GIF The returned image object is not yet painted on any page, but it is associated with the given target document.
Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]pStreamDescthe image data stream
Returns
the newly created image object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_Extract()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Image_Extract ( TPtxPdfContent_Image * pImage,
const TPtxSys_StreamDescriptor * pStreamDesc,
const TPtxPdfContent_ImageType * pImageType )

Extract embedded image from PDF.

Facilitate the extraction of images from a specified page within a PDF, outputting them in the pImageType format.

By default, the method determines the format of the extracted image based on the embedded image data present within the PDF. Users can ascertain the default image format through PtxPdfContent_Image_GetDefaultImageType. It's important to note that not all image types or conversion processes are universally supported, hence adhering to the default TPtxPdfContent_ImageType is advisable for optimal compatibility.

Key considerations include:

  • The extraction process isolates the image from the page's resources, neglecting any contextual attributes from the PDF page. Consequently, the original resolution and modifications—such as scaling, rotation, or cropping—that influence the image's appearance on the page are not preserved in the extracted image.
  • In instances where a ePtx_Error_Generic error arises, the output file may be compromised and rendered unusable.

This method is designed to efficiently retrieve images without their page-specific modifications, ensuring a straightforward extraction process.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
[in,out]pStreamDescThe image data stream.
[in]pImageTypeThe desired image type of the extracted image stream. If the embedded image data cannot be directly extracted to the chosen ImageType, the data is first recompressed and then extracted to the chosen ImageType. In this case, extraction is slower and there can be some loss of image quality. The default image type can be retrieved by calling PtxPdfContent_Image_GetDefaultImageType.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_GetBitsPerComponent()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Image_GetBitsPerComponent ( TPtxPdfContent_Image * pImage)

the number of bits per component. The number of bits used to represent each color component. Only a single value may be specified; the number of bits is the same for all color components. Valid values are 1, 2, 4, and 8.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_GetColorSpace()

PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_Image_GetColorSpace ( TPtxPdfContent_Image * pImage)

the color space in which image samples are specified.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_GetDefaultImageType()

PDFTOOLBOX_EXPORT TPtxPdfContent_ImageType PDFTOOLBOX_CALL PtxPdfContent_Image_GetDefaultImageType ( TPtxPdfContent_Image * pImage)

Default extracted image type. The default image type that will be extracted, based on the way that the image data is compressed and stored in the PDF file. The type of the output image is ePtxPdfContent_ImageType_Jpeg for embedded JPEG and JPEG2000 images. In all other cases the image type will be ePtxPdfContent_ImageType_Tiff.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_GetSamples()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Image_GetSamples ( TPtxPdfContent_Image * pImage,
unsigned char * pBuffer,
size_t nBufferSize )

The raw content of the image.

The samples (pixels) are given in order, top to bottom, left to right. Each sample is given component by component. There is no padding between components or samples, except that each row of sample data begins on a byte boundary. If the number of data bits per row is not a multiple of 8, the end of the row is padded with extra bits to fill out the last byte. Padding bits should be ignored.

Most often, each component is 8 bits, so there's no packing/unpacking or alignment/padding. Components with 2 or 4 bits are very rare.

If the image is compressed, it will be decompressed in order to get the samples. For very large images, this may take some time.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved array pBuffer.
Returns
The amount of data written to the buffer pBuffer. -1 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Image_GetSize()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Image_GetSize ( TPtxPdfContent_Image * pImage,
TPtxGeomInt_Size * pSize )

The size of the image in samples. Samples are often also called pixels.

Parameters
[in,out]pImageActs as a handle to the native object of type TPtxPdfContent_Image.
[out]pSizeRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageElement_GetImage()

PDFTOOLBOX_EXPORT TPtxPdfContent_Image *PDFTOOLBOX_CALL PtxPdfContent_ImageElement_GetImage ( TPtxPdfContent_ImageElement * pImageElement)

This element's image.

Parameters
[in,out]pImageElementActs as a handle to the native object of type TPtxPdfContent_ImageElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageMask_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_ImageMask *PDFTOOLBOX_CALL PtxPdfContent_ImageMask_Create ( TPtxPdf_Document * pTargetDocument,
const TPtxSys_StreamDescriptor * pStreamDesc )

Create an image mask object from image data. Supported formats are:

  • BMP
  • DIB
  • JBIG2
  • PNG
  • GIF The returned image mask object is not yet painted on any page, but it is associated with the given target document.
Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in]pStreamDescthe image data stream
Returns
the newly created image mask object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageMask_Extract()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ImageMask_Extract ( TPtxPdfContent_ImageMask * pImageMask,
const TPtxSys_StreamDescriptor * pStreamDesc,
const TPtxPdfContent_ImageType * pImageType )

Extract image mask from PDF.

Facilitate the extraction of image masks from a specified page within a PDF, outputting them in the pImageType format.

By default pImageType takes the value ePtxPdfContent_ImageType_Tiff.

Key considerations include:

  • The extraction process isolates the image from the page's resources, neglecting any contextual attributes from the PDF page. Consequently, the original resolution and modifications—such as scaling, rotation, or cropping—that influence the image's appearance on the page are not preserved in the extracted image mask.
  • In instances where a ePtx_Error_Generic error arises, the output file may be compromised and rendered unusable.

This method is designed to efficiently retrieve image masks without their page-specific modifications, ensuring a straightforward extraction process.

Parameters
[in,out]pImageMaskActs as a handle to the native object of type TPtxPdfContent_ImageMask.
[in,out]pStreamDescThe image mask data stream.
[in]pImageType
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageMask_GetSize()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_ImageMask_GetSize ( TPtxPdfContent_ImageMask * pImageMask,
TPtxGeomInt_Size * pSize )

The size of the image mask in samples.

Parameters
[in,out]pImageMaskActs as a handle to the native object of type TPtxPdfContent_ImageMask.
[out]pSizeRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageMaskElement_GetImageMask()

PDFTOOLBOX_EXPORT TPtxPdfContent_ImageMask *PDFTOOLBOX_CALL PtxPdfContent_ImageMaskElement_GetImageMask ( TPtxPdfContent_ImageMaskElement * pImageMaskElement)

This element's image mask.

Parameters
[in,out]pImageMaskElementActs as a handle to the native object of type TPtxPdfContent_ImageMaskElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_ImageMaskElement_GetPaint()

PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_ImageMaskElement_GetPaint ( TPtxPdfContent_ImageMaskElement * pImageMaskElement)

The paint used to draw the image mask.

Parameters
[in,out]pImageMaskElementActs as a handle to the native object of type TPtxPdfContent_ImageMaskElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Paint_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_Paint_Create ( TPtxPdf_Document * pTargetDocument,
TPtxPdfContent_ColorSpace * pColorSpace,
const double * pColor,
size_t nColors,
TPtxPdfContent_Transparency * pTransparency )

Create an new paint. Transparency is supported by PDF 1.4 or higher and by PDF/A-2 or higher. The returned paint object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
[in,out]pColorSpacethe color space of the paint
[in]pColorthe color components
[in]nColorsSize of the array pColor.
[in,out]pTransparencythe transparency parameters. Use NULL to create an opaque paint.
Returns
newly created paint object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Paint_GetColor()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Paint_GetColor ( TPtxPdfContent_Paint * pPaint,
double * pBuffer,
size_t nBufferSize )

The color values of this paint.

Parameters
[in,out]pPaintActs as a handle to the native object of type TPtxPdfContent_Paint.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved array pBuffer.
Returns
The amount of data written to the buffer pBuffer. -1 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Paint_GetColorSpace()

PDFTOOLBOX_EXPORT TPtxPdfContent_ColorSpace *PDFTOOLBOX_CALL PtxPdfContent_Paint_GetColorSpace ( TPtxPdfContent_Paint * pPaint)

The color space of this paint.

Parameters
[in,out]pPaintActs as a handle to the native object of type TPtxPdfContent_Paint.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Paint_GetTransparency()

PDFTOOLBOX_EXPORT TPtxPdfContent_Transparency *PDFTOOLBOX_CALL PtxPdfContent_Paint_GetTransparency ( TPtxPdfContent_Paint * pPaint)

The transparency parameters of this paint or NULL if this paint is opaque.

Parameters
[in,out]pPaintActs as a handle to the native object of type TPtxPdfContent_Paint.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Path_GetIterator()

Get an iterator for this enumerable.

Parameters
[in,out]pPathActs as a handle to the native object of type TPtxPdfContent_Path.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Path_New()

PDFTOOLBOX_EXPORT TPtxPdfContent_Path *PDFTOOLBOX_CALL PtxPdfContent_Path_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_PathElement_GetAlignmentBox()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetAlignmentBox ( TPtxPdfContent_PathElement * pPathElement,
TPtxGeomReal_Rectangle * pAlignmentBox )

the box for alignment This is a rectangle that may not encompass all parts of an element, but is usefull for alignment.

Parameters
[in,out]pPathElementActs as a handle to the native object of type TPtxPdfContent_PathElement.
[out]pAlignmentBoxRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathElement_GetFill()

PDFTOOLBOX_EXPORT TPtxPdfContent_Fill *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetFill ( TPtxPdfContent_PathElement * pPathElement)

This path element's parameters for filling the path or NULL if the path is not filled.

Parameters
[in,out]pPathElementActs as a handle to the native object of type TPtxPdfContent_PathElement.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathElement_GetPath()

PDFTOOLBOX_EXPORT TPtxPdfContent_Path *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetPath ( TPtxPdfContent_PathElement * pPathElement)

This path element's path object.

Parameters
[in,out]pPathElementActs as a handle to the native object of type TPtxPdfContent_PathElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathElement_GetStroke()

PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_PathElement_GetStroke ( TPtxPdfContent_PathElement * pPathElement)

This path element's parameters for stroking the path or NULL if the path is not stroked.

Parameters
[in,out]pPathElementActs as a handle to the native object of type TPtxPdfContent_PathElement.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_AddArc()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddArc ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Rectangle * pRectangle,
double dAlpha1,
double dAlpha2 )

Add an elliptical arc to the current path.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pRectanglethe surrounding rectangle of the ellipse
[in]dAlpha1the angle between the x-axis and the begin of the arc
[in]dAlpha2the angle between the x-axis and the end of the arc
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_AddCircle()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddCircle ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Point * pCenter,
double dRadius )

Append a circle to the current path as a complete subpath.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pCenterthe center of the circle
[in]dRadiusthe radius of the circle
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_AddEllipse()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddEllipse ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Rectangle * pRectangle )

Add an ellipse to the current path as a complete subpath.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pRectanglethe surrounding rectangle of the ellipse
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_AddPie()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddPie ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Rectangle * pRectangle,
double dAlpha1,
double dAlpha2 )

Add an elliptical piece of pie to the current path as a complete subpath.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pRectanglethe surrounding rectangle of the ellipse
[in]dAlpha1the angle between the x-axis and the begin of the arc
[in]dAlpha2the angle between the x-axis and the end of the arc
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_AddRectangle()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_AddRectangle ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Rectangle * pRectangle )

Append a rectangle to the current path as a complete subpath.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pRectanglethe rectangle to be added to the path
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_BezierTo()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_BezierTo ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Point * pControlPoint1,
const TPtxGeomReal_Point * pControlPoint2,
const TPtxGeomReal_Point * pTarget )

Draw a bezier curve.

Append a cubic Bézier curve to the current path. The curve extends from the current point to the pTarget position, using pControlPoint1 and pControlPoint2 as the Bézier control points.

The current position is changed to the target position.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pControlPoint1the first bezier control point
[in]pControlPoint2the second bezier control point
[in]pTargetthe target coordinates
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_Close()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_Close ( TPtxPdfContent_PathGenerator * pObject)

Close object.

Close disposable objects by invoking this function.

Parameters
[in]pObjectDisposable object.
Returns
TRUE if the object was closed successfully; FALSE if an error occured while closing the object. Retrieve the error code by calling Ptx_GetLastError .

◆ PtxPdfContent_PathGenerator_CloseSubpath()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_CloseSubpath ( TPtxPdfContent_PathGenerator * pPathGenerator)

Close the current subpath. Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath. This operator terminates the current subpath; appending another segment to the current path will begin a new subpath, even if the new segment begins at the endpoint reached by the closeSubpath() operation. If the current subpath has already been closed, CloseSubpath() does nothing.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_LineTo()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_LineTo ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Point * pTarget )

Draw a line. Append a straight line segment from the current point to the target coordinates. The current position is changed to the target position.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pTargetthe target coordinates
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_MoveTo()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathGenerator_MoveTo ( TPtxPdfContent_PathGenerator * pPathGenerator,
const TPtxGeomReal_Point * pTarget )

Move the current position. Begin a new subpath by moving the current point to the specified coordinates, omitting any connecting line segment. If the previous path construction operator in the current path was also MoveTo, the new MoveTo overrides it; no vestige of the previous MoveTo operation remains in the path.

Parameters
[in,out]pPathGeneratorActs as a handle to the native object of type TPtxPdfContent_PathGenerator.
[in]pTargetthe target coordinates
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathGenerator_New()

Create a new path generator for appending to a path.

Parameters
[in,out]pPaththe path object
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_PathIterator_GetValue()

PDFTOOLBOX_EXPORT TPtxPdfContent_Subpath *PDFTOOLBOX_CALL PtxPdfContent_PathIterator_GetValue ( TPtxPdfContent_PathIterator * pPathIterator)

Get the current element or NULLif no elements are left.

Parameters
[in,out]pPathIteratorActs as a handle to the native object of type TPtxPdfContent_PathIterator.
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_PathIterator_MoveNext()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_PathIterator_MoveNext ( TPtxPdfContent_PathIterator * pPathIterator)

Move the iterator to the next element.

Parameters
[in,out]pPathIteratorActs as a handle to the native object of type TPtxPdfContent_PathIterator.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetDashArray()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetDashArray ( TPtxPdfContent_Stroke * pStroke,
double * pBuffer,
size_t nBufferSize )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved array pBuffer.
Returns
The amount of data written to the buffer pBuffer. -1 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetDashPhase()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetDashPhase ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetLineCapStyle()

PDFTOOLBOX_EXPORT TPtxPdfContent_LineCapStyle PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineCapStyle ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetLineJoinStyle()

PDFTOOLBOX_EXPORT TPtxPdfContent_LineJoinStyle PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineJoinStyle ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetLineWidth()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetLineWidth ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetMiterLimit()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetMiterLimit ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_GetPaint()

PDFTOOLBOX_EXPORT TPtxPdfContent_Paint *PDFTOOLBOX_CALL PtxPdfContent_Stroke_GetPaint ( TPtxPdfContent_Stroke * pStroke)
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_New()

PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_Stroke_New ( TPtxPdfContent_Paint * pPaint,
double dLineWidth )
Parameters
[in,out]pPaint
[in]dLineWidth
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetDashArray()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetDashArray ( TPtxPdfContent_Stroke * pStroke,
const double * pDashArray,
size_t nDashArrays )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]pDashArraySet value.
[in]nDashArraysSize of the array pDashArray.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetDashPhase()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetDashPhase ( TPtxPdfContent_Stroke * pStroke,
double dDashPhase )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]dDashPhaseSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetLineCapStyle()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineCapStyle ( TPtxPdfContent_Stroke * pStroke,
TPtxPdfContent_LineCapStyle iLineCapStyle )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]iLineCapStyleSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetLineJoinStyle()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineJoinStyle ( TPtxPdfContent_Stroke * pStroke,
TPtxPdfContent_LineJoinStyle iLineJoinStyle )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]iLineJoinStyleSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetLineWidth()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetLineWidth ( TPtxPdfContent_Stroke * pStroke,
double dLineWidth )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]dLineWidthSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetMiterLimit()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetMiterLimit ( TPtxPdfContent_Stroke * pStroke,
double dMiterLimit )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in]dMiterLimitSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Stroke_SetPaint()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Stroke_SetPaint ( TPtxPdfContent_Stroke * pStroke,
TPtxPdfContent_Paint * pPaint )
Parameters
[in,out]pStrokeActs as a handle to the native object of type TPtxPdfContent_Stroke.
[in,out]pPaintSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Subpath_Get()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_Get ( TPtxPdfContent_Subpath * pSubpath,
int iIndex,
TPtxPdfContent_PathSegment * pPathSegment )

Returns the element at the specified position in the given list.

Parameters
[in,out]pSubpathActs as a handle to the native object of type TPtxPdfContent_Subpath.
[in]iIndex
[out]pPathSegment
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Subpath_GetCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Subpath_GetCount ( TPtxPdfContent_Subpath * pSubpath)

Get the number of elements in the list.

Parameters
[in,out]pSubpathActs as a handle to the native object of type TPtxPdfContent_Subpath.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Subpath_GetStartPoint()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_GetStartPoint ( TPtxPdfContent_Subpath * pSubpath,
TPtxGeomReal_Point * pStartPoint )

The start point of the TPtxPdfContent_Subpath.

Parameters
[in,out]pSubpathActs as a handle to the native object of type TPtxPdfContent_Subpath.
[out]pStartPointRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_Subpath_IsClosed()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Subpath_IsClosed ( TPtxPdfContent_Subpath * pSubpath)

If TRUE, the TPtxPdfContent_Subpath represents a closed curve.

Parameters
[in,out]pSubpathActs as a handle to the native object of type TPtxPdfContent_Subpath.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_Text_Clear()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Text_Clear ( TPtxPdfContent_Text * pText)

Clear list.

Parameters
[in,out]pTextActs as a handle to the native object of type TPtxPdfContent_Text.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Text_Create()

PDFTOOLBOX_EXPORT TPtxPdfContent_Text *PDFTOOLBOX_CALL PtxPdfContent_Text_Create ( TPtxPdf_Document * pTargetDocument)

Create a text The returned text object is not yet used on any page, but it is associated with the given target document.

Parameters
[in,out]pTargetDocumentthe output document with which the returned object is associated
Returns
the newly created text object

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Text_Get()

PDFTOOLBOX_EXPORT TPtxPdfContent_TextFragment *PDFTOOLBOX_CALL PtxPdfContent_Text_Get ( TPtxPdfContent_Text * pText,
int iIndex )

Returns the element at the specified position in the given list.

Parameters
[in,out]pTextActs as a handle to the native object of type TPtxPdfContent_Text.
[in]iIndex
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Text_GetCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_Text_GetCount ( TPtxPdfContent_Text * pText)

Get the number of elements in the list.

Parameters
[in,out]pTextActs as a handle to the native object of type TPtxPdfContent_Text.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Text_Remove()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Text_Remove ( TPtxPdfContent_Text * pText,
int iIndex )

Remove certain element from list.

Parameters
[in,out]pTextActs as a handle to the native object of type TPtxPdfContent_Text.
[in]iIndex
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextElement_GetText()

PDFTOOLBOX_EXPORT TPtxPdfContent_Text *PDFTOOLBOX_CALL PtxPdfContent_TextElement_GetText ( TPtxPdfContent_TextElement * pTextElement)

This text element's text object.

Parameters
[in,out]pTextElementActs as a handle to the native object of type TPtxPdfContent_TextElement.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_Get()

PDFTOOLBOX_EXPORT TPtxPdfContent_Glyph *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_Get ( TPtxPdfContent_TextFragment * pTextFragment,
int iIndex )

Returns the element at the specified position in the given list.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[in]iIndex
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetBoundingBox()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetBoundingBox ( TPtxPdfContent_TextFragment * pTextFragment,
TPtxGeomReal_Rectangle * pBoundingBox )

the bounding box This is a rectangle that encompasses all parts of the text fragment.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[out]pBoundingBoxRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetCharacterSpacing()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetCharacterSpacing ( TPtxPdfContent_TextFragment * pTextFragment)

The additional spacing between glyphs When the glyph for each character in the text is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. It is subject to scaling by the horizontal scaling if the writing mode is horizontal.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetCount ( TPtxPdfContent_TextFragment * pTextFragment)

Get the number of elements in the list.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetFill()

PDFTOOLBOX_EXPORT TPtxPdfContent_Fill *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFill ( TPtxPdfContent_TextFragment * pTextFragment)

This text fragment's parameters for filling the text or NULL if the text is not filled

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetFont()

PDFTOOLBOX_EXPORT TPtxPdfContent_Font *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFont ( TPtxPdfContent_TextFragment * pTextFragment)

The font The returned TPtxPdfContent_Font can only be used for extraction purposes. Specifically, using this object in PtxPdfContent_TextGenerator_New or in PtxPdfContent_TextGenerator_SetFont results in a ePtx_Error_IllegalArgument error.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetFontSize()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetFontSize ( TPtxPdfContent_TextFragment * pTextFragment)

The font size.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetHorizontalScaling()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetHorizontalScaling ( TPtxPdfContent_TextFragment * pTextFragment)

The horizontal scaling factor The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified relative to the normal width of the glyphs, with 1 being the normal width.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetRise()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetRise ( TPtxPdfContent_TextFragment * pTextFragment)

The rise of the baseline The text rise specifies the distance to move the baseline up or down from its default location. Positive values of text rise move the baseline up. Adjustments to the baseline are useful for drawing superscripts or subscripts.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetStroke()

PDFTOOLBOX_EXPORT TPtxPdfContent_Stroke *PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetStroke ( TPtxPdfContent_TextFragment * pTextFragment)

This text fragment's parameters for stroking the text or NULL if the text is not stroked

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetTextA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTextA ( TPtxPdfContent_TextFragment * pTextFragment,
char * pBuffer,
size_t nBufferSize )

The string painted by this text fragment

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetTextW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTextW ( TPtxPdfContent_TextFragment * pTextFragment,
WCHAR * pBuffer,
size_t nBufferSize )

The string painted by this text fragment

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetTransform()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetTransform ( TPtxPdfContent_TextFragment * pTextFragment,
TPtxGeomReal_AffineTransform * pTransform )

the transform to be applied to the bounding box rectangle Use this transform matrix to compute the actual location of the text fragment's bounding box.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[out]pTransformRetrieved value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetWordSpacing()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetWordSpacing ( TPtxPdfContent_TextFragment * pTextFragment)

The additional spacing between words Word spacing works the same way as character spacing, but applies only to the space character, code 32.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_GetWritingMode()

PDFTOOLBOX_EXPORT TPtxPdfContent_WritingMode PDFTOOLBOX_CALL PtxPdfContent_TextFragment_GetWritingMode ( TPtxPdfContent_TextFragment * pTextFragment)

The writing direction This is the writing mode for the text fragment. It applies to all contained TPtxPdfContent_Glyphs.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextFragment_Remove()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextFragment_Remove ( TPtxPdfContent_TextFragment * pTextFragment,
int iIndex )

Remove certain element from list.

Parameters
[in,out]pTextFragmentActs as a handle to the native object of type TPtxPdfContent_TextFragment.
[in]iIndex
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_Close()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_Close ( TPtxPdfContent_TextGenerator * pObject)

Close object.

Close disposable objects by invoking this function.

Parameters
[in]pObjectDisposable object.
Returns
TRUE if the object was closed successfully; FALSE if an error occured while closing the object. Retrieve the error code by calling Ptx_GetLastError .

◆ PtxPdfContent_TextGenerator_GetWidthA()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_GetWidthA ( TPtxPdfContent_TextGenerator * pTextGenerator,
const char * szText )

Get the width of a text string. The width of a text string as if it would be shown with the current settings.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text fragment
Returns
the width of the text

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_GetWidthW()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_GetWidthW ( TPtxPdfContent_TextGenerator * pTextGenerator,
const WCHAR * szText )

Get the width of a text string. The width of a text string as if it would be shown with the current settings.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text fragment
Returns
the width of the text

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0.0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_MoveTo()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_MoveTo ( TPtxPdfContent_TextGenerator * pTextGenerator,
const TPtxGeomReal_Point * pTarget )

Move the current position. This also also sets the beginning of the current line to the specified position, which will affect the PtxPdfContent_TextGenerator_ShowLine method.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]pTargetthe target position
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_New()

PDFTOOLBOX_EXPORT TPtxPdfContent_TextGenerator *PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_New ( TPtxPdfContent_Text * pText,
TPtxPdfContent_Font * pFont,
double dFontSize,
const TPtxGeomReal_Point * pLocation )

Create a new text generator for appending text to a text content object. All parameters that cannot be set in the constructor are set to default values:

  • Rendering: fill text with black paint
  • CharacterSpacing: 0
  • WordSpacing: 0
  • HorizontalScaling: 1
  • Leading: 1.2 times the dFontSize (The pFont's PtxPdfContent_Font_GetLeading is not used.)
  • Rise: 0
  • Stroke: NULL
  • IntersectClipping: FALSE
Parameters
[in,out]pTextthe text object
[in,out]pFontthe initial font
[in]dFontSizethe initial font size and leading
[in]pLocationthe initial position. If position is NULL, the default position [0, 0] is used.
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetCharacterSpacing()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetCharacterSpacing ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dCharacterSpacing )

the current character spacing.

When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph’s displacement, depending on the writing mode. It is subject to scaling by the horizontal scaling if the writing mode is horizontal.

Default value: 0

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dCharacterSpacingSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetFill()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFill ( TPtxPdfContent_TextGenerator * pTextGenerator,
TPtxPdfContent_Paint * pFill )

The paint for filling The fill paint or NULL if the text should not be filled.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in,out]pFillSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetFont()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFont ( TPtxPdfContent_TextGenerator * pTextGenerator,
TPtxPdfContent_Font * pFont )

the current font. The font is used for all subsequent PtxPdfContent_TextGenerator_Show and PtxPdfContent_TextGenerator_ShowLine calls.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in,out]pFontSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetFontSize()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetFontSize ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dFontSize )

the current font size.

The font size is used for all subsequent PtxPdfContent_TextGenerator_Show and PtxPdfContent_TextGenerator_ShowLine calls.

Note that this sets the font size only. Also use PtxPdfContent_TextGenerator_SetLeading to set the leading.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dFontSizeSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetHorizontalScaling()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetHorizontalScaling ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dHorizontalScaling )

the current horizontal scaling.

The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified relative to the normal width of the glyphs, with 1 being the normal width.

Default value: 1

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dHorizontalScalingSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetLeading()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetLeading ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dLeading )

the current leading.

The leading parameter specifies the vertical distance between the baselines of adjacent lines of text. It affects only the method PtxPdfContent_TextGenerator_ShowLine.

Default value: 1.2 times the initial font size.

See also PtxPdfContent_Font_GetLeading.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dLeadingSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetRise()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetRise ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dRise )

the current rise of the baseline.

Text rise specifies the distance to move the baseline up or down from its default location. Positive values of text rise move the baseline up. Adjustments to the baseline are useful for drawing superscripts or subscripts.

Default: 0

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dRiseSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetStroke()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetStroke ( TPtxPdfContent_TextGenerator * pTextGenerator,
TPtxPdfContent_Stroke * pStroke )

The stroke properties The stroke properties or NULL if the text should not be stroked.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in,out]pStrokeSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_SetWordSpacing()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_SetWordSpacing ( TPtxPdfContent_TextGenerator * pTextGenerator,
double dWordSpacing )

the current word spacing.

Word spacing works the same way as character spacing, but applies only to the space character, code 32.

Default value: 0

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]dWordSpacingSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_ShowA()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowA ( TPtxPdfContent_TextGenerator * pTextGenerator,
const char * szText )

Show a text string. The text is shown using the current settings.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text to be shown
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_ShowLineA()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowLineA ( TPtxPdfContent_TextGenerator * pTextGenerator,
const char * szText )

Show a text string and go to the next line.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text to be shown
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_ShowLineW()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowLineW ( TPtxPdfContent_TextGenerator * pTextGenerator,
const WCHAR * szText )

Show a text string and go to the next line.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text to be shown
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_TextGenerator_ShowW()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_TextGenerator_ShowW ( TPtxPdfContent_TextGenerator * pTextGenerator,
const WCHAR * szText )

Show a text string. The text is shown using the current settings.

Parameters
[in,out]pTextGeneratorActs as a handle to the native object of type TPtxPdfContent_TextGenerator.
[in]szTextthe text to be shown
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Transparency_GetAlpha()

PDFTOOLBOX_EXPORT double PDFTOOLBOX_CALL PtxPdfContent_Transparency_GetAlpha ( TPtxPdfContent_Transparency * pTransparency)
Parameters
[in,out]pTransparencyActs as a handle to the native object of type TPtxPdfContent_Transparency.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when -1 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Transparency_GetBlendMode()

PDFTOOLBOX_EXPORT TPtxPdfContent_BlendMode PDFTOOLBOX_CALL PtxPdfContent_Transparency_GetBlendMode ( TPtxPdfContent_Transparency * pTransparency)
Parameters
[in,out]pTransparencyActs as a handle to the native object of type TPtxPdfContent_Transparency.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfContent_Transparency_New()

PDFTOOLBOX_EXPORT TPtxPdfContent_Transparency *PDFTOOLBOX_CALL PtxPdfContent_Transparency_New ( double dAlpha)
Parameters
[in]dAlpha
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Transparency_SetAlpha()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Transparency_SetAlpha ( TPtxPdfContent_Transparency * pTransparency,
double dAlpha )
Parameters
[in,out]pTransparencyActs as a handle to the native object of type TPtxPdfContent_Transparency.
[in]dAlphaSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfContent_Transparency_SetBlendMode()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL PtxPdfContent_Transparency_SetBlendMode ( TPtxPdfContent_Transparency * pTransparency,
TPtxPdfContent_BlendMode iBlendMode )
Parameters
[in,out]pTransparencyActs as a handle to the native object of type TPtxPdfContent_Transparency.
[in]iBlendModeSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.