After changing printer DEV-settings are lost.

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

After changing printer DEV-settings are lost.

Postby frankena » Thu Nov 11, 2010 8:58 am

Hi,

I'm using VPE 5 and do the next:

VpeOpenDoc
VpeSetDevDuplex to VDUP_HORIZONTAL
..
..
..
VpePreviewDoc

this works ok.

When I'm going to print the output from the preview using the print button from the toolbar and chance the printer, I'm loosing the duplex setting. Is it necessary to set the VpeSetDev setting again after changing the printer? If so where do I do this? I tried it during the VPE message VPE_PRINT when the wParam is PRINT_MSG_START but then I get an error.

Regards,
Arnold
frankena
 
Posts: 28
Joined: Tue Feb 01, 2005 11:57 am

Re: After changing printer DEV-settings are lost.

Postby IDEAL Software Support » Thu Nov 11, 2010 9:36 am

This is normal behaviour of the Windows operating system. When you change the printer in the printer setup dialog, the internal structures of the Windows API are filled with the default settings of the newly selected printer.

The correct place to inject your settings is in an event handler for the VPE_PRINT event, with wParam = PRINT_MSG_SETUPEND.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: After changing printer DEV-settings are lost.

Postby frankena » Thu Nov 11, 2010 11:22 am

Thanks,

it works.

Arnold
frankena
 
Posts: 28
Joined: Tue Feb 01, 2005 11:57 am


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 17 guests

cron