Setting Top and Left Margin at Runtime for PDF

Stimulsoft Reports.JS discussion
Post Reply
compuaid
Posts: 14
Joined: Mon Aug 22, 2022 3:30 pm

Setting Top and Left Margin at Runtime for PDF

Post by compuaid »

We have a situation where we need to allow users to print W-2s on IRS pre-printed and approved paper. We would like to be able to offer users the option to modify the top and left margins of the PDF report at runtime to make minor adjustments to where the fields land on the form depending on their printer.

Is there a way in JavaScript to adjust the report top and left margins before the report renders?
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Setting Top and Left Margin at Runtime for PDF

Post by Lech Kulikowski »

Hello,

You can set these properties from the code.
https://www.stimulsoft.com/en/samples/r ... -from-code

Thank you.
compuaid
Posts: 14
Joined: Mon Aug 22, 2022 3:30 pm

Re: Setting Top and Left Margin at Runtime for PDF

Post by compuaid »

Lech - I looked at the code in the sample but what I want to do is take a report that we create in the Designer and then allow the user to modify the top and left margins at runtime to shift the entire report slightly left or right and up or down so that their individual printer aligns the text boxes with the pre-printer form.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Setting Top and Left Margin at Runtime for PDF

Post by Lech Kulikowski »

Hello,

Unfortunately, in the JS version, it is not possible.

Thank you.
Post Reply