<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Writing Infopath form to PDF loses printer settings</title><link>https://www.infopathdev.com:443/forums/thread/98951.aspx</link><pubDate>Fri, 05 Sep 2014 13:47:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:98951</guid><dc:creator>cafescott</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/98951.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=98951</wfw:commentRss><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Someone I work with has&amp;nbsp;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.&amp;nbsp;&amp;nbsp;The only problem is that the PDF that is created does not accurately resemble the completed InfoPath form.&amp;nbsp; The PDF has too big of fonts and turns the&amp;nbsp;2-page InfoPath form that the user sees to a 3-page form that looks too amateurish to give to one of our clients.&lt;br /&gt;&lt;br /&gt;I am wondering if anyone knows how to incorporate the default printer settings when creating the PDF?&amp;nbsp; Here&amp;#39;s the essential C# code we are using:&lt;/p&gt;&lt;p&gt;&amp;nbsp; System.IO.File.WriteAllText(strTempFile, strInfopathXML);&lt;br /&gt;&amp;nbsp;&amp;nbsp;Microsoft.Office.Interop.InfoPath.Application InfApp = new Microsoft.Office.Interop.InfoPath.Application();&lt;br /&gt;&amp;nbsp;&amp;nbsp;Microsoft.Office.Interop.InfoPath.XDocument InfXDoc = InfApp.XDocuments.Open(strTempFile, (int)&lt;br /&gt;&amp;nbsp; Microsoft.Office.Interop.InfoPath.XdDocumentVersionMode.xdCanOpenInReadOnlyMode);&lt;br /&gt;&amp;nbsp;&amp;nbsp;InfXDoc.View.EnableAutoUpdate();&lt;br /&gt;&amp;nbsp; InfXDoc.View.Export(exportFile, &amp;quot;PDF&amp;quot;);&lt;br /&gt;&lt;br /&gt;We need for the &amp;quot;Export&amp;quot; method to export the file so that it looks like the completed InfoPath form.&amp;nbsp; Does anyone know how to accomplish this?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>