DynaPDF Manual - Page 161
Previous Page 160 Index Next Page 162
Page 161 of 821
This function is implemented in an Ansi and Unicode compatible version.
Please note that embedded files must be associated with a PDF object in PDF/A 3 files. See
AssociateEmbFile() for further information.
If the function succeeds the return value is the handle of the embedded file, a value greater or equal
zero. If the function fails the return value is a negative error code.
AttachImageBuffer (Rendering Engine)
// Instance pointer of the rasterizer
// Pointer to a row buffer or alternatively
// Pointer to an image buffer that was allocated
// as one large buffer.
// Width in Pixel
// Height in Pixel
SI32 ScanlineLen) // Scanline length in bytes
The function attaches a new image buffer to the rasterizer. The function supports two different types
or pointers to the image buffer depending on how the buffer was allocated.
When the image buffer was allocated as one large block then set the parameter Rows to NULL and
pass the buffer to the parameter Buffer. If the scanlines were allocated separately or in blocks then
use the parameter Rows instead. One of these parameters must be set but never both. The function
checks first whether the parameter Rows is present.
The rasterizer uses internally an array of scanlines to achieve optimal processing speed. Therefore,
the function must maybe reallocate the internal pointer array when the new image height is larger
than the previous one. When there is no sufficient memory to allocate the row pointer array then the
function will fail and returns false. The one and only reason why this function can fail is out of
The return value must not be ignored since the rasterizer will cause an access violation if you try to
raster into a non-existant image buffer.
The rasterizer requires no special alignment of the scanlines, the scanlines can be byte aligned.
However, the scaline length can be longer than necessary, e.g. to achieve aligment requirements of
certain image formats like Bitmaps. A negative value of the scanline length mirrors the image
This function is not included in the Visual Basic 6 interface.
Previous topic: AttachFile, AttachFileEx
Next topic: AutoTemplate