Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

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;

© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum