How do I insert an image into a PDF document?
Estimated Reading Time: 1 MinutesA PDEImage can be created using DLPDECreatePDEImageFromFile() and manipulated with DLPDEImageTranslate, DLPDEImageRotate and DLPDEImageScale. The new image element can be added to the Content stream with PDEContentAddElem().
See the ImageImport code sample for a demonstration.
When using PDEImageCreate() directly, the data is presumed to be in an ASStm object. This object can be created for a block of memory using ASMemStmRdOpen(), or from an external file using ASFileSysOpenFile() andASFileStmRdOpen(). This method will also permit you to read a compressed bitmap without expanding it.
.NET and Java
The Image class contains constructors for images from files and streams. and the images can be modified with the Translate, Rotate and Scale functions. The image elements can then be added to the Content stream with the Content.AddElement() and Page.UpdateContent() functions
See the ImageImport code sample.