Expand my Community achievements bar.

How to Change Paper Type Using Java script

Avatar

Level 2

HI ,

We have a requirement , in which we have to change the paper type i.e. "A2" , "A3","A4" etc.  while printing using a JavaScript. I have written a code like this :

 

xfa.form.form1.pageSet.Page1.medium.stock

= "A2"; But this is not working. please help me out.

printev.jpg

Thanks,

Bhaskar.

1 Reply

Avatar

Employee

That's the right object for choosing the page size at Design time. What event are you doing this on? Although you can change it in the form model, the form's page size is already determined from the template by the time you have a form to script against, so although you can change it via script after the fact in XFA, I don't believe it will have any impact. Even putting it on the layout ready event does not work.