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 ;-) Aug 22, 2016 at 8:10
  • We have all the infopath forms in a library and want all of them converted into pdf
    – SandeshR
    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. Aug 29, 2016 at 8:28

1 Answer 1


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?
    – SandeshR
    Aug 28, 2016 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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