Margin settings are ignored when printing

Hi,


I am currently evaluating the Aspose.Pdf library for printing pdf documents with printersettings.
It works perfect except for setting right and bottom margins in the PageSettings if at the same time viewer.AutoResize is set to false. In this case the settings for right and bottom margins are completely ignored when printing. Settings for left and top margins are instead taken into account when printing.

This is the example code where the margin settings are ignored:

PrinterSettings settings = GetPrinterSettings();
PdfViewer viewer = new PdfViewer();
viewer.BindPdf(fullFilePath);
viewer.AutoResize = false;
// set example margins
settings.DefaultPageSettings.Margins.Right = 20;
settings.DefaultPageSettings.Margins.Bottom = 20;
// print
viewer.PrintDocumentWithSettings(settings.DefaultPageSettings, settings);
viewer.Close();

Is there a solution to this problem or is it a bug in library?

Thanks,
Felix

Hi Felix,


Thanks for contacting support.

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-36917 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.<o:p></o:p>