SetupPrinter doesn't save page format/size

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

SetupPrinter doesn't save page format/size

Postby innovasrl » Wed Mar 20, 2013 9:47 am

I'm trying to save several prs file for different kind of reports, and I made this function in Python just to setup the properties and save them to file.
The only thing that doesn't work is the Page Format (A$/A5 etc) that is lost (not saved or nor re-loaded?) if I reload the prs previously saved.
All other parameters are correctly restored as expected.
Using Windows 7 Ultimate 32 bit, VPE 6.10 Professional Edition

This is the Function I used to test.

def VpeSetupPrinter(prs_file_name):

ret = False

doc = VPE.TVpeControl()
doc.OpenDoc()
doc.License(_KEY1, _KEY2)
# doc.SetupPrinter returns 0 if Ok, 1 if cancel
cancel = bool(doc.SetupPrinter(prs_file_name, VPE.PrintDialogControl.Always))
doc.CloseDoc()
doc = None

ret = not cancel

return ret
innovasrl
 
Posts: 3
Joined: Tue Feb 05, 2013 9:15 pm

Re: SetupPrinter doesn't save page format/size

Postby IDEAL Software Support » Thu Mar 21, 2013 9:50 am

If you read the help file / manual, it is written for SetupPrinter() in the remarks-section:

"The settings in the PRS file for the page orientation and page format are ignored"

and it is explained why.

If desired, you can read yourself the values for the page dimensions / orientation after making the initial SetupPrinter() call, and store the values in a separate file. Later when reading the PRS file, you can in addition recall the values from your separate file.
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 20 guests

cron