Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 548

Previous Page 547   Index   Next Page 549

Function Reference
Page 548 of 750
CreateImage() supports the creation of single and multi-page images (TIFF only). To create a multi-
page image the function must be called before ParseContent() or before parsing the first page. If all
images should be stored in the image file the flag pfDecomprAllImages must be set.
JPEG and JPEG 2000 images are already stored in valid formats in PDF. If the creation of one multi-
page TIFF image per PDF file is not required then it is usually best to extract these image formats as
is. In this case the flag pfDecomprAllImages must be absent.
DynaPDF is delivered with the demo project image_extraction which demonstrates how images can
be extracted.
Vector Graphics
To extract vector graphics the following callback functions should be set:
TBeginPattern
TEndPattern
// Optional
TBeginTemplate
TBezierTo1
TBezierTo2
TBezierTo3
TClipPath
TClosePath
TEndTemplate
// Optional
TLineTo
TMoveTo
TMulMatrix
TRectangle
TRestoreGraphicState
TSaveGraphicState
TSetExtGState
// Optional
TSetFillColor
TSetLineCapStyle
TSetLineDashPattern
TSetLineJoinStyle
TSetLineWidth
TSetMiterLimit
TSetStrokeColor
The graphics state should contain these variables:
Parameter
Type
Initial Value
Clipping Path
Vector array
Crop box or Media box
DashPattern
double*
NULL (Solid line)
DashPhase
UI32
0
FillColor
double[32]
Black
FillColorSpace
TExtColorSpace, IColorSpace*
esDeviceGray, NULL
FillPattern
IPattern*
NULL
LineCapStyle
TLineCapStyle
csButtCap
LineJoinStyle
TLineJoinStyle
jsMiterJoin
LineWidth
float
0.0f
 

Previous topic: Helper functions

Next topic: PlaceImage