Center on page

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
yishai
Posts: 5
Joined: Thu Oct 10 2002

Center on page

Post by yishai »

Some of my users get their pdf created with a small shift to the right that was not intended to be there (which throws the right side of the document outside of the page). It seems as if the left margin is not the 1/2 inch I have set it to be but something else, slightly bigger. The same file will print okay on a different machine. My suspicion is that it has to do with the default user printer 'center on page' option or something like that. I did not find a way in PDF converter to set a 'center on page' option.

So, anybody has any ideas for: (1) Why would something like that happen (2) Does the PDF converter inherit any setting from the current default print driver (3) How can I override this settings.

Thanks

-Yishai
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

The default margins of the PDF Printer are 6 mm. If you set these to 0 this may help.

If you are using the Developer version of the PDF Converter you need to call SetDefaultConfig after changing the settings of the printer otherwise, the driver may keep using the old settings.

Hope this helps.
yishai
Posts: 5
Joined: Thu Oct 10 2002

Post by yishai »

Thanks for your help. However, it is now even stranger.

I need to have 1/2 margins from all sides. I draw on the page with a coordinate system that ignores the margins, and expect anything outside of the margins will be clipped of.

If I do:

(SetHorizontalMargin) (pdfPrinter, 127);
(SetVerticalMargin) (pdfPrinter, 127);
(SetFileNameOptions)(pdfPrinter, options);

I get everything laid out on the page correctly. But the margins seem to be at 6mm and not at 1/2 inch. (the white space around the page seems to be 6mm).

If I change it to:

(SetHorizontalMargin) (pdfPrinter, 127);
(SetVerticalMargin) (pdfPrinter, 127);
(SetDefaultConfig) (pdfPrinter);
(SetFileNameOptions)(pdfPrinter, options);

I still get 6mm margins, but all the page content is shifted to the left to start at the margin line. i.e., an image that was drawn 1/2 inch from the left is now drawn 6mm from the left, although my coordinate system did not change). It is also the same if I set the margin to 0.

So, (1) What am I doing wrong in setting the margins in the top code (2) What is going on in the second code?

Thanks

-Yishai
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hi,

Whenever changes are made to the printer properties, you need to call the function "SetDefaultConfig" to enable the changes.

Thanks
yishai
Posts: 5
Joined: Thu Oct 10 2002

Post by yishai »

Thanks for your reply. If it was not clear from the post above, I do call SetDefaultConfig, but just get stranger and even worse results. See the code example at the bottom of the above post.
Post Reply