HotPDF Developer Reference
Delphi and C++Builder PDF component help
|
This example shows how to copy page number 5 from source document to page number 0 in current document. var DestDoc, SourceDoc: THotPDF; begin SourceDoc := THotPDF.Create( nil ); try SourceDoc.LoadFromFile( 'SourceDoc.pdf' ); DestDoc := THotPDF.Create(nil); try DestDoc.FileName := ( 'DestDoc.pdf' ); DestDoc.BeginDoc; DestDoc.CopyPageFromDocument( SourceDoc, 5, 0 ); // Copies page number 5 from source document to current document page number 0 DestDoc.EndDoc; finally DestDoc.Free; end; finally SourceDoc.Free; end; end; |