ImageEn, unit iepdf

TIEPDFBuilder

Properties · Methods · Demos · Examples

Declaration

TIEPDFBuilder = class;


Description

A class for creation of multi-page Adobe PDF files with scalable objects.

Note: You can also create scalable PDF documents using layers


Demos


Demo  Demos\PDF\PDFBuilder2\PDFBuilder2.dpr

Example


// Create our PDF object
pdf := TIEPDFBuilder.Create();

// Add a new page of 595 x 842 (each point is 1/72 of inch, so you are creating a page of 8.26 x 11.69 inches, which is an A4 page)
pdf.AddPage(595, 842);

// Add text to current page, at coordinates (0, 100), using Times-Roman at size 36
pdf.AddText( 0, 100, 'Rotated Text', 36, 'Times-Roman');

// Add filled and stroked text, using transparency
pdf.AddText( 0, 150, 'Filled and stroked text', 36, 'Helvetica-Bold', 0, clGreen, 0.2, clRed, 0.8, iepdfFillStroke);

// Add a shape (line path)
pdf.AddLinePath([DPoint(50, 400), DPoint(300, 600), DPoint(180, 780), DPoint(30, 420)], True, clYellow, 0.7, 4, iepdfRoundCaps, True, clGreen, 0.3);

// Add an ellipse
pdf.AddEllipse(100, 200, 500, 300, clWhite, 0.7, 2, true, clOlive, 0.6);

// Add a semi-opaque image at size 200, 200 (can also speciy -1 for one size to maintain the aspect ratio)
pdf.AddImage(0, 0, 200, 200, ImageEnView1.iebitmap, 0, 0.8);

// Repeat above to add further pages...

// Save and free object
pdf.SaveToFile('D:\test.pdf');
pdf.Free();

Methods and Properties


General
Public Method  Create
Public Method  Destroy
Public Method  SaveToStream
Public Method  SaveToFile

Page Addition
Public Method  AddPage
Public Method  AddPageWithImage
Public Method  AddPageWithLayers
Public Property  CurrentPageIndex
Public Property  PageCount

Page Objects
Public Method  AddEllipse
Public Method  AddImage
Public Method  AddLinePath
Public Method  AddShape
Public Method  AddText