Frequently Asked Question:
I need DAAppendFile sample code (Delphi)
Question
I want to use DAAppendFile to merge files, but perhaps there is a better way?
Answer
Beside MergeDocument() there are two more API that allow to merge PDF files: MergeFileList() and MergeFileListFast(). Here is help function that shows how to use this API:
function QPLMergeFileList(QPL: TQuickPDF; FileList: TStrings; OutputFile: AnsiString;
Fast: Boolean): Integer;
const
ListName = 'MergeList';
var
i: Integer;
begin
Result := 0;
if QPL = nil then
Exit;
with QPL do
begin
try
ClearFileList(ListName);
for i := 0 to FileList.Count - 1 do
AddToFileList(ListName, FileList[i]);
if Fast then
Result := MergeFileListFast(ListName, OutputFile)
else
Result := MergeFileList(ListName, OutputFile);
finally
end;
end;
end;