ClonePages
Page manipulation
Description
Copies pages from the document multiple times, with only a negligible increase in file size. Note that only the first "layer" of the page is cloned. Unless you specifically want to take part of the page you should call CombineContentStreams for all the pages you want to clone before calling this function.
Syntax
Delphi
Function TPDFlib.ClonePages(StartPage, EndPage, RepeatCount: Integer): Integer;
ActiveX
Function PDFlib::ClonePages(StartPage As Long, EndPage As Long, RepeatCount As Long) As Long
DLL
int DLClonePages(int InstanceID, int StartPage, int EndPage, int RepeatCount);
Parameters
| StartPage | The first page to clone |
|---|---|
| EndPage | The last page to clone |
| RepeatCount | The number of times to clone the pages |
Return values
| 0 | The parameters were out of range |
|---|---|
| 1 | The function was successful |
Remarks
A cloned page shares the content stream, fonts and images of its source, and takes over the page boxes, rotation and resources the source inherits from the page tree
Each clone gets its own copies of the annotations on the source page, such as links and notes. Form field widgets are copied as well, and each copy becomes another widget of the same field, so every clone shows the field of its source with the same value, and a value set on one page appears on all of them. A field whose widget was merged into the field dictionary becomes a parent field with one widget per page, so after cloning FormFieldCount also counts those widgets, as it does for any field with several widgets. Pop-up windows are not copied
A clone is not connected to the structure tree of a tagged document and is not part of the article threads of its source