Applying settings dynamically

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
dwebb
Posts: 3
Joined: Fri Nov 11 2005

Applying settings dynamically

Post by dwebb »

I am using the ActiveX version of the Converter. I wish to be able to apply settings such as margins, resolution and paper size dynamically.

The documentation seems to suggest that this might be achievable using the CreateDC function, rather than issuing the SetDefaultConfig function all the time.

However there is very little information, and no examples of how this might be done. Does anyone have any more information?

As an aside, is it just me, or is the documentation for this product almost totally useless?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

In the documentation, we are saying that you can either call SetDefaultConfig() once after setting all the printer settins or if you are creating the printer using CDICreateDC then you don't need to call SetDefaultConfig.

For the documentation and the examples, each function (eg SetResolution, SetOrientation, CDICreateDC....) have its own description and example.

If you are not able to find the right information in the documentation it might be that you are using an old version of the documenation maybe, please tell us which version you are currently using.

Thanks.
dwebb
Posts: 3
Joined: Fri Nov 11 2005

Post by dwebb »

According to the documentation I have (Common Driver Interface 250.pdf) you create a new printer with the PDFDriverInit() method, not the CreateDC() method.

The documentation says only that CreateDC() creates a 'printer device context'. I have no idea what this means, and there is no further explanation in the documentation.

Can you provide an example of using the CreateDC() - or any other method - to apply settings dynamically? The Documentation explicitly states:

'in this case SetDefaultConfig should be called after modifying these settings to set the value as default for all applications. Application developers should not call this function for every printout but only after printer initialization.'
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Yes, what you are saying is true.

PDFDriverInit is used to create a PDF Printer or you can use alternatively our Install.exe and call DriverInit in your application.

After creating the printer you set all the settings you want like Orientation, Resolution, ect.. and you call SetDefaultConfig(). Then you start printing to that printer.

Isn't that solution suitable for your?
Post Reply