Create multiple copies of a page in a single pdf

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Create multiple copies of a page in a single pdf

Postby kussaued » Thu Apr 03, 2014 8:06 am

How can I create multiple copies of one page in one pdf output document?

(Windows 7, VPE DLL Version 6.1)

Background:

Creating a single page and setting all template parameters works just fine. Currently I am using
Code: Select all
VpeSetDevCopies
to create multiple copies of a single page pdfs.

This is causing a problem, because the cutter cuts after every pdf. I need it to cut only after all copies are printed. Number of copies may vary.

How to achieve this?
kussaued
 
Posts: 4
Joined: Fri Jun 01, 2012 9:25 am

Re: Create multiple copies of a page in a single pdf

Postby kussaued » Thu Apr 03, 2014 10:18 am

Ok, I found it out myself:

You can dump the same template multiple times to get one PDF with copies of a page.

Just use those commands in a loop:

Code: Select all
VpeDumpTemplate
VpePageBreak
kussaued
 
Posts: 4
Joined: Fri Jun 01, 2012 9:25 am

Re: Create multiple copies of a page in a single pdf

Postby IDEAL Software Support » Thu Apr 03, 2014 11:54 am

Just for other readers: DumpTemplate() is only provided by the Enterprise Edition and higher, to insert templates - which have been created using our visual designer dycodoc - into an active document.

Without dycodoc, you can yourself write a function to generate a page, as shown in the example below:

Code: Select all
function GeneratePage_1()
   ...
   call VPE methods here to insert graphical objects like text
   ...
   PageBreak()
end function


main code:
for n = 1 to 3
   GeneratePage_1()
end for
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 10 guests

cron