ImageEn, unit iepdf

TIEPDFBuilder.AddPageWithImage

TIEPDFBuilder.AddPageWithImage


Declaration

function AddPageWithImage(Bitmap: TIEBitmap; IOParams: TIOParams): integer;
function AddPageWithImage(Bitmap: TIEBitmap; IOParams: TIOParams; var Progress: TProgressRec): integer; overload;


Description

Adds a new page and fills it with an image.

The size of the page will be specified by PDF_PaperWidth and PDF_PaperHeight. Margins are specified by PDF_PageMargin.
Image position and size is affected by PDF_ImageOptions.
IOParams will also be used to set the image save format, e.g. via PDF_Compression

Result will be the index of the new page (which will be the same as CurrentPageIndex


Demos

Demo  Demos\InputOutput\PDFBuilder2\PDFBuilder2.dpr


Examples

// Add using "US Letter" paper size
ImageEnView1.IO.Params.PDF_PaperSize := iepLetter;
pdf.AddPageWithImage( ImageEnView1.IEBitmap, ImageEnView1.IO.Params );

// Which is the same as...
ImageEnView1.IO.Params.PDF_PaperWidth  := 612;
ImageEnView1.IO.Params.PDF_PaperHeight := 792;
pdf.AddPageWithImage( ImageEnView1.IEBitmap, ImageEnView1.IO.Params );

// Automatically adjust page size to image (may create huge pages!)
ImageEnView1.IO.Params.PDF_PaperSize := iepAuto;
pdf.AddPageWithImage( ImageEnView1.IEBitmap, ImageEnView1.IO.Params );


See Also

 AddPage
 AddPageWithLayers