Is there a way to convert infopath forms (.xsn) forms into pdf using c# console application in Sharepoint 2010
-
Are you looking to convert the XSN into a fillable PDF (so as a replacement for InfoPath) or are you looking to convert the XML files that have been filled out using that XSN? Also, why are you looking to do this from the command line? You mention SharePoint so wouldn't it be better / more obvious to use workflows or event receivers? (BTW, there are 3rd party apps available that specialise in InfoPath conversion, it is extremely tricky to get right, Google 'Muhimbi', we do this for a living ;-)– Jeroen RitmeijerCommented Aug 22, 2016 at 8:10
-
We have all the infopath forms in a library and want all of them converted into pdf– SandeshRCommented Aug 28, 2016 at 21:36
-
So you don't really need a console application, but if it is a one off thing then it is not necessarily a bad option.– Jeroen RitmeijerCommented Aug 29, 2016 at 8:28
Add a comment
|
1 Answer
You may reference Microsoft.Office.InfoPath, then utilize the .Export
this.CurrentView.Export(@"C:\MyView.pdf", ExportFormat.Pdf);
for more details, visit https://msdn.microsoft.com/en-us/library/microsoft.office.infopath.view.export.aspx