Convert Infopath Form To Pdf Programmatically



We just released a new SharePoint 2013 workflow activity for our Virto SharePoint Workflow Activities Extensions Kit. Now you can Convert InfoPath to PDF using SharePoint Workflow.

We trying to explore infopath(xml) files convert into PDF. We had SharePoint list with custom infopath. Daily users submit the form for access. Our goal was when user submitted the form, its need to convert into PDF form and then that PDF file need to send IT Team via email. InfoPath form can be converted to PDF with 2 steps: 1. You can use Open XML SDK to create word documents. A word template containing alternate chunk controls can be used to fill in data from a form, InfoPath form or list item to generate a word document. Creating Documents by Using the Open XML Format SDK 2.0 (Part 3 of 3). The same way you added the ASP.NET page to host a form in the article Hosting the InfoPath 2007 Form Editing Environment in a Custom Web Form, you can add an ASP.NET page to print a form to PDF. You do not have to add any controls to the web form, but must remember to set the EnableSessionState property of the web form to True.

The workflow action “Convert InfoPath to PDF” saves conversion task in the “Virto Converting List” in central admin site. Virto Converting App uses specified credentials to get these tasks and perform them. While executing task the app connects to InfoPath (that is installed on the same machine), so InfoPath is launched for a short time and closed automatically. When conversion is completed, the app uploads to SharePoint the PDF file.

Installation and Usage

Installation of .NET Framework 4.5

Form

Normally, .NET Framework is already installed on a server or workstation. It can be obtained via Windows Update if necessary.
Setting up Microsoft InfoPath 2013
InfoPath comes as a part of Microsoft Office Professional Plus 2013. Make sure you have this version of Microsoft Office, and that InfoPath is deployed. Make sure InfoPath is ready to work.
Installation of Virto Converting App
Unzip the installation “Virto.SharePoint.Activities.Setup” archive and locate the “Virto.ConvertingApp” folder. Find setup.exe file there and run it.

Forms

Click on the “Install” button.

The application starts immediately after installing.

In the beginning you should configure it. Click on the “Settings” link. Fill form and click the “Apply” button.

Then you can start application.

To start the app, you should click on “Start” button. Make sure that status is “online” and there are no any errors in the “Current trace information” text box.
You can hide the app in the tray. To do it click on “Minimize” button.

Convert

Uninstallation of Virto Converting App

The application can be uninstalled via Add/Remove Programs.

Activity: Convert InfoPath to PDF
SharePoint Designer phrase

Parameters
Input parameters

Description
SourceSiteURL
The URL of a source SharePoint site. If the value field is empty, current site will be used
https://contoso/SiteUrl; https://contoso/Sites/SiteUrl;
SourceList
The list where the InfoPath form is. The value could be list name, GUID or list URL (the web site relative URL). If the value field is empty, current list will be used
[%Workflow Context: List ID %]
The URL of the InfoPath form to be converted. You can use absolute URL as well as web site relative URL. Or you can to specify the list item ID.
[%Current Item: Encoded Absolute URL%]
https://contoso/LibraryName/DocumentName.xml
The URL of a destination SharePoint site. If the value field is empty, current site will be used
https://contoso/SiteUrl; https://contoso/Sites/SiteUrl;
DestinationList
The list where the PDF file will be created. The value could be list name, GUID or list URL (the web site relative URL).
[%Workflow Context: List ID %]
Specify the view name of InfoPath form that you want to convert
[%Variable:ViewName %]

Convert Infopath To Forms

You can download and try new “Convert InfoPath to PDF” SharePoint Workflow Action right now.
If you need Convert InfoPath To PDF for SharePoint Workflow 2010 Platform – send us request and we’ll provide you this action with SharePoint Workflows Kit.

Related articles:
SharePoint workflow
activities

Microsoft InfoPath is use to design forms and you can covert these forms into PDF file. You don’t need to install any third party utility to convert InfoPath file into PDF. Microsoft InfoPtha 2010 also gives an option to save InfoPath form to PDF. follow the given steps below to convert InfoPath file to PDF.

How to save InfoPath form as PDF file

Convert Infopath Form To Excel

Step-1

Click on File tab > Share > Create PDF / XPS Document > Create a PDF / XPS

Convert infopath form to xml

Convert Infopath Form To Html


Step-2

Form

Convert Pdf Form To Infopath

Type name for your InfoPath form PDF file in the File name Field, You change the optimization option from Minimum size to Standard for printing purposes.

Convert Pdf To Infopath

When you are done with options click the Publish button to Save InfoPath form as PDF file.

Convert Infopath Form To Xml

No related posts.