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?
Report Margins ignored by browser
-
- Posts: 14
- Joined: Mon Feb 03, 2020 2:19 pm
Report Margins ignored by browser
Stimulsoft.Reports.JS - Version: 2019.4.2 - Build date: 2019.11.13
-
- Posts: 6241
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report Margins ignored by browser
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.
Due to security reasons, it is not possible to set any printer settings in the Print dialog. It is the browser limitation.
Thank you.
-
- Posts: 14
- Joined: Mon Feb 03, 2020 2:19 pm
Re: Report Margins ignored by browser
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.
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
Re: Report Margins ignored by browser
Hello Alex,
Thank you for sharing your way of soliving the issue.
Thank you for sharing your way of soliving the issue.