ImageEn, unit imageenio

TImageEnIO.CreatePDFFile

TImageEnIO.CreatePDFFile


Declaration

procedure CreatePDFFile(const FileName: WideString);


Description

Creates a new, empty Adobe PDF file of the specified filename. You can add pages using SaveToPDF and when complete, close the file using ClosePDFFile.
If the PDFEngine is ieenDLL, then PDFium will be used to create the PDF, otherwise native PDF code will be used.

Note:
 All images in the resulting PDF file will be aligned to the upper-left corner of the paper
 Read more about ImageEn PDF Support
 The created PDF will be v1.4 format


Demo

Demo  Demos\InputOutput\PDFBuilder\PdfBuilder.dpr


Example

IEGlobalSettings().PDFEngine := ieenNative;
ImageEnView1.IO.CreatePDFFile( 'D:\output.pdf' );

// load and save page 1
ImageEnView1.IO.LoadFromFile('C:\page1.tiff');
ImageEnView1.IO.Params.PDF_Compression := ioPDF_G4FAX;  // G4Fax compression
ImageEnView1.IO.SaveToPDF();

// load and save page 2
ImageEnView1.IO.LoadFromFile('C:\page2.tiff');
ImageEnView1.IO.Params.PDF_Compression := ioPDF_G4FAX;  // G4Fax compression
ImageEnView1.IO.SaveToPDF();

...Other pages...

// close PDF file
ImageEnView1.IO.ClosePDFFile();


See Also

 SaveToPDF
 ClosePDFFile
 SaveToFilePDF
 IECreatePDFFromFileList