-
Notifications
You must be signed in to change notification settings - Fork 217
PNG Images Support
PNG Images are supported in PDFWriter, through the usage of LibPng. Both transparent and opaque images are supported, making the PNG offering of PDFWriter quite unique.
In a similar fashion to JPG and TIFF, PNG images can be used in the context of DrawImage, the high level method.
Also, similarly there's a more customized usage of PNG images available, in which a Form XObject is created from the PNG, that can be placed wherever desired, one or more times.
The following options are available:
PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGFile(const string& inPNGFilePath)
PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGFile(const string& inPNGFilePath, ,ObjectIDType inFormXObjectID)
PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGStream(IByteReaderWithPosition* inPNGStream)
PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGStream(IByteReaderWithPosition* inPNGStream, ,ObjectIDType inFormXObjectID)
The first two methods accept the file path to the PNG file. The second method allows for Forward Referencing. The later two methods accept a custom stream that can be used to non-file sources of PNG. Read more about using streams in Custom input and output.
- First Steps In Creating a PDF file
- Creating PDF Pages
- Images Support
- Text Support
- Adding Content to PDF Pages
- Links
- Unicode and UnicodeString class
- PDF Embedding
- Custom input and output
- Using Form XObjects
- Forward Referencing
- JPG Images Support
- TIFF Images Support
- PNG Images support