Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
How to Add and Delete PDF Pages

Example
Collapse All

Example

C++

[copy to clipboard]
PM_DOCUMENT doc = PM_DOCUMENT_New();
	
PM_RECT rc1 = {0, 0, 600, 600};
PM_RECT rc2 = {0, 0, 300, 400};
PM_RECT rc3 = {0, 0, 600, 800};

PM_PAGE page1 = PM_DOCUMENT_AddPage(doc, rc1);
PM_PAGE page2 = PM_DOCUMENT_AddPage(doc, rc2);
PM_PAGE page3 = PM_DOCUMENT_AddPage(doc, rc3);

// page1  index = 0
// page2  index = 1
// page3  index = 2
PM_DOCUMENT_RemovePage(doc, 1);

// page1  index = 0
// page2  index = 1
PM_DOCUMENT_Save(doc, "AddAndDeletePages.pdf");
PM_DOCUMENT_Free(doc);

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots