4

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 Ritmeijer - Muhimbi Aug 22 '16 at 8:10
  • We have all the infopath forms in a library and want all of them converted into pdf – spStacker Aug 28 '16 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 Ritmeijer - Muhimbi Aug 29 '16 at 8:28
3

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

  • can we achieve it using console application? – spStacker Aug 28 '16 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.