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): 53666/ 82

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.






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


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-11-29 1:03:42 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search