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

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)
{
  NotifyHost("PrintToPDF");
 }

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.

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 7/5/2008 5:26:04 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search