printsettings

Determines the settings that will be used when the form is printed. The user can be allowed to change these defaults, or the form can be set so that it will always follow the defaults.

Syntax

   <printsettings>
      <pages>page list</pages>
      <dialog>dialog settings</dialog>
      <header>header settings</header>
      <footer>footer settings</footer>
      <border>on|off</border>
      <singlelinefieldsaslines>on|off</singlelinefieldsaslines>
      <scrollbarsonfields>on|off</scrollbarsonfields>
      <radioswithoutvalues>on|off</radioswithoutvalues>
      <radiosaschecks>on|off</radiosaschecks>
      <pagelayout>layout setting</pagelayout>
      <printorientation>orientation setting</printorientation>
      <outputformat>output file type</outputformat>
   </printsettings>
Note: All settings are optional.
Table 1. printsettings parameters
Parameter Type Description
page list (see the following) The list of pages that print.
dialog settings (see the following) Determines whether the print dialog is shown, and which settings must be used when printing (for example, paper orientation and number of copies).
header/footer settings (see the following)  
border on Prints a border around form pages.
  off Does not print a border around form pages.
singlelinefieldsaslines on Prints a single line field as a line.
  off Prints a single line field as a rectangle.
scrollbarsonfields on Prints scroll bars on fields.
  off Removes scroll bars from fields when printing.
radioswithoutvalues on Prints radio buttons without the selected value.
  off Prints radio buttons with the selected value.
radiosaschecks on Prints radio buttons as check boxes.
  off Prints radio buttons as radio buttons.
layout setting string Controls whether the print job is scaled to fit a page, or tiled across multiple pages. Valid settings are:
  • fitToPage – Scales the form to fit on a single page, without maintaining the aspect ratio.
  • shrinkToPage – Scales the form to fit on a single page, and maintains the aspect ratio of the form.
  • tileOneDirection – Sizes the smallest dimension (either width or length) to fit to a single page, and tiles the other dimension across multiple pages.
  • tileTwoDirections – Does not resize the form, and tiles both the width and the height across multiple pages if necessary.
print orientation (see the following) Controls whether a form page is printed in portrait or landscape orientation.
outputformat string Allow dynamic configuration of print output format. Possible values are:
  • png
  • gif
  • pdf
  • pdfa
  • plugin/png
  • plugin/gif
If the setting is invalid or missing, the default behavior is determined by the Webform Server translator properties file or the Viewer.

Available in

action, button, cell, page global, form global

page list

The page list uses the following syntax:

   <pages>
      <filter>keep|omit</filter>
      <pageref>page sid1</pageref>
      ...
      <pageref>page sidn</pageref>
   </pages>

The settings for the page list work as follows:

Table 2. page list settings
Setting Description
filter Whether to omit or keep the pages listed. Using keep will print all pages listed, and exclude all other pages in the form. Using omit will print all pages in the form except those listed.
pageref A list of page sids that indicates which pages to keep or omit.

dialog settings

The dialog settings use the following syntax:

   <dialog>
      <active>on/off</active>
      <copies>#</copies>
      <orientation>portrait|landscape</orientation>
      <printpages>print page settings</printpages>
   </dialog>

The settings work as follows:

Table 3. dialog settings
Setting Description
active When on, the print dialog will be displayed before the form is printed, allowing the user to change the settings. When off, the dialog will not be shown and the form will be printed immediately.
copies A positive integer that determines the number of copies that will be printed; defaults to 1.
orientation Determines whether the form will be printed in landscape or portrait orientation.
printpage settings (see the following)

Print page settings

The print page settings use the following syntax:

   <printpages>
      <active>on|off</active>
      <choice>all|current</choice>
   </printpages>

The settings work as follows:

Table 4. print page settings
Setting Description
active When on, the print dialog will allow the user to choose between printing “All” pages or the “Current Page”; defaults to on.
choice All sets the printpages default to “All”; current sets the printpages default to “Current Page”; defaults to all.

Header/Footer settings

The header and footer settings use the following syntax:

   <header>
      <left>left text</left>
      <center>center text</center>
      <right>right text</right>
   </header>
   <footer>
      <left>left text</left>
      <center>center text</center>
      <right>right text</right>
   </footer>

The settings work as follows:

Table 5. header/footer settings
Setting Description
left text This text is left justified in the header/footer.
center text This text is centered in the header/footer.
right text This text is right justified in the header/footer.

Each header and footer can be one or more lines in height. However, they can be no larger than 1/3 of the page size.

Each section (that is, left, center, or right) can contain different text. For example, you might put a date in the left section, a title in the middle section, and a document number in the right section.

If you place a long string of text in a header or footer, it will overlap the other sections of that header or footer. For example, suppose you put the following text in the left section of your header:

   This form is for demonstration purposes only. Do not distribute.

This text would start at the left edge of the form, but would continue to overlap the middle portion of the header. Futhermore, a longer string would also overlap the right portion of the header.

Any hard returns placed in a string are respected. For example, you could avoid overlapping the other sections of the header by using the same string with hard returns, as shown:

   This form is for 
   demonstration purposes
   only. Do not distribute.

If a string is wider than the form, it is truncated appropriately. For example, a string that starts on the left edge of the form is truncated once it reaches the right edge of the form, and vice versa. If a string starts in the middle of the form, it is truncated on both the left and right edges.

Print orientation

Print orientation uses the following syntax:
<global sid="global">
		...
		<printorientation>landscape</printorientation>
		<printorientation>portrait</printorientation>
</global>
The settings for print orientation work as follow:
Table 6. Print orientation settings
Setting Description
portrait The page prints in a portrait layout.
landscape The page prints in a landscape layout.

Example

This sample prevents “page2” from being printed, sets the form to print in landscape orientation, strips the scroll bars from all fields, and prints two copies of the form:

   <printsettings>
      <pages>
         <filter>omit</filter>
         <pageref>page2</pageref>
      </pages>
      <dialog>
         <active>on</active>
         <orientation>landscape</orientation>
         <copies>2</copies>
      </dialog>
      <scrollbarsonfields>off</scrollbarsonfields>
   </printsettings>

Usage details

  1. Defaults:
    • Page List – The page list will default to keeping all pages in the form.
    • Dialog Settings – The dialog will default to being on, and will print one copy of all pages in the form in a portrait orientation. By default, the user will be able to change all of these settings.
    • borderoff.
    • singlelinefieldsaslines, scrollbarsonfields, radioswithoutvalues, radiosaschecks, pagelayout – The equivalent setting in the form rendering software.
  2. Those settings that inherit their default value from the form rendering software will override the form rendering software if they are set differently.
  3. The current printsettings.dialog.orientation overrides the global print orientation in a hierarchical fashion using form items such as trigger item, page, form, and xfdl default. The printorientation setting affects orientation of a page or form, without affecting any other pages.
    • page.global.printorientation overrides printsettings.dialog.orientation for that page only.
    • form.global.printorientation overrides printsettings.dialog.orientation for all pages.