Hello,
Someone I work with has written a C# application that loads Infopath forms, allows users to edit them and when the user is finished, creates a PDF with each one. The only problem is that the PDF that is created does not accurately resemble the completed InfoPath form. The PDF has too big of fonts and turns the 2-page InfoPath form that the user sees to a 3-page form that looks too amateurish to give to one of our clients.
I am wondering if anyone knows how to incorporate the default printer settings when creating the PDF? Here's the essential C# code we are using:
System.IO.File.WriteAllText(strTempFile, strInfopathXML);
Microsoft.Office.Interop.InfoPath.Application InfApp = new Microsoft.Office.Interop.InfoPath.Application();
Microsoft.Office.Interop.InfoPath.XDocument InfXDoc = InfApp.XDocuments.Open(strTempFile, (int)
Microsoft.Office.Interop.InfoPath.XdDocumentVersionMode.xdCanOpenInReadOnlyMode);
InfXDoc.View.EnableAutoUpdate();
InfXDoc.View.Export(exportFile, "PDF");
We need for the "Export" method to export the file so that it looks like the completed InfoPath form. Does anyone know how to accomplish this?
Thanks,