ImageEn, unit iexHelperFunctions

TImageEnIO.CreatePDFFromFileList

TImageEnIO.CreatePDFFromFileList


Declaration


function CreatePDFFromFileList(const sDestFilename : string;
                               ssFileList : TStrings;
                               const aPaperSize : TIOPDFPaperSize;
                               const aCompression : TIOPDFCompression;
                               const sTitle : string;
                               const sAuthor : string;
                               const bFailOnUnsupportedImage : Boolean = True;
                               const bRaiseExceptions : Boolean = False
                               ) : 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
bRaiseExceptions When true this procedure will generate an exception if it fails. If false, you will need to check the result to detect failure



Example


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