avoid margins

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
alex59
User
Posts: 10
Joined: Wed Mar 15, 2023 10:12 am

avoid margins

Post 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
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: avoid margins

Post 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
Post Reply