How does scaling work? SetScalingPercent() ineffective

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

How does scaling work? SetScalingPercent() ineffective

Post by sprezzatura » Sun Sep 12 2010

How is scaling supposed to work? I am using Amyuni PDF Converter 4.0.1.2, and have tried:

Code: Select all

hDriver = DriverInit(szPrinterName);
EnablePrinter(hDriver, SZ_COMPANY, AMYUNI_KEY);
SetScalingOption(hDriver, SIO_SCALE);
SetScalingPercent(hDriver, percent);
It does not scale, it comes out at 100%.
Also, the DEVMODE approach has no effect either:

Code: Select all

DEVMODE *devMode;
devMode->dmFields |= DM_SCALE;
devMode->dmScale = 50;	// doesn't seem to make any difference
How can we use this?

sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

Re: How does scaling work? SetScalingPercent() ineffective

Post by sprezzatura » Wed Sep 15 2010

Well in case you were all wondering, the answer (as per Amyuni Tech Support email) is to call 'SetDefaultConfig(hPrinter);' in addition to the other functions:

Code: Select all

hDriver = DriverInit(szPrinterName);
EnablePrinter(hDriver, SZ_COMPANY, AMYUNI_KEY);
SetScalingOption(hDriver, SIO_SCALE);
SetScalingPercent(hDriver, percent);
SetDefaultConfig(hPrinter);  //Apply changes
It seems the driver has to be re-initialized again, otherwise the scaling doesn't kick in until the next cycle.

Merci beaucoup Jose, vous êtes très aimable.

Post Reply