Printing InfoPath 2007 Web-Based Forms to PDF
page 4 of 8
by S.Y.M. Wong-A-Ton
Average Rating: 
Views (Total / Last 10 Days): 47303/ 100

Creating and Publishing a Browser-Compatible Form Template

To implement the technique discussed in this article, you must either design a new browser-compatible form template or modify an existing one. The form template shown in Figure 2 is used throughout this article. It is browser-compatible and has the Main data source shown in Figure 3. The Print to PDF button control on the form template has a Clicked event handler with the code shown in Listing 1.

Figure 2: Sample InfoPath form template

Figure 3: The Main data source of the sample InfoPath form template

Listing 1: Code for the Clicked event handler of the button control

public void btnPrintToPDF_Clicked(object sender, ClickedEventArgs e)

Since the form template contains managed code, you will have to perform an administrator-approved deployment when you publish it to a SharePoint server running InfoPath Forms Services, and browser-enable it.

For more information on designing and publishing browser-compatible form templates, see the following articles:

·         Introduction to browser-compatible form templates

·         Publish a form template to a server running InfoPath Forms Services

·         How to: Deploy Form Templates That Contain Form Code

View Entire Article

User Comments

No comments posted yet.

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-28 11:07:06 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search