Skip to main content
Table of Contents

TTMSFNCPDFLib.ReplacePage Method

Replaces a page with one page from another PDF file.

API unit family: TMSFNCPDFLib Declaring type: TTMSFNCPDFLib Inherited from: TTMSFNCCustomPDFLib

Overloads

Overload 1

Replaces a page with one page from another PDF file.

GeneratedPascalC++
procedure ReplacePage(PageIndex: Integer; const FileName: string; SourcePageIndex: Integer; const Password: string = ''); overload;
void __fastcall ReplacePage(int PageIndex, const System::UnicodeString FileName, int SourcePageIndex, const System::UnicodeString Password = System::UnicodeString());

Parameters

Name Description
PageIndex Zero-based destination page index.
FileName Path of the source PDF.
SourcePageIndex Zero-based index of the source page.
Password Password used to open the source PDF, or an empty string when it is not encrypted.

Overload 2

Replaces a page with one page from another PDF stream.

GeneratedPascalC++
procedure ReplacePage(PageIndex: Integer; const FileStream: TStream; SourcePageIndex: Integer; const Password: string = ''); overload;
void __fastcall ReplacePage(int PageIndex, System::Classes::TStream* const FileStream, int SourcePageIndex, const System::UnicodeString Password = System::UnicodeString());

Parameters

Name Description
PageIndex Zero-based destination page index.
FileStream Stream containing the source PDF.
SourcePageIndex Zero-based index of the source page.
Password Password used to open the source PDF, or an empty string when it is not encrypted.