Code Samples - Document Converter Pro

Example 15: Merge 2 existing PDF files - Delphi Copy 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
   procedure TForm1.MergePDFsClick(Sender: TObject);
   var
     DC : Variant;
     RVal : Integer;
   begin
      try
        DC := CreateOleObject('Neevia.docConverter');
        RVal := DC.mergePDF('c:\users\public\file1.pdf', 'c:\users\public\file2.pdf', 'c:\users\public\out.pdf');
        If (RVal <> 0) Then
          ShowMessage('Error merging!!! Code: '+IntToStr(RVal))
        else
          ShowMessage('Done !!!');
      finally
        DC := Unassigned;
      end;
   end;