Convert InfoPath form to PDF with SharePoint workflow

4.8
(11)

Creating a SharePoint Form Library

Create a new Form Library in SharePoint:

Design your Form using InfoPath:

Save your form to a file, and then publish it to SharePoint:

Select to publish it to SharePoint site:

Enter the location of your SharePoint site:

Select to publish it as a template in a form library:

Select to create a new form library:

Specify the name for the new Library:

Add the form fields to available as columns in SharePoint sites:

Verify the information summary and click Publish. Now you can create first document in the new Form Library:

Fill the form and click Save:

Specify the name:

The document has been created:

Creating a workflow

Make sure all required installations and setup are made for Document Conversion to work properly (please refer to InfoPath to PDF Service Installation Guide)

Open SharePoint Designer and connect it to your SharePoint site. Create a new List Workflow for the Form Library. Note that SharePoint 2010 Workflow Platform Type should be used:

Add action ‘Convert InfoPath Form and Save to Document Library’ (located in HarePoint Activities – Document Conversion group):

Specify Current Item: Encoded Absolute URL as list item url parameter:

Specify the Document Library URL, where converted form should be stored, e.g. http://labsp13/Converted%20Documents:

Allow this workflow to be manually started in SharePoint Designer:

Save and publish the workflow.

Running a workflow

Select filled form in form library and run Conversion workflow that was created in previous paragraph:

This workflow has no initiation parameters, so just click Start:

The workflow will start. During this process, InfoPath will be called so it will appear in the background for a few moments.

Checking results

Make sure the workflow is completed successfully:

Access the document library where converted form is saved:

You can see PDF file containing the converted form:


Learn more about HarePoint Workflow Extensions and over 300 new activities to automate any business process without programming.

How useful was this post?

Click on a star to rate it!

Average rating 4.8 / 5. Vote count: 11

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

(Visited 10,262 times, 1 visits today)
Share

6 Replies to “Convert InfoPath form to PDF with SharePoint workflow”

  1. Is there a limitation on the destination path? The process fails and the path+filename gets truncated at 97 chars without generating a file. Even if I configure a different shorter path, it still fails with the following error:
    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.Net.ConnectStream.WriteHeaders(Boolean async)
    at System.Net.HttpWebRequest.EndSubmitRequest()
    at System.Net.HttpWebRequest.GetResponse()
    at System.ServiceModel.Chan ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error nels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
    at System.ServiceModel.Channels.SecurityChannelFactory`1.Secur ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error ityRequestChannel.Request(Message message, TimeSpan timeout)
    at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, Proxy ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error OperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceCha ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error nnelProxy.Invoke(IMessage message)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at DocumentConversion.SPApp.IDocumentConversionServiceContract.Convert(ConvertRequestHeader request)
    at DocumentCon ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error version.SPApp.DocumentConversionServiceApplicationProxy.ExecuteOnChannel[T](String operationName, CodeToRunOnChannel`1 codeBlock)
    at DocumentConversion.SPApp.DocumentConversionServiceApplicationProxy.Invoke[T](SPServiceContext serviceContext, CodeToRu ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error nOnApplicationProxy`1 codeBlock)
    at DocumentConversion.Activities.ConvertInfoPathFormToDocLib.c__DisplayClass8.b__3(SPSite s, SPWeb w)
    at DocumentConversion.Common.Extensions.Resources.Use[T1,T2](T1 resource, T2 next, Action`2 actio ConvertInfoPathFormToDocLib
    1/7/2021 3:48 PM Error n)
    at DocumentConversion.Activities.ConversionActivityBase.Execute(ActivityExecutionContext executionContext)

  2. I have multiple views in my infopath form. The extension isnt using the view I specified in the workflow. Thoughts?

    1. Hello Leanne,

      A new SharePoint Online solution is currently undergoing thorough final testing process stages. We will inform you as soon as it will be released.

      Also, we would appreciate it if you could share some details of the expected usage scenario with our Dev Team: https://www.harepoint.com/Support/

Leave a Reply

Your email address will not be published. Required fields are marked *