<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin W Smith &#187; Programming</title>
	<atom:link href="http://blog.martinwsmith.co.uk/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.martinwsmith.co.uk</link>
	<description>Thoughts, ideas and stuff</description>
	<lastBuildDate>Fri, 18 Mar 2011 15:17:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Visio and Tiff to PDF</title>
		<link>http://blog.martinwsmith.co.uk/2009/10/visio-and-tiff-to-pdf/</link>
		<comments>http://blog.martinwsmith.co.uk/2009/10/visio-and-tiff-to-pdf/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:10:13 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[acrobat]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://martinwsmith.wordpress.com/?p=23</guid>
		<description><![CDATA[I&#8217;m currently working on a project that requires the automatic rendering of files to PDF, MS Office files work ok but there&#8217;s a problem with Visio and Tiff files  so I wrote this simple console app in VB.NET. Module Module1 Sub Main(ByVal args As String()) OpenFileWithAcrobat(args(0), args(1)) End Sub Private Sub OpenFileWithAcrobat(ByVal InputFile As String, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on a project that requires the automatic rendering of files to PDF, MS Office files work ok but there&#8217;s a problem with Visio and Tiff files  so I wrote this simple console app in VB.NET.</p>
<pre>Module Module1

Sub Main(ByVal args As String())
OpenFileWithAcrobat(args(0), args(1))
End Sub

Private Sub OpenFileWithAcrobat(ByVal InputFile As String, ByVal OutPutFile As String)
Dim AcroAVDoc As Object
Dim AcroPDDoc As Object
Dim b As Boolean

AcroAVDoc = CreateObject("AcroExch.AVDoc")
b = AcroAVDoc.Open(InputFile, "Temp")

If AcroAVDoc.IsValid Then
AcroPDDoc = AcroAVDoc.GetPDDoc()
AcroPDDoc.SetInfo("Title", "")

If AcroPDDoc.Save(1 Or 4 Or 32, OutPutFile) &lt;&gt; True Then
Debug.Print("Error")
End If

AcroPDDoc.Close()
End If

AcroAVDoc.Close(0)
AcroPDDoc = Nothing
AcroAVDoc = Nothing

End Sub

End Module</pre>
<p>The app uses Acrobat Professional 9 and takes as its parameters the path of the file to be rendered to PDF format and the path of where the file should be saved to.  eg. renderer.exe &#8220;c:\temp\file.tif&#8221; &#8220;c:\temp\file.pdf&#8221;</p>
<p>It works really well as it maintains page sizes and orientation.  It will needs some error handling adding before it goes into production, but for now it works ok.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.martinwsmith.co.uk/2009/10/visio-and-tiff-to-pdf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.179 seconds -->

