We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Sizing on print

I'm trying to have my PDF print when it opens.  So I added a PdfJavaScriptAction of "this.print(true);".  When it opens the print dialog, the sizing is set to "actual size".  Because IE opens an actual Actobat window, I noticed that if I cancel the print dialog that comes up automatically, and click print again, the default sizing is set to "fit".

Is there any way to set in the PDF or metadata that the default sizing be Fit or Shrink Oversized Documents, or are there any other javascript parameters or functions I can use to adjust the setting?

3 Replies

PH Praveenkumar H Syncfusion Team December 10, 2012 11:53 AM UTC

Hi Brian,

Thank you for using syncfusion product,

you can use the following code snippet to set the default sizing to be fit while printing the document.

"PdfJavaScriptAction javaAction=new PdfJavaScriptAction("this.print({bShrinkToFit:true});"); ".

please let us know if you concern.

with regards,

Praveen



AD Administrator Syncfusion Team December 19, 2012 05:48 PM UTC

Worked like a champ.  Searched around, but couldn't find a decent doc on what can be passed to that function to affect behavior.  Thanks!


PH Praveenkumar H Syncfusion Team December 21, 2012 12:31 PM UTC

Hi Brian,

Thank you for your update.

We are glad to hear that the issue has been resolved.

Please let us know if you have any questions.

With regards,

Praveen


Loader.
Live Chat Icon For mobile
Up arrow icon