Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Adding pages |
Post Reply |
Author | |
einar
Beginner Joined: 18 Mar 10 Location: Norway Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 18 Mar 10 at 12:38PM |
After using much time trying to use ClonePages() and CapturePage()/DrawCapturedPage() without luck, I found that using MergeDocument() did what I needed. So I like to add this function to this forum. The code is in Foxpro.
The task is to create a letter using a template with two pages. (The template is created with MS-Word) One page with header/footer for the first page and one page as a template for rest of the pages. The idea is to add template page 2 as many times as needed.
Function NewPage(N) && N is template page 1 or 2.
Local nLast, nDoc2 With This If N==1 result=.oPDF.LoadFromFile(.templatefile) This.DocId=.oPDF.SelectedDocument() nLast=This.oPDF.PageCount() .oPDF.DeletePages(2,nLast-1) Else result=.oPDF.LoadFromFile(.templatefile) nDoc2=.oPDF.SelectedDocument() .oPDF.DeletePages(1,1) .oPDF.SelectDocument(.DocId) .oPDF.MergeDocument(nDoc2) Endif nLast=This.oPDF.PageCount() .oPDF.SelectPage(nLast) Return result Endwith Endfunc |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store