TIEPDFBuilder.AddPageWithImage
Declaration
function AddPageWithImage(Bitmap: TIEBitmap; IOParams: TIOParams; InsertIndex: Integer = -1): integer;
function AddPageWithImage(Bitmap: TIEBitmap; IOParams: TIOParams; var Progress: TProgressRec; InsertIndex: Integer = -1): 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.
If InsertIndex > -1, the new page will be inserted at the specified page index of the document. If -1, it will be appended to the end of the document.
Result will be the index of the new page (which will be the same as
CurrentPageIndex | Demos\PDF\PDFBuilder2\PDFBuilder2.dpr |
// 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