Report Margins ignored by browser

Stimulsoft Reports.JS discussion
Post Reply
alex.coles
Posts: 14
Joined: Mon Feb 03, 2020 2:19 pm

Report Margins ignored by browser

Post by alex.coles »

I am printing labels that need to be lined up to specific items on the paper, and have set up report margins on the page and in the displayed report and PDF printing these are honoured, however when you try and print to a printer the left hand margin is being completely ignored.

I can add a custom margin to the print dialogue which corrects it, but we need it to be correctly positioned when the margin is set to none on the browser as we cannot be changing the margin in the print dialogue manually every time we want to print these labels. How can we force the browser to honour the left hand margin?
Stimulsoft.Reports.JS - Version: 2019.4.2 - Build date: 2019.11.13
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Report Margins ignored by browser

Post by Lech Kulikowski »

Hello,

Due to security reasons, it is not possible to set any printer settings in the Print dialog. It is the browser limitation.

Thank you.
alex.coles
Posts: 14
Joined: Mon Feb 03, 2020 2:19 pm

Re: Report Margins ignored by browser

Post by alex.coles »

In case anyone else has this issue, I solved it by setting:
options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Pdf;
This forces the print to respect the margins correctly, by treating it as a PDF.
Stimulsoft.Reports.JS - Version: 2019.4.2 - Build date: 2019.11.13
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Report Margins ignored by browser

Post by Andrew »

Hello Alex,

Thank you for sharing your way of soliving the issue.
Post Reply