Insertion Destination Document: Sample File For Page Insertion Article

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Page 1

Insertion Destination Document


Sample file for Page Insertion Article

To insert pages into PDF use the “doc.insertPages()” function


Input Arguments:
• nPage: 0 based page number after which to inset pages
in the destination PDF
• cPath: Device Independent Path to source PDF
• nStart: 0 based page number of first page in source PDF
to insert into destination PDF
• nEnd: 0 based page number of last page in source PDF to
insert into destination PDF
Copyright 2008 by WindJack Solutions
www.windjack.com
Page 2
Insertion Destination Document
Sample file for Page Insertion Article

All input arguments to the “doc.insertPages()” function are optional


except for “cPath”.
Input Argument Defaults:
• nPage: First page in destination document
• cPath: Not Optional, may crash Acrobat if not specified
• nStart: First page of source PDF
• nEnd: Last page of source PDF
By default, this function appends the entire source PDF to the end of
the destination PDF
Copyright 2008 by WindJack Solutions
www.windjack.com
Page 3
Insertion Destination Document
Sample file for Page Insertion Article
Example code: Run from “InsertDest.pdf” scripting context
• Inserts entire source PDF after Page 1 in current PDF
this.insertPages({cPath:”InsertSource.pdf”});
• Inserts entire source PDF after page 2 of current PDF
this.insertPages(1,”InsertSource.pdf”);
• Inserts page 3 of source PDF after page 1 of current PDF
this.insertPages({cPath:”InsertSource.pdf”
nStart:2, nEnd:2});

Copyright 2008 by WindJack Solutions


www.windjack.com
Page 4
Insertion Destination Document
Sample file for Page Insertion Article

Last page of Destination PDF

Copyright 2008 by WindJack Solutions


www.windjack.com

You might also like