Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS iCL
Merge multiple PDF documents with TMSFMXNativePDFLib
Merge multiple PDF documents with TMSFMXNativePDFLib
The code below shows how to input and merge multiple PDF documents to a single PDF document.
var input: TStringList; output: String; I, J: Integer; begin input := TStringList.Create; input.Add(ExtractFilePath(ParamStr(0)) + 'Egypt.pdf'); input.Add(ExtractFilePath(ParamStr(0)) + 'BoraBora.pdf'); input.Add(ExtractFilePath(ParamStr(0)) + 'London.pdf'); output := TPath.GetDocumentsPath + '/Merged.pdf'; TMSFMXNativePDFLib1.BeginDocument(output); for I := 0 to input.Count - 1 do begin TMSFMXNativePDFLib1.OpenDocument(input[I]); for J := 1 to TMSFMXNativePDFLib1.GetPageCount do begin TMSFMXNativePDFLib1.GetPageInfo(J); TMSFMXNativePDFLib1.NewPage; TMSFMXNativePDFLib1.DrawPage(J); end; TMSFMXNativePDFLib1.CloseDocument; end; TMSFMXNativePDFLib1.EndDocument; input.Free; end;