Skip to main content
Table of Contents

TTMSFNCCustomPDFLib.MergeDocument Method

Merges all pages from another PDF at the requested position, or appends them when -1.

API unit family: TMSFNCPDFLib Declaring type: TTMSFNCCustomPDFLib

Overloads

Overload 1

Merges all pages from another PDF at the requested position, or appends them when -1.

GeneratedPascalC++
procedure MergeDocument(const FileName: string; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(const System::UnicodeString FileName, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 2

Merges selected pages from another PDF file.

GeneratedPascalC++
procedure MergeDocument(const FileName: string; const PageIndices: array of Integer; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(const System::UnicodeString FileName, const int *PageIndices, const System::NativeInt PageIndices_High, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 3

Merges all pages from another PDF stream.

GeneratedPascalC++
procedure MergeDocument(const FileStream: TStream; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(System::Classes::TStream* const FileStream, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 4

Merges selected pages from another PDF stream.

GeneratedPascalC++
procedure MergeDocument(const FileStream: TStream; const PageIndices: array of Integer; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(System::Classes::TStream* const FileStream, const int *PageIndices, const System::NativeInt PageIndices_High, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 5

Merges a consecutive range of pages from another PDF file.

GeneratedPascalC++
procedure MergeDocument(const FileName: string; PageIndex, PageCount: Integer; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(const System::UnicodeString FileName, int PageIndex, int PageCount, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 6

Merges a consecutive range of pages from another PDF stream.

GeneratedPascalC++
procedure MergeDocument(const FileStream: TStream; PageIndex, PageCount: Integer; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(System::Classes::TStream* const FileStream, int PageIndex, int PageCount, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Overload 7

Merges a consecutive range from another PDF file.

GeneratedPascalC++
procedure MergeDocument(const FileName: string; const PageRange: TTMSFNCPDFPageRange; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(const System::UnicodeString FileName, const TTMSFNCPDFPageRange &PageRange, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Parameters

Name Description
FileName Path of the source PDF.
PageRange First source page and number of consecutive pages to merge.
InsertAt Zero-based insertion position, or -1 to append the pages.
Password Password used to open the source PDF, or an empty string when it is not encrypted.

Overload 8

Merges a consecutive range from another PDF stream.

GeneratedPascalC++
procedure MergeDocument(const FileStream: TStream; const PageRange: TTMSFNCPDFPageRange; InsertAt: Integer = -1; const Password: string = ''); overload;
void __fastcall MergeDocument(System::Classes::TStream* const FileStream, const TTMSFNCPDFPageRange &PageRange, int InsertAt = -1, const System::UnicodeString Password = System::UnicodeString());

Parameters

Name Description
FileStream Stream containing the source PDF.
PageRange First source page and number of consecutive pages to merge.
InsertAt Zero-based insertion position, or -1 to append the pages.
Password Password used to open the source PDF, or an empty string when it is not encrypted.