Big Question about the dev copies

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Big Question about the dev copies

Postby simonlec » Tue May 26, 2009 5:08 pm

Hi everyone. I have a document that I want to print in 3 copies. I use DevCopies to perform it but, I have to add a specifique word on each copie like : customer copy, administration copy, garanty copy....
Does anyone know how to perform it with only one page in the preview?
simonlec
 
Posts: 32
Joined: Wed Jul 30, 2008 6:50 pm

Postby IDEAL Software Support » Wed May 27, 2009 8:59 am

This is not possible. In most cases, DevCopies instructs the printer driver to create the copies, which in turn instructs the printer to create the copies. Therefore you can not make any intervention into that process.

The only option is that you start three different print jobs. Using VPE Professional Edition v4.0 or higher, you can do the following:

Code: Select all
// Insert an object:
Doc.Print(1, 1, "customer copy")

// Retrieve a handle to that object:
TVPEObject tmp_object = Doc.LastInsertedObject

// Create a print job, use "false" so that no printer setup-dialog is shown:
Doc.PrintDoc(false)

// Delete the "customer copy" object:
Doc.DeleteObject(tmp_object)


Afterwards you can loop through this code to insert the next text object, like "administration copy".

Please note that the ability to delete objects is a new feature of VPE Professional Edition v4.0 and higher.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Big Question about the dev copies

Postby JudgeTerry » Mon Apr 12, 2010 1:56 pm

Please note that the ability to delete objects is a new feature of VPE Professional Edition v4.0 and higher.


The documentation states that this is only in the 'Enterprise edition and above'.

Is VpeDeleteObject(hDoc) part of the Professional edition?
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm

Postby IDEAL Software Support » Mon Apr 12, 2010 4:18 pm

It is indeed a mistake in the above posting. DeleteObject() requires the Enterprise Edition. But the next release of VPE Professional Edition will allow to insert objects at the bottom of the z-order, i.e. below all other objects. This way you can add watermarks.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Big Question about the dev copies

Postby JudgeTerry » Wed Apr 21, 2010 4:57 am

You can simulate the deletion and insertion of objects by simply overwriting the original text object.

First produce the document with 'Customer Copy' text for the preview.
When the preview closes do not destroy the document, then:

1. With the document still in memory
2. Set VpeSetTransparentMode(hDoc,False)
3. Add 'File Copy' over the 'Customer Copy'
4. Print without preview
5. Repeat steps 3 and 4 for any additional 'copy text' needed.

The added text needs to be wide enough to cover the original text. Centering the text in a text box with pensize set to 0 may be easier than padding the text with spaces.

HTH,
Terry
JudgeTerry
 
Posts: 30
Joined: Thu Jan 22, 2009 10:56 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 34 guests

cron