The Microsoft Office InfoPath form templates that you create are designed to be opened and filled out online, either in InfoPath itself or by using a Web browser. However, users may opt to print a copy of a completed form for their personal records or for archival purposes. For this reason, it is a good idea to verify that your form template looks acceptable when it is printed. For example, you might want to make sure that the controls in your form template fit within the margins of the printed page and that text on the printed form is readable.
In addition, you can use the Views task pane to create a special version of the form template — called a print view — that is designed specifically for printing purposes.
This article explains how to design a print view for your form template and other techniques for creating print-friendly form templates.
In this article
The difference between printing a form template and a form
You can print your form template to get a general sense of how controls and other objects appear on the printed page, or to verify print settings, such as headers or footers. When you print a form template from design mode, you may see certain items on the printed form template, such as buttons, that don't actually appear when a user prints a form based on your form template.
When users print a form based on your form template, InfoPath makes adjustments to the form or removes certain items that don't make sense in a printed context. For example, the Insert Item instructional text that appears by default under repeating tables won't appear in the printed form. Neither will button controls, list box entries, or scroll arrows, as these items lose their meaning on the printed page.
Introduction to print views
Although form templates are designed to collect form data in an electronic format, you can create a print view, which is a view that is designed specifically for printing. This is useful when you want users to print out forms using a particular layout or to only print out certain parts of the form.
If your form template contains multiple views, you can create a print view for each view. Alternatively, you can designate a single print view that applies to all views in the form template. For example, if your form template contains three distinct views, you might create a print view that consolidates key information from each of those views into a single printed page.
To create and associate a print view with an existing view, you can use the Create Print Version for This View link in the Views task pane. When you click this link, InfoPath does the following:
-
Creates a new, blank view called Print Version name, where name is the name of the view on which the print view is based.
-
Associates the print view with the view upon which it is based. This association in recorded in the View Properties dialog box, on the Print Settings tab. For example, imagine that you created a print view that is based on an Approval view in your form template. When users click the Print button in the Approval view, InfoPath prints whatever appears on the Print Version Approval view.
After creating a print view, you can design it to reflect the way that you want the form to appear when printed. This typically involves copying and pasting controls from other views in the form template into the print view. If necessary, you can substitute certain controls for other controls in the print view. For example, you might replace a drop-down list box, which hides list box entries by default, with a standard list box, which displays the entries by default. By doing this, all of the entries are displayed on the printed form. You can also specify custom printing options for the print view in the View Properties dialog box, such as headers, footers, and page margins.
Design a print view that is based on an existing view
By default, when a user prints a form that does not have a specific print view associated with it, the view that is currently displayed on the user's computer is printed. If you create a print view, InfoPath prints that view instead of the current view. You can designate any existing view as the print view. The following procedure explains how to use an existing view as the basis for a print view.
-
On the View menu, click Manage Views.
-
In the Select a view list, in the Views task pane, click the view for which you want to create a print view.
-
Under Actions, click Create Print Version for This View.
-
In the Create Print Version dialog box, type a name for the print view, and then click OK.
-
In the Views task pane, double-click the print view.
-
In the View Properties dialog box, select the options that you want on the Print Settings and Page Setup tabs, and then click OK. For example, you might specify default margin settings for the print view, or add headers or footers.
-
To switch to the original view, in the Views task pane, click the view's name in the Select a view list.
-
To select everything in the view, press CTRL+A.
-
To copy the selection to the Clipboard, press CTRL+C.
-
To switch to the print view, in the Views task pane, click the view's name in the Select a view list.
-
To paste the selection from the original view into the print view, press CTRL+V.
-
Delete any controls or layout elements that you don't need, or add additional controls.
Tip: To quickly determine whether controls and other design elements will fit on a printed page, you can display a page width guide along the right side of the form template by clicking Page Width Guide on the View menu. A page width guide appears as a dashed vertical line on the form template. The line indicates where the right margin of the printed page is located, based on the default printer for your computer.
-
To add page breaks to the print view, click where you want a new page to start, and then on the Insert menu, click Page Break.
Note: A page break appears as a dashed horizontal line on a form template. If you preview your form template, you won't see this dashed line or any other indication of the page break. To see how the page break will affect printed forms that are based on your form template, click Print Preview on the Standard toolbar.
Design a print view specifically for Word
If you're an advanced form designer who understands XML technologies, you can use the Add Print View for Word Wizard to create a Microsoft Office Word-based print view that prints form data directly from Word. This allows you to take advantage of the range of printing features that are available in Word. To do this, you must have access to an existing XSL Transformation (XSLT) file that transforms data in your form template into a format that is suitable for printing from Word. When a user prints a form that contains a Word-based print view, data in that form will print directly from within Word. The XSLT file must be created using Microsoft Office Word 2003 or Microsoft Office Word 2007.
Note: To learn more about creating the XSLT file, refer to the Microsoft Office InfoPath 2003 Software Development Kit (SDK). The SDK contains a tool, called the InfoPath to Word Wizard, that allows you to use Word 2003 or Word 2007 to print InfoPath form data. To locate the InfoPath 2003 SDK, refer to the See Also section.
-
On the View menu, click Manage Views.
-
Under Actions, in the Views task pane, click Add Print View for Word.
-
Follow the instructions in the Add Print View for Word Wizard to specify the XSLT file that you want to use for the Word-based print view.
-
In the Select a view list, in the Views task pane, click the view for which you want to designate the Word-based print view, and then click View Properties.
-
Click the Print Settings tab.
-
In the Select an existing view to use when printing this view list, click the Word-based print view.