ImageEn, unit iexHelperFunctions

IECreatePDFFromFileList


Declaration

function IECreatePDFFromFileList(const sDestFilename : string;
                                 ssFileList : TStrings;
                                 const aPaperSize : TIOPDFPaperSize;
                                 const aCompression : TIOPDFCompression;
                                 const sTitle : string;
                                 const sAuthor : string;
                                 const bFailOnUnsupportedImage : Boolean = True
                                 ) : Boolean;


Description

Generates a PDF file from all images specified in a TStrings list, by combining the functions of CreatePDFFile, SaveToPDF and ClosePDFFile.
Result is true unless an error is encountered.

Parameter Description
sDestFilename The .PDF filename to save the file to
ssFileList A list of all images to add to the PDF file
aPaperSize The size at which to create the PDF file
aCompression The level of compression to use
sTitle The title for the PDF document (appears in "Properties")
sAuthor The author for the PDF document (appears in "Properties")
bFailOnUnsupportedImage When true this procedure will fail if unsupported images (or other file types) are found in ssFileList. If false, unsupported file types are skipped

Note:
You must add the iexHelperFunctions unit to your uses clause
If the PDFEngine is ieenDLL, then PDFium will be used to create the PDF, otherwise native PDF code will be used


Example

IECreatePDFFromFileList('D:\MyNewPDF.pdf',
                        ssMyImageList,
                        iepA4,
                        ioPDF_JPEG,
                        'My Cool PDF',
                        'Mr Developer');


See Also

TImageEnMIO.SaveToFilePDF
TImageEnIO.SaveToFilePDF