Expand my Community achievements bar.

shrink to fit need help quick

Avatar

Level 2

I have a bunch of forms with a print button, works just great.  However a few people

have printers that are cutting off the top and bottom and they want the default to be shrink to fit since many of the users of the form are older and can't understand how to change the fit on the print dialogue box.  I found in my Bible a javascr

ipt but I'm not getting it to work.

click*

topmostSubform.Page2.PrintButton1::click - (JavaScript, client)
this.print ({bShrinkToFit: true});

I couldn't find where I could control it elsewhere

2 Replies

Avatar

Level 6

Maybe this will help (sorry for the lousy formatting).

print

Prints a specific number of pages from a document. It is available only for client applications.

Syntax

Reference_Syntax

.print( BOOLEAN param1, INTEGER param2, INTEGER param3, BOOLEAN param4, BOOLEAN param5, BOOLEAN

param6

, BOOLEAN param7, BOOLEAN param8 )

Parameters

param1

true | 1 (JavaScript) or 1 (FormCalc) (default)

Displays a print dialog box and prompts the user for printing setup information and confirmation of the action.

false | 0 (JavaScript) or 0 (FormCalc)

Does not display a print dialog box. Printing proceeds without prompting the user for information or confirmation.

param2

A valid string representing the page number of the beginning of the range to print. Page values are 0-based, so you represent page 1 with a value of 0.

The start page is included in the printing.

param3

A valid string representing the page number of the end of the range to print. Page values are 0-based, so you represent page 1 with a value of 0.

The end page is included in the printing.

param4

true | 1 (JavaScript) or 1 (FormCalc) (default)

Does not display a cancel dialog box during the printing process.

false | 0 (JavaScript) or 0 (FormCalc)

Displays a cancel dialog box to stop the printing process.

param5

true | 1 (JavaScript) or 1 (FormCalc) (default)

Shrinks the page (if necessary) to fit within the imageable area of the printed page.

false | 0 (JavaScript) or 0 (FormCalc)

Does not shrink the page to fit within the imageable area of the printed page.

param6

true | 1 (JavaScript) or 1 (FormCalc) (default)

Prints each page as an image.

false | 0 (JavaScript) or 0 (FormCalc)

Prints each page as a page of text.

param7

true | 1 (JavaScript) or 1 (FormCalc) (default)

Prints the pages in reverse order.

false | 0 (JavaScript) or 0 (FormCalc)

Prints the pages in order.

param8

true | 1 (JavaScript) or 1 (FormCalc) (default)

Prints all annotations.

false | 0 (JavaScript) or 0 (FormCalc)

Does not print annotations

Returns

Empty

Applies to

Version

XFA 2.1

Examples

JavaScript

xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0);

FormCalc

xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0)

Avatar

Level 2

Thanks Kevin, it worked great. Only 100 plus forms to change running both through LiveCycle and then opening in Acrobat to extend users rights.

Nikki