Page 1 of 1

avoid margins

Posted: Wed Mar 15, 2023 10:44 am
by alex59
In the PDF XChange Editor I can print a pdf file and set scale to none, so I get a print, that begins in the top left corner of the paper without margins.

Using the Core API SDK I allways get top and left margins, that are the hard margins of the printer. How can I avoid these margins? I.e., how can I get the same result, I get using the PDF XChange Editor?

I tried
Document.OriginAtMargins = true;
and
Document.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
but it does not work.

Thanks, Alex

Re: avoid margins

Posted: Wed Mar 15, 2023 11:20 am
by Tracker Supp-Stefan
Hello alex59,

You have posted in the Core API SDK section, but are comparing it with the Editor. If you do have the Editor SDK - you should be able to use these:
https://sdkhelp.pdf-xchange.com/vi ... es_Options

And specifically the "IgnoreMargins" from e.g.
https://sdkhelp.pdf-xchange.com/vi ... caleSimple

However if you are using the Core API - you can get your PDF rendered to a Device Context and would then need to handle that yourself and pass it to the printer in a manner that it will understand and e.g. not scale.

Kind regards,
Stefan