<?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>Code Retard &#187; PDF</title>
	<atom:link href="http://www.coderetard.com/category/pdf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderetard.com</link>
	<description>Anything Geeky Goes!</description>
	<lastBuildDate>Sun, 21 Mar 2010 01:46:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FileApp Pro for iPhone downloads for free</title>
		<link>http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/</link>
		<comments>http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:09:21 +0000</pubDate>
		<dc:creator>adm_snackbar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[DS]]></category>
		<category><![CDATA[Deals]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/</guid>
		<description><![CDATA[ The iTunes App Store offers downloads of FileApp Pro for iPhone / iPod touch for free . That's the lowest total price we could find for this new app. 


Related Posts:<ol><li><a href='http://www.coderetard.com/2010/02/28/assassins-creed-ii-multiplayer-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: Assassin&#8217;s Creed II: Multiplayer for iPhone downloads for free'>Assassin&#8217;s Creed II: Multiplayer for iPhone downloads for free</a></li>
<li><a href='http://www.coderetard.com/2010/03/11/1password-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: 1Password for iPhone downloads for free'>1Password for iPhone downloads for free</a></li>
<li><a href='http://www.coderetard.com/2010/03/13/safe-or-safety-checklist-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: Safe OR: Safety Checklist for iPhone downloads for free'>Safe OR: Safety Checklist for iPhone downloads for free</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "FileApp+Pro+for+iPhone+downloads+for+free";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "The iTunes App Store offers downloads of FileApp Pro for iPhone / iPod touch for free. That&#8217;s the lowest total price we could find for this new app. It allows you to view, move, copy, rename, or transfer documents, images, videos, PDFs, or office...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><img class="size-full wp-image-1221" title="iphone3g_stock_trio" height="405" alt="iphone 3g stock photo trio" src="http://www.coderetard.com/wp-content/uploads/2008/07/iphone3g_stock_trio.jpg" width="500" /></p>
<p>
<div>The iTunes App Store offers downloads of FileApp Pro for <a href="http://www.coderetard.com/category/iphone/"title="Code Retard iPhone Posts Category" >iPhone</a> / iPod touch for <strong>free</strong>. That&#8217;s the lowest total price we could find for this new app. It allows you to view, move, copy, rename, or transfer documents, images, videos, PDFs, or office files from a computer to your device and vice-versa. Deal ends March 21.</div>
</p>
<p><em>Image/Apple</em></p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="FileApp Pro for iPhone downloads for free" url="http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free%20-%20http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free&amp;bodytext=%20The%20iTunes%20App%20Store%20offers%20downloads%20of%20FileApp%20Pro%20for%20iPhone%20%2F%20iPod%20touch%20for%20free%20.%20That%27s%20the%20lowest%20total%20price%20we%20could%20find%20for%20this%20new%20app.%20" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free&amp;notes=%20The%20iTunes%20App%20Store%20offers%20downloads%20of%20FileApp%20Pro%20for%20iPhone%20%2F%20iPod%20touch%20for%20free%20.%20That%27s%20the%20lowest%20total%20price%20we%20could%20find%20for%20this%20new%20app.%20" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;submitHeadline=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free&amp;submitSummary=%20The%20iTunes%20App%20Store%20offers%20downloads%20of%20FileApp%20Pro%20for%20iPhone%20%2F%20iPod%20touch%20for%20free%20.%20That%27s%20the%20lowest%20total%20price%20we%20could%20find%20for%20this%20new%20app.%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;h=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;t=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2010%2F03%2F12%2Ffileapp-pro-for-iphone-downloads-for-free%2F&amp;title=FileApp%20Pro%20for%20iPhone%20downloads%20for%20free&amp;annotation=%20The%20iTunes%20App%20Store%20offers%20downloads%20of%20FileApp%20Pro%20for%20iPhone%20%2F%20iPod%20touch%20for%20free%20.%20That%27s%20the%20lowest%20total%20price%20we%20could%20find%20for%20this%20new%20app.%20" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2010/02/28/assassins-creed-ii-multiplayer-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: Assassin&#8217;s Creed II: Multiplayer for iPhone downloads for free'>Assassin&#8217;s Creed II: Multiplayer for iPhone downloads for free</a></li>
<li><a href='http://www.coderetard.com/2010/03/11/1password-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: 1Password for iPhone downloads for free'>1Password for iPhone downloads for free</a></li>
<li><a href='http://www.coderetard.com/2010/03/13/safe-or-safety-checklist-for-iphone-downloads-for-free/' rel='bookmark' title='Permanent Link: Safe OR: Safety Checklist for iPhone downloads for free'>Safe OR: Safety Checklist for iPhone downloads for free</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2010/03/12/fileapp-pro-for-iphone-downloads-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem with Aspose.word: System.AccessViolationException</title>
		<link>http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/</link>
		<comments>http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 16:22:27 +0000</pubDate>
		<dc:creator>Son Riku</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[DS]]></category>
		<category><![CDATA[ea]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[using]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/</guid>
		<description><![CDATA[
		
		
		
		We were using aspose.PDF + aspose.wordÂ on our local dev computers and everything worked fine (windows 2k3 server 32bit)Â  We then deployed to our test server Windows 2k3 64bit and the site blew up. 
Description:System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Â Â  at á’‹.á‘ª.á–§(BinaryReader àµˆ)Â Â  at [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/' rel='bookmark' title='Permanent Link: How to Convert Txt Docs to PDF in Aspose c#'>How to Convert Txt Docs to PDF in Aspose c#</a></li>
<li><a href='http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/' rel='bookmark' title='Permanent Link: Automating Word docs to PDF in c# for SharePoint'>Automating Word docs to PDF in c# for SharePoint</a></li>
<li><a href='http://www.coderetard.com/2008/05/09/windows-2008-and-sharepoint-2007-dont-play-nice/' rel='bookmark' title='Permanent Link: Windows 2008 and SharePoint 2007 Don&#8217;t Play Nice'>Windows 2008 and SharePoint 2007 Don&#8217;t Play Nice</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "Problem+with+Aspose.word%3A+System.AccessViolationException";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "We were using aspose.PDF + aspose.wordÂ on our local dev computers and everything worked fine (windows 2k3 server 32bit)Â  We then deployed to our test server Windows 2k3 64bit and the site blew up. Description:System.AccessViolationException: Attempted...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>We were using aspose.PDF + aspose.wordÂ on our local dev computers and everything worked fine (windows 2k3 server 32bit)Â  We then deployed to our test server Windows 2k3 64bit and the site blew up. <span id="more-158"></span></p>
<p>Description:<o:p></o:p>System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.<o:p></o:p>Â Â  at <span style="font-family: 'Times New Roman','serif'">á’‹</span>.<span style="font-family: 'Times New Roman','serif'">á‘ª</span>.<span style="font-family: 'Times New Roman','serif'">á–§</span>(BinaryReader <span style="font-family: 'Arial Unicode MS','sans-serif'">àµˆ</span>)<o:p></o:p>Â Â  at <span style="font-family: 'Times New Roman','serif'">á‘‡</span>.<span style="font-family: 'Times New Roman','serif'">á‘¢</span>.á„‰(Stream <span style="font-family: 'Arial','sans-serif'">Ùƒ</span>, String <span style="font-family: 'Arial','sans-serif'">Ø¡</span>)<o:p></o:p>Â Â  at <span style="font-family: 'Times New Roman','serif'">á‘‡</span>.<span style="font-family: 'Times New Roman','serif'">á‘†</span>..ctor(Stream stream, String password, Document doc)<o:p></o:p>Â Â  at Aspose.Words.Document.à ¾(Stream <span style="font-family: 'Arial','sans-serif'">Ùƒ</span>, LoadFormat à ¿, String <span style="font-family: 'Arial','sans-serif'">Ø¡</span>)<o:p></o:p></p>
<p class="MsoNormal">Â Â  at Aspose.Words.Document..ctor(Stream stream)</p>
<p class="MsoNormal">Well it turns out it is a known issue.Â  The version of Aspose.word we where using was 5.0.2.Â  Don&#8217;t let that version fool you though, as even though its newer, it wont work on the 64 OS.Â  Their temporary solution right now is do downgrade your product to 5.0.0</p>
<p class="MsoNormal">Â <a href="http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry112260.aspx">http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry112260.aspx</a></p>
<p class="MsoNormal">&nbsp;</p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="Problem with Aspose.word: System.AccessViolationException" url="http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Problem%20with%20Aspose.word%3A%20System.AccessViolationException%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException&amp;bodytext=We%20were%20using%20aspose.PDF%20%2B%20aspose.word%C3%82%C2%A0on%20our%20local%20dev%20computers%20and%20everything%20worked%20fine%20%28windows%202k3%20server%2032bit%29%C3%82%C2%A0%20We%20then%20deployed%20to%20our%20test%20server%20Windows%202k3%2064bit%20and%20the%20site%20blew%20up.%20%0D%0A%0D%0ADescription%3ASystem.AccessViolationException" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException&amp;notes=We%20were%20using%20aspose.PDF%20%2B%20aspose.word%C3%82%C2%A0on%20our%20local%20dev%20computers%20and%20everything%20worked%20fine%20%28windows%202k3%20server%2032bit%29%C3%82%C2%A0%20We%20then%20deployed%20to%20our%20test%20server%20Windows%202k3%2064bit%20and%20the%20site%20blew%20up.%20%0D%0A%0D%0ADescription%3ASystem.AccessViolationException" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;submitHeadline=Problem%20with%20Aspose.word%3A%20System.AccessViolationException&amp;submitSummary=We%20were%20using%20aspose.PDF%20%2B%20aspose.word%C3%82%C2%A0on%20our%20local%20dev%20computers%20and%20everything%20worked%20fine%20%28windows%202k3%20server%2032bit%29%C3%82%C2%A0%20We%20then%20deployed%20to%20our%20test%20server%20Windows%202k3%2064bit%20and%20the%20site%20blew%20up.%20%0D%0A%0D%0ADescription%3ASystem.AccessViolationException&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;h=Problem%20with%20Aspose.word%3A%20System.AccessViolationException" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;t=Problem%20with%20Aspose.word%3A%20System.AccessViolationException" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F19%2Fproblem-with-asposeword-systemaccessviolationexception%2F&amp;title=Problem%20with%20Aspose.word%3A%20System.AccessViolationException&amp;annotation=We%20were%20using%20aspose.PDF%20%2B%20aspose.word%C3%82%C2%A0on%20our%20local%20dev%20computers%20and%20everything%20worked%20fine%20%28windows%202k3%20server%2032bit%29%C3%82%C2%A0%20We%20then%20deployed%20to%20our%20test%20server%20Windows%202k3%2064bit%20and%20the%20site%20blew%20up.%20%0D%0A%0D%0ADescription%3ASystem.AccessViolationException" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/' rel='bookmark' title='Permanent Link: How to Convert Txt Docs to PDF in Aspose c#'>How to Convert Txt Docs to PDF in Aspose c#</a></li>
<li><a href='http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/' rel='bookmark' title='Permanent Link: Automating Word docs to PDF in c# for SharePoint'>Automating Word docs to PDF in c# for SharePoint</a></li>
<li><a href='http://www.coderetard.com/2008/05/09/windows-2008-and-sharepoint-2007-dont-play-nice/' rel='bookmark' title='Permanent Link: Windows 2008 and SharePoint 2007 Don&#8217;t Play Nice'>Windows 2008 and SharePoint 2007 Don&#8217;t Play Nice</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Convert Txt Docs to PDF in Aspose c#</title>
		<link>http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/</link>
		<comments>http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 15:43:10 +0000</pubDate>
		<dc:creator>Son Riku</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[AV]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[calling]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[ea]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[tru]]></category>
		<category><![CDATA[txt]]></category>
		<category><![CDATA[using]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/</guid>
		<description><![CDATA[
		
		
		
		We are using the Aspose product for pdf to convert word docs to pdf.Â  We also wanted to use that same product to convert txt docs into pdf.Â  Unlike most other pdf convertor tools, aspose dosn&#8217;t have a auto convert to pdf for txt docs.Â  The solution to this problem is to stream in the [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/' rel='bookmark' title='Permanent Link: Automating Word docs to PDF in c# for SharePoint'>Automating Word docs to PDF in c# for SharePoint</a></li>
<li><a href='http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/' rel='bookmark' title='Permanent Link: Problem with Aspose.word: System.AccessViolationException'>Problem with Aspose.word: System.AccessViolationException</a></li>
<li><a href='http://www.coderetard.com/2008/03/16/c-vs-objective-c/' rel='bookmark' title='Permanent Link: C# vs Objective C'>C# vs Objective C</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "How+to+Convert+Txt+Docs+to+PDF+in+Aspose+c%23";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "We are using the Aspose product for pdf to convert word docs to pdf.Â  We also wanted to use that same product to convert txt docs into pdf.Â  Unlike most other pdf convertor tools, aspose dosn&#8217;t have a auto convert to pdf for txt docs.Â ...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>We are using the Aspose product for pdf to convert word docs to pdf.Â  We also wanted to use that same product to convert txt docs into pdf.Â  Unlike most other pdf convertor tools, aspose dosn&#8217;t have a auto convert to pdf for txt docs.Â  The solution to this problem is to stream in the txt doc and create a new pdf from it.</p>
<p>Code Below:<span id="more-134"></span>Â </p>
<p>System.IO.<font size="2" color="#008080">TextReader</font><font size="2"> tr = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">StreamReader</font><font size="2">(</font><font size="2" color="#800000">&#8220;C:/Test.txt&#8221;</font><font size="2">);</font><font size="2"><font size="2" color="#008000">//Instantiate Pdf pbject by calling its empty constructor</font></font><font size="2"><font size="2" color="#008080">Pdf</font><font size="2"> pdf1 = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">Pdf</font><font size="2">();</font><font size="2"><font size="2" color="#008000">//Create a new section in the Pdf object</font></font></font><font size="2"><font size="2">Aspose.Pdf.</font><font size="2" color="#008080">Section</font><font size="2"> sec1 = pdf1.Sections.Add();</font><font size="2"><font size="2" color="#008000">//Set the left margin of the section</font></font><font size="2">sec1.PageInfo.Margin.Left = 110;</font><font size="2"><font size="2" color="#008000">//Set the right margin of the section</font></font></p>
<p></font><font size="2">sec1.PageInfo.Margin.Right = 120;</font><font size="2"><font size="2" color="#008000">//Create a new text paragraph and pass the text to its constructor as argument</font></font><font size="2"><font size="2" color="#008080">Text</font><font size="2"> t2 = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">Text</font><font size="2">(tr.ReadToEnd());</font><font size="2">sec1.Paragraphs.Add(t2);</font><font size="2">pdf1.Save(<font size="2" color="#800000">&#8220;C:/testText.Pdf&#8221;</font><font size="2">);</font></font></p>
<p></font></p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="How to Convert Txt Docs to PDF in Aspose c#" url="http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23&amp;bodytext=We%20are%20using%20the%20Aspose%20product%20for%20pdf%20to%20convert%20word%20docs%20to%20pdf.%C3%82%C2%A0%20We%20also%20wanted%20to%20use%20that%20same%20product%20to%20convert%20txt%20docs%20into%20pdf.%C3%82%C2%A0%20Unlike%20most%20other%20pdf%20convertor%20tools%2C%20aspose%20dosn%27t%20have%20a%20auto%20convert%20to%20pdf%20for%20txt%20docs.%C3%82%C2%A0%20The%20s" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23&amp;notes=We%20are%20using%20the%20Aspose%20product%20for%20pdf%20to%20convert%20word%20docs%20to%20pdf.%C3%82%C2%A0%20We%20also%20wanted%20to%20use%20that%20same%20product%20to%20convert%20txt%20docs%20into%20pdf.%C3%82%C2%A0%20Unlike%20most%20other%20pdf%20convertor%20tools%2C%20aspose%20dosn%27t%20have%20a%20auto%20convert%20to%20pdf%20for%20txt%20docs.%C3%82%C2%A0%20The%20s" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;submitHeadline=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23&amp;submitSummary=We%20are%20using%20the%20Aspose%20product%20for%20pdf%20to%20convert%20word%20docs%20to%20pdf.%C3%82%C2%A0%20We%20also%20wanted%20to%20use%20that%20same%20product%20to%20convert%20txt%20docs%20into%20pdf.%C3%82%C2%A0%20Unlike%20most%20other%20pdf%20convertor%20tools%2C%20aspose%20dosn%27t%20have%20a%20auto%20convert%20to%20pdf%20for%20txt%20docs.%C3%82%C2%A0%20The%20s&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;h=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;t=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F18%2Fhow-to-convert-txt-docs-to-pdf-in-aspose%2F&amp;title=How%20to%20Convert%20Txt%20Docs%20to%20PDF%20in%20Aspose%20c%23&amp;annotation=We%20are%20using%20the%20Aspose%20product%20for%20pdf%20to%20convert%20word%20docs%20to%20pdf.%C3%82%C2%A0%20We%20also%20wanted%20to%20use%20that%20same%20product%20to%20convert%20txt%20docs%20into%20pdf.%C3%82%C2%A0%20Unlike%20most%20other%20pdf%20convertor%20tools%2C%20aspose%20dosn%27t%20have%20a%20auto%20convert%20to%20pdf%20for%20txt%20docs.%C3%82%C2%A0%20The%20s" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/' rel='bookmark' title='Permanent Link: Automating Word docs to PDF in c# for SharePoint'>Automating Word docs to PDF in c# for SharePoint</a></li>
<li><a href='http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/' rel='bookmark' title='Permanent Link: Problem with Aspose.word: System.AccessViolationException'>Problem with Aspose.word: System.AccessViolationException</a></li>
<li><a href='http://www.coderetard.com/2008/03/16/c-vs-objective-c/' rel='bookmark' title='Permanent Link: C# vs Objective C'>C# vs Objective C</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating Word docs to PDF in c# for SharePoint</title>
		<link>http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/</link>
		<comments>http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 22:33:51 +0000</pubDate>
		<dc:creator>Son Riku</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[docx]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/?p=9</guid>
		<description><![CDATA[
		
		
		
		Recently I was asked to write some code that would automate the conversion of word docs to pdf from a web upload.Â  At first I figured it would be an easy task.Â  I first tried to use the office.dlls, and everything worked&#8230;Â  I then read a best practise.Â  Do not use the Office.dlls on servers [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/' rel='bookmark' title='Permanent Link: Problem with Aspose.word: System.AccessViolationException'>Problem with Aspose.word: System.AccessViolationException</a></li>
<li><a href='http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/' rel='bookmark' title='Permanent Link: How to Convert Txt Docs to PDF in Aspose c#'>How to Convert Txt Docs to PDF in Aspose c#</a></li>
<li><a href='http://www.coderetard.com/2009/02/11/sharepoint-template-error-the-template-you-have-chosen-is-invalid-or-cannot-be-found/' rel='bookmark' title='Permanent Link: SharePoint Template Error: The template you have chosen is invalid or cannot be found.'>SharePoint Template Error: The template you have chosen is invalid or cannot be found.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "Automating+Word+docs+to+PDF+in+c%23+for+SharePoint";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Recently I was asked to write some code that would automate the conversion of word docs to pdf from a web upload.Â  At first I figured it would be an easy task.Â  I first tried to use the office.dlls, and everything worked&#8230;Â  I then read a...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Recently I was asked to write some code that would automate the conversion of word docs to pdf from a web upload.Â  At first I figured it would be an easy task.Â  I first tried to use the office.dlls, and everything worked&#8230;Â  I then read a best practise.Â  Do not use the Office.dlls on servers because office is not a server plateform.<span id="more-9"></span>Â </p>
<p>Poor Code:</p>
<p><font size="2" color="#0000ff"><br />
</font><font size="2" color="#0000ff"><br />
<address>using<font size="2"> System;</font></address>
<p><font size="2" color="#0000ff"></p>
<address>using<font size="2"> System.Collections.Generic;</font></address>
<p></font></p>
<p></font><font size="2" color="#0000ff"><br />
</font><font size="2" color="#0000ff"><br />
<address>using<font size="2"> System.Text;</font></address>
<p><font size="2" color="#0000ff"></p>
<address>using<font size="2"> Word = Microsoft.Office.Interop.Word;</font></address>
<p></font></p>
<p></font><font size="2" color="#008000"><br />
</font><font size="2" color="#008000"><br />
<address>//using Office = Microsoft.Office.Core;</address>
<p><font size="2" color="#0000ff"></p>
<address>using<font size="2"> System.IO;</font></address>
<p></font></p>
<p></font><font size="2" color="#0000ff"><br />
</font><font size="2" color="#0000ff"><br />
<address>using<font size="2"> System.Threading;</font></address>
<p><font size="2" color="#0000ff"></p>
<address>namespace<font size="2"> SpeakTech.SharePoint.PdfConverter</p>
<address>{</address>
<address><font size="2" color="#0000ff">public</font><font size="2"> </font><font size="2" color="#0000ff">class</font><font size="2"> PdfConverter: BaseEventSink</p>
<address>{</address>
<address><font size="2" color="#0000ff">private</font><font size="2"> </font><font size="2" color="#0000ff">string</font><font size="2"> _fileName;</p>
<address><font size="2" color="#0000ff">private</font><font size="2"> </font><font size="2" color="#0000ff">bool</font><font size="2"> _IsComplete;</p>
<address><font size="2" color="#0000ff">public</font><font size="2"> </font><font size="2" color="#0000ff">string</font><font size="2"> FileName { </font><font size="2" color="#0000ff">get</font><font size="2"> { </font><font size="2" color="#0000ff">return</font><font size="2"> _fileName; } </font><font size="2" color="#0000ff">set</font><font size="2"> { _fileName = </font><font size="2" color="#0000ff">value</font><font size="2">; } }</p>
<address><font size="2" color="#0000ff">public</font><font size="2"> </font><font size="2" color="#0000ff">bool</font><font size="2"> IsCompleted { </font><font size="2" color="#0000ff">get</font><font size="2"> { </font><font size="2" color="#0000ff">return</font><font size="2"> _IsComplete; } </font><font size="2" color="#0000ff">set</font><font size="2"> { _IsComplete = </font><font size="2" color="#0000ff">value</font><font size="2">; } }</p>
<address><font size="2" color="#0000ff">public</font><font size="2"> </font><font size="2" color="#0000ff">void</font><font size="2"> ConvertToPDF(</font><font size="2" color="#0000ff">string</font><font size="2"> FileToConvert, </font><font size="2" color="#0000ff">string</font><font size="2"> OutputDirectory)</p>
<address>{</address>
<address><font size="2" color="#0000ff">try</font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></p>
<p></font><font size="2"><br />
</font><font size="2"><br />
<address>{</address>
<address><font size="2" color="#008000">//PublishException(&#8221;In Method&#8221;);</font></address>
<p><font size="2"></p>
<address><font size="2" color="#0000ff">string</font><font size="2"> filename = </font><font size="2" color="#0000ff">string</font><font size="2">.Empty;</p>
<address><font size="2" color="#0000ff">if</font><font size="2"> (FileToConvert.IndexOf(</font><font size="2" color="#a31515">&#8220;/&#8221;</font><font size="2">) &gt; 1)</p>
<address>{</address>
<address>filename = FileToConvert.Remove(0, FileToConvert.LastIndexOf(<font size="2" color="#a31515">&#8220;/&#8221;</font><font size="2">));</p>
<address>filename = filename.Remove(0, 1);</address>
<address>filename = filename.Remove(filename.IndexOf(<font size="2" color="#a31515">&#8220;.&#8221;</font><font size="2">), 4);</p>
<address>filename = filename + <font size="2" color="#a31515">&#8220;.pdf&#8221;</font><font size="2">;</p>
<address>}</address>
<address></address>
<address><font size="2" color="#008000">//PublishException(&#8221;Deleteting File&#8221;);</font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></p>
<p></font><font size="2"><br />
</font><font size="2"><br />
<address><font size="2" color="#0000ff">if</font><font size="2"> (</font><font size="2" color="#2b91af">File</font><font size="2">.Exists(OutputDirectory + filename))</p>
<address><font size="2" color="#2b91af">File</font><font size="2">.Delete(OutputDirectory + filename);</p>
<address><font size="2" color="#0000ff">object</font><font size="2"> Missing = System.Reflection.</font><font size="2" color="#2b91af">Missing</font><font size="2">.Value;</p>
<address><font size="2" color="#0000ff">object</font><font size="2"> fileToOpen = (</font><font size="2" color="#0000ff">object</font><font size="2">)FileToConvert;</p>
<address>APServerNET.APServer SVR = <font size="2" color="#0000ff">new</font><font size="2"> APServerNET.APServer();</p>
<address>SVR.OutputDirectory = OutputDirectory;</address>
<address>SVR.NewDocumentName = filename;</address>
<address>Word.ApplicationClass app = <font size="2" color="#0000ff">new</font><font size="2"> Word.ApplicationClass();</p>
<address>Word.Document doc = <font size="2" color="#0000ff">new</font><font size="2"> Word.Document();</p>
<address>doc.Application.Visible = <font size="2" color="#0000ff">false</font><font size="2">;</p>
<address><font size="2" color="#008000">//app.Visible = false;</font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font><font size="2"><br />
</font><font size="2"><br />
<address>SVR.StartPrinting();</address>
<address>doc = app.Documents.Open(<font size="2" color="#0000ff">ref</font><font size="2"> fileToOpen,</p>
<address><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing,</p>
<address><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing,</p>
<address><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing,</p>
<address><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing);</p>
<address>app.ActivePrinter = SVR.NewPrinterName;</address>
<address>Word.Dialog dlg;</address>
<address>dlg = app.Dialogs[Word.WdWordDialog.wdDialogFilePrint];</address>
<address>doc = app.ActiveDocument;</address>
<address>dlg.Application.Visible = <font size="2" color="#0000ff">false</font><font size="2">;</p>
<address>dlg.Execute();</address>
<address>SVR.StopPrinting();</address>
<address>app.Quit(<font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing, </font><font size="2" color="#0000ff">ref</font><font size="2"> Missing);</p>
<address>_fileName = filename;</address>
<address>_IsComplete = <font size="2" color="#0000ff">true</font><font size="2">;</p>
<address>}</address>
<address><font size="2" color="#0000ff">catch</font><font size="2"> (</font><font size="2" color="#2b91af">Exception</font><font size="2"> ex)</p>
<address>{</address>
<address>MPLog.WriteError(<font size="2" color="#a31515">&#8220;Unable to Convert Doc to PDF: &#8220;</font><font size="2">, ex);</p>
<address>}</address>
<address>}</address>
<address><font size="2" color="#0000ff">protected</font><font size="2"> </font><font size="2" color="#0000ff">override</font><font size="2"> </font><font size="2" color="#0000ff">void</font><font size="2"> HandleEvent()</p>
<address>{</address>
<address>}</address>
<address>}</address>
<address>}</address>
<address></address>
<address></address>
<address>____________________________________________________________</address>
<address></address>
<p><strong>The code above is the WRONG way of doing it.</strong>Â </p>
<p>Â The best way i found to do this was with Aspose.Words and Aspose.PDF: below is their article on the subject:</p>
<table cellSpacing="0" class="bannerparthead">
<tr id="hdr">
<td class="runninghead">Aspose.Words</td>
<td class="product"></td>
</tr>
</table>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">This article describes how you can add an ability to convert DOC to PDF (DOC2PDF) to Microsoft Office SharePoint Server 2007 (MOSS) using </span><a href="http://www.aspose.com/Products/Aspose.Words/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Words</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> and </span><a href="http://www.aspose.com/Products/Aspose.Pdf/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Pdf</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">In this article, you will create a small console application in Visual Studio that works as a document converter for SharePoint and invokes the Aspose components to perform the conversion.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">It is easy to add other types of conversions such as DOC to DOCX, DOC to RTF, RTF to DOC, DOC to WordML, WordML to DOC, HTML to DOC etc by following the example in this article. You can also investigate other Aspose file format components such as </span><a href="http://www.aspose.com/Products/Aspose.Cells/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Cells</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> and </span><a href="http://www.aspose.com/Products/Aspose.Slides/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Slides</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> and use them to support even more types of document conversions in SharePoint.</span></p>
<h4 style="margin: 12pt 0pt 6pt -12pt"><span style="font-weight: bold; font-size: 10pt; font-family: 'Verdana'">Document Converters in SharePoint</span></h4>
<p style="margin: 0pt 0pt 6pt"><a href="http://office.microsoft.com/en-us/sharepointserver/FX100492001033.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Microsoft Office SharePoint Server 2007</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> includes a new feature that allows to convert documents from one format (content type) to another. You can use document conversions to transform your content to suit your business requirements. You can invoke the conversion from the user interface or programmatically via the SharePoint Object Model.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Built-in Document Converters in SharePoint</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">SharePoint includes several document converters that you can use out of the box:</span></p>
<ul type="disc" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="1" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">.DOCX (Office Open XML) to HTML web page (also .DOCM to web page)</span></li>
<li value="2" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">InfoPath to HTML web page</span></li>
<li value="3" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">XML to HTML web page</span></li>
</ul>
<p style="margin: 0pt 0pt 6pt"><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Converting a Word Document (DOCX) to a Web Page using a built-in MOSS document converter.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.001.png" height="438" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.001 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Need for More Document Converters</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">The set of document converters included with MOSS is limited. You can only convert DOCX, InfoPath and XML documents into web pages.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">There are many possible scenarios where additional converters might be required:</span></p>
<ul type="disc" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="4" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">When a draft document is stored in one format (Microsoft Word DOC) and the final document is published in another format (Adobe PDF) to a customer-facing site.</span></li>
<li value="5" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">When the main format for documents is DOCX inside the organization, but it needs to make the documents available to its customers and partners as DOC documents and vice versa.</span></li>
</ul>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Extensible Document Converter Framework</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Thankfully, the document converters framework in SharePoint is extensible. It allows custom converters to be implemented and seamlessly integrated into SharePoint allowing for any required content type conversion to be supported.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">There is a good section </span><a href="http://msdn2.microsoft.com/en-us/library/ms544523.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Document Converters Overview</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> in MSDN about document converters. Although it is geared towards developers implementing a custom document converter, it makes a good reading for any IT professional who has a task of planning or support document converters in SharePoint.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Summary of Document Converters in SharePoint</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">To summarize the features of Document Converters in SharePoint:</span></p>
<ul type="disc" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="6" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Extensible. Custom converters can be added to facilitate almost any content conversion.</span></li>
<li value="7" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">A Document Converter is an executable. You can develop one or find a suitable commercial product.</span></li>
<li value="8" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Document conversions are usually resource intensive, they run on the server(s) and are controlled by the SharePoint load balancer service.</span></li>
<li value="9" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Documents that are results of the conversion can be versioned and they maintain a link to the original document in their metadata, history, properties etc.</span></li>
</ul>
<h4 style="margin: 12pt 0pt 6pt -12pt"><span style="font-weight: bold; font-size: 10pt; font-family: 'Verdana'">Aspose to the Rescue</span></h4>
<p style="margin: 0pt 0pt 6pt"><a href="http://www.aspose.com/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> provides a great line of .NET and Java components. Trusted by thousands of customers worldwide, the products include File Format Components, Reporting Products, Visual Components and Utility Components.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Aspose File Format Components include products such as Aspose.Words, Aspose.Cells, Aspose.Pdf, Aspose.Slides and so on that allow to programmatically open, modify, generate, save, merge, convert, etc. documents in various formats including DOC, DOCX, RTF, WordML, HTML, PDF, XLS, PPT and others. These products are .NET class libraries that developers use when building their .NET or Java applications that require access to documents in different formats.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Aspose File Format Components are often chosen for their superior performance, scalability and stability in a server environment over Microsoft Office Automation. Microsoft Office Automation is not recommended on the server, here are </span><a href="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/index.html?url=WhynotAutomation.html"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">reasons why</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">While Aspose components cannot be directly used as document converters for SharePoint out of the box, this article shows how you can easily create a small .NET application that wraps an Aspose component and works as a document converter for SharePoint.</span></p>
<h4 style="margin: 12pt 0pt 6pt -12pt"><span style="font-weight: bold; font-size: 10pt; font-family: 'Verdana'">Create a Document Converter for MOSS</span></h4>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">A document converter for SharePoint (MOSS) is a custom executable that SharePoint calls with command line arguments. The arguments specify the input, output, configuration and log files. The command line arguments are described in detail in </span><a href="http://msdn2.microsoft.com/en-us/library/ms559247.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Document Converter Run Command</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> in MSDN.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">We are going to create a simple console application in Visual Studio 2005 that supports the command line arguments passed by SharePoint and performs the DOC to PDF conversion using Aspose.Words and Aspose.Pdf.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">In this example we are using Visual Studio 2005 and the application will be built for .NET 2.0, but you can also use Visual Studio 2003 and the document converter will be built for .NET 1.1, it will also work fine. SharePoint has no requirements regarding .NET version to document converters, in fact, a document converter does not have to be a .NET application at all, it just needs to be an executable.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Download and Install Aspose Components</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">You need to download Aspose.Words for .NET and Aspose.Pdf for .NET from </span><a href="http://www.aspose.com/Downloads/Components/Default.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose Downloads</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">. You can either download Aspose.Total or download the individual products.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Install Aspose.Words and Aspose.Pdf on your development computer. All Aspose components, when installed, work in evaluation mode. The evaluation mode has no time limit and injects watermarks into produced documents.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Create a Project</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Start Visual Studio 2005 and create a new console application. This example will show a C# console application, but you can use VB.NET too.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Add References</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">This project will use Aspose.Words and Aspose.Pdf. Add references to both Aspose.Words and Aspose.Pdf to your project:</span></p>
<ol type="1" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="1" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Add a reference to </span><span style="font-size: 8.5pt; font-family: 'Verdana'">C:\Program Files\Aspose\Aspose.</span><span style="font-size: 8.5pt; font-family: 'Verdana'">Words\Bin\</span><span style="font-size: 8.5pt; font-family: 'Verdana'">net2.0</span><span style="font-size: 8.5pt; font-family: 'Verdana'">\Aspose.Words.dll</span></li>
<li value="2" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Add a reference to </span><span style="font-size: 8.5pt; font-family: 'Verdana'">C:\Program Files\Aspose\Aspose.Pdf\Bin\net2.0</span><span style="font-size: 8.5pt; font-family: 'Verdana'">\Aspose.Pdf.dll</span></li>
</ol>
<p style="margin: 0pt 0pt 6pt"><img width="576" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.002.png" height="423" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.002 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Add Code</span></h5>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647878" title="_Toc172647878"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">The following is the complete code of the document converter in the Class1.cs file.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">using</span><span style="font-size: 8pt; font-family: 'Courier New'"> System;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">using</span><span style="font-size: 8pt; font-family: 'Courier New'"> System.IO;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">namespace</span><span style="font-size: 8pt; font-family: 'Courier New'"> AsposeDoc2Pdf</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">{</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">&lt;summary&gt;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> DOC2PDF document converter for SharePoint.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> Uses Aspose.Words and Aspose.Pdf to perform the conversion.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">&lt;/summary&gt;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">class</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Class1</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">&lt;summary&gt;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> The main entry point for the application.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">///</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #808080; font-family: 'Courier New'">&lt;/summary&gt;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  [</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">STAThread</span><span style="font-size: 8pt; font-family: 'Courier New'">]</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">void</span><span style="font-size: 8pt; font-family: 'Courier New'"> Main(</span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'">[] args)</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Although SharePoint passes &#8220;-log &lt;filename&gt;&#8221; to us and we are</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// supposed to log there, for the sake of simplicity, we will use </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// our own hard coded path to the log file.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Make sure there are permissions to write into this folder.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// The document converter will be called under the document </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// conversion account (not sure what name), so for testing purposes </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// I would give the Users group write permissions into this folder.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  gLog = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">StreamWriter</span><span style="font-size: 8pt; font-family: 'Courier New'">(</span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">@&#8221;C:\Aspose2Pdf\log.txt&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">, </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">true</span><span style="font-size: 8pt; font-family: 'Courier New'">);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">try</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gLog.WriteLine(</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">DateTime</span><span style="font-size: 8pt; font-family: 'Courier New'">.Now.ToString() + </span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8221; Started&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gLog.WriteLine(</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Environment</span><span style="font-size: 8pt; font-family: 'Courier New'">.CommandLine);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><a name="_Toc172647879" title="_Toc172647879"></a><span style="font-size: 8pt; font-family: 'Courier New'">ParseCommandLine(args);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Uncomment the code below when you have purchased licenses for </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Aspose products. You can purchase licenses for individual </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// products such as Aspose.Words and Aspose.Pdf or you can </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// purchase Aspose.Total license for all Aspose components.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">//</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// You need to deploy the license in the same folder as your </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// executable, alternatively you can add the license file as an </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// embedded resource to your project.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">//</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// // Set license for Aspose.Words.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Aspose.Words.License wordsLicense = new Aspose.Words.License();</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// wordsLicense.SetLicense(&#8221;Aspose.Total.lic&#8221;);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// // Set license for Aspose.Pdf.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// pdfLicense.SetLicense(&#8221;Aspose.Total.lic&#8221;);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  ConvertDoc2Pdf(gInFileName, gOutFileName);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">catch</span><span style="font-size: 8pt; font-family: 'Courier New'"> (</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Exception</span><span style="font-size: 8pt; font-family: 'Courier New'"> e)</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gLog.WriteLine(e.Message);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Environment</span><span style="font-size: 8pt; font-family: 'Courier New'">.ExitCode = 100;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">finally</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gLog.Close();</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">private</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">void</span><span style="font-size: 8pt; font-family: 'Courier New'"> ParseCommandLine(</span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'">[] args)</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">int</span><span style="font-size: 8pt; font-family: 'Courier New'"> i = 0;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">while</span><span style="font-size: 8pt; font-family: 'Courier New'"> (i &lt; args.Length)</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'"> s = args[i];</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">switch</span><span style="font-size: 8pt; font-family: 'Courier New'"> (s.ToLower())</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">case</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8220;-in&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  i++;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gInFileName = args[i];</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">break</span><span style="font-size: 8pt; font-family: 'Courier New'">;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">case</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8220;-out&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  i++;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  gOutFileName = args[i];</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">break</span><span style="font-size: 8pt; font-family: 'Courier New'">;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">case</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8220;-config&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Skip the name of the config file and do nothing.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  i++;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">break</span><span style="font-size: 8pt; font-family: 'Courier New'">;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">case</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8220;-log&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Skip the name of the log file and do nothing.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  i++;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">break</span><span style="font-size: 8pt; font-family: 'Courier New'">;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">default</span><span style="font-size: 8pt; font-family: 'Courier New'">:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">throw</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Exception</span><span style="font-size: 8pt; font-family: 'Courier New'">(</span><span style="font-size: 8pt; color: #800000; font-family: 'Courier New'">&#8220;Unknown command line argument: &#8220;</span><span style="font-size: 8pt; font-family: 'Courier New'"> + s);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  i++;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">private</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">void</span><span style="font-size: 8pt; font-family: 'Courier New'"> ConvertDoc2Pdf(</span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'"> inFileName, </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'"> outFileName)</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  {</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Load the DOC file into Aspose.Words.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// You can load not only DOC here, but any format supported by</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Aspose.Words: DOC, RTF, WordML, HTML.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  Aspose.Words.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Document</span><span style="font-size: 8pt; font-family: 'Courier New'"> srcDoc = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> Aspose.Words.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Document</span><span style="font-size: 8pt; font-family: 'Courier New'">(inFileName);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// If the document contains any images, they will be saved as temporary </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// files (deleted by Aspose.Pdf when conversion is finished.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">//</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Since we will be saving the document into a memory stream, Aspose.Words</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// will attempt to save the images into the system temporary folder.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">//</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// This could bring up issues with permissions, therefore, it is better</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// to specify where to save the images explicitly so we can be sure there </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// will be no problems with permissions. Lets save them into the same</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// folder as the output file.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  srcDoc.SaveOptions.ExportImagesFolder = </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Path</span><span style="font-size: 8pt; font-family: 'Courier New'">.GetDirectoryName(outFileName);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Save the DOC file as Aspose.Pdf.Xml in memory.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">MemoryStream</span><span style="font-size: 8pt; font-family: 'Courier New'"> xmlDoc = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">MemoryStream</span><span style="font-size: 8pt; font-family: 'Courier New'">();</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  srcDoc.Save(xmlDoc, Aspose.Words.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">SaveFormat</span><span style="font-size: 8pt; font-family: 'Courier New'">.AsposePdf);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  xmlDoc.Position = 0;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Read the document into Aspose.Pdf.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  Aspose.Pdf.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Pdf</span><span style="font-size: 8pt; font-family: 'Courier New'"> pdf = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> Aspose.Pdf.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Pdf</span><span style="font-size: 8pt; font-family: 'Courier New'">();</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  pdf.BindXML(xmlDoc, </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">null</span><span style="font-size: 8pt; font-family: 'Courier New'">);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Instruct Aspose.Pdf to delete temporary image files.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  pdf.IsImagesInXmlDeleteNeeded = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">true</span><span style="font-size: 8pt; font-family: 'Courier New'">;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Produce the PDF file.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â Â Â Â Â  pdf.Save(outFileName);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">private</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'"> gInFileName;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">private</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">string</span><span style="font-size: 8pt; font-family: 'Courier New'"> gOutFileName;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">private</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">static</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">StreamWriter</span><span style="font-size: 8pt; font-family: 'Courier New'"> gLog;</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  }</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">}</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'"></span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Select the Release configuration and rebuild the solution.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">You now have the AsposeDoc2Pdf.exe executable that can be used as a document converter for SharePoint.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">How to Build Converters for Other Formats</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">It is very easy to build more document converters. Aspose.Words supports DOC, DOCX, RTF, WordML and HTML documents and can perform conversions between these formats in any direction. Conversions between Microsoft Word formats (DOC, DOCX, RTF and WordML) are high-fidelity, meaning no content or formatting in the document is lost.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">For example, to create an RTF to WordML converter with Aspose.Words, you will use the following code:</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// Load the </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">RTF</span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'"> file into Aspose.Words.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">Aspose.Words.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Document</span><span style="font-size: 8pt; font-family: 'Courier New'"> </span><span style="font-size: 8pt; font-family: 'Courier New'">d</span><span style="font-size: 8pt; font-family: 'Courier New'">oc = </span><span style="font-size: 8pt; color: #0000ff; font-family: 'Courier New'">new</span><span style="font-size: 8pt; font-family: 'Courier New'"> Aspose.Words.</span><span style="font-size: 8pt; color: #008080; font-family: 'Courier New'">Document</span><span style="font-size: 8pt; font-family: 'Courier New'">(inFileName);</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">// </span><span style="font-size: 8pt; color: #008000; font-family: 'Courier New'">Save the document in the WordprocessingML format.</span></p>
<p style="margin: 0pt"><span style="font-size: 8pt; font-family: 'Courier New'">doc.Save(outFileName, Aspose.Words.SaveFormat.WordML);</span></p>
<h4 style="margin: 12pt 0pt 6pt -12pt"><span style="font-weight: bold; font-size: 10pt; font-family: 'Verdana'">Deploy a Document Converter to MOSS</span></h4>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">The document converter for SharePoint must be packaged as a SharePoint Feature and deployed at the Web-application level.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If you need an overview of deploying document converters as SharePoint features, see the following topics in MSDN:</span></p>
<ul type="disc" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="10" style="margin-top: 0pt; margin-bottom: 6pt"><a href="http://msdn2.microsoft.com/en-us/library/ms496285.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Document Converter Deployment</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">.</span></li>
<li value="11" style="margin-top: 0pt; margin-bottom: 6pt"><a href="http://msdn2.microsoft.com/en-us/library/ms460318.aspx"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Working with Features</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">.</span></li>
</ul>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">A Feature in SharePoint is a unit of functionality that can be added/removed to a SharePoint server. A feature is defined in an XML file that describes the feature, its name, scope and required files. The feature definition XML and accompanying files must be placed in a folder in the C</span><span style="font-size: 8.5pt; font-family: 'Verdana'">:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES</span><span style="font-size: 8.5pt; font-family: 'Verdana'"> folder.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Each feature needs to have a Feature.xml file that specifies the feature name, unique id, scope and the elements that comprise the feature.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Create a Folder for the Feature</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Create the C</span><span style="font-size: 8.5pt; font-family: 'Verdana'">:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES</span><span style="font-size: 8.5pt; font-family: 'Verdana'">\AsposeDoc2Pdf folder on the SharePoint server.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Create a Feature Definition XML File</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">In the feature folder, create the Feature.xml as shown below.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647880" title="_Toc172647880"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Content of the Feature.xml file.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&lt;Feature xmlns=&#8221;http://schemas.microsoft.com/sharepoint/&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">Id=&#8221;{b4ce4c29-8aaf-4b80-bb63-d676e836f8ef}&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">Title=&#8221;DOC to PDF Converter (by Aspose)&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">Description=&#8221;Makes it possible to convert documents from DOC to PDF.&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">Scope=&#8221;WebApplication&#8221;&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'"></span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;ElementManifests&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;ElementManifest Location=&#8221;Elements.xml&#8221;/&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;ElementFile Location=&#8221;AsposeDoc2Pdf.exe&#8221;/&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;ElementFile Location=&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">Aspose.Words.dll</span><span style="font-size: 8pt; font-family: 'Courier New'">&#8220;/&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;ElementFile Location=&#8221;</span><span style="font-size: 8pt; font-family: 'Courier New'">Aspose.Pdf.dll</span><span style="font-size: 8pt; font-family: 'Courier New'">&#8220;/&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;/ElementManifests&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&lt;/Feature&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If you create more converters later on, pick a different GUID for the feature. The easiest way to generate a unique GUID is to use the Tools / Generate GUID menu in Visual Studio.</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Create a Document Converter Definition XML File</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">The ElementManifest element in the Feature.xml file refers to the Elements.xml file. This file contains the actual definition of the document converter. The definition of the document converter includes unique id, display name, the name of the executable to launch and the extensions of the source and destination content types.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">In the feature folder, create the Elements.xml as shown below.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647881" title="_Toc172647881"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Content of the Elements.xml file.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&lt;Elements xmlns=&#8221;<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>&#8221;&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">&lt;DocumentConverter Id=&#8221;{a4df1dac-a22c-431a-bbf6-dcc91848fee9}&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">Name=&#8221;Word Document to PDF (by Aspose)&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">App=&#8221;AsposeDoc2Pdf.exe&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">From=&#8221;doc&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â Â Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">To=&#8221;pdf&#8221;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">Â Â Â  </span><span style="font-size: 8pt; font-family: 'Courier New'">/&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&lt;/Elements&gt;</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If you create more converters later on, pick a different GUID for the converter. The easiest way to generate a unique GUID is to use the Tools / Generate GUID menu in Visual Studio.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647882" title="_Toc172647882"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">AsposeDoc2Pdf is now deployed as a SharePoint Feature.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.003.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.003 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Enable Document Converters</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">You need to enable document conversions in SharePoint, as they seem to come disabled by default.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Go to the Central Administrator / Application Management / Configure Document Conversion screen and enable document conversions.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647883" title="_Toc172647883"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Enable document conversions in MOSS.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.004.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.004 Automating Word docs to PDF in c# for SharePoint" /></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">It is a good idea to check that the document conversion services are installed and running. In my case they were installed and running.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Go to the Central Administration / Operations / Services on Server and make sure that the Document Conversions Launcher Service and Document Conversions Load Balancer Services are installed and running.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647884" title="_Toc172647884"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Check Document Conversion services are installed and running.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.005.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.005 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Install the Document Converter Feature</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Now we need to install the feature so the document converter becomes available in SharePoint. Execute the following command on the server:</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&#8220;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE&#8221; -o installfeature -filename AsposeDoc2Pdf\Feature.xml â€“force</span></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Activate the Document Converter Feature</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Now we need to activate the document converter, execute the following command on the server:</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8pt; font-family: 'Courier New'">&#8220;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE&#8221; -o activatefeature -name AsposeDoc2Pdf -url http://win2k3r2ee</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Note that you need to specify a URL in the â€“url argument. I have not fully figured out what URL exactly must be specified, I just specified the name of my SharePoint server and it worked, making the document converter available to all SharePoint sites on this server.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Now it is a good time to verify that the feature indeed was installed and activated. In my case, I found I still needed to click the Activate button in the SharePoint Central Administration / Application Management / Manage Web Applications Features window.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Make sure the new document converter feature is activated in the Manage Web Application Features window.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.006.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.006 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Copy the Document Converter Files!</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">After installing and activating the document converter as a SharePoint Feature, I was expecting that the conversions will just run. But the conversions did not run (nothing was happening) and I had to examine the logs in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS folder.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">The error message I was getting was that the Document Conversion Launcher Service was attempting to start my converter C:\Program Files\Microsoft Office Servers\12.0\TransformApps\AsposeDoc2Pdf.exe, but there was no such file in that directory.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Most likely, I have done something wrong in the Feature Definition XML file so the files of the feature were not copied to the correct location, but I could not find a solution here, so I copied the files manually.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Copy the following files from C</span><span style="font-size: 8.5pt; font-family: 'Verdana'">:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES</span><span style="font-size: 8.5pt; font-family: 'Verdana'">\AsposeDoc2Pdf to C:\Program Files\Microsoft Office Servers\12.0\TransformApps:</span></p>
<ul type="disc" style="margin-top: 0pt; margin-bottom: 0pt">
<li value="12" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">AsposeDoc2Pdf.exe</span></li>
<li value="13" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Aspose.Words.dll</span></li>
<li value="14" style="margin-top: 0pt; margin-bottom: 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Aspose.Pdf.dll</span></li>
</ul>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Make Sure the Converter is Enabled for the Site</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Go to your SharePoint home page, click Site Actions, Site Settings, Modify All Site Settings, Site Content Types, Document, Manage Document Conversion for This Content Type and make sure your document converter is enabled.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647885" title="_Toc172647885"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Checking Document Converter is enabled for Documents on this SharePoint Site.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.007.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.007 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Test Your Conversion</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Finally, we can test if the conversion works.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Upload a test DOC file to the server. I uploaded a document called â€œDistributable VHD Image EULA.docâ€.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647886" title="_Toc172647886"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Upload a DOC file to MOSS.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.008.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.008 Automating Word docs to PDF in c# for SharePoint" /></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Click on your test file so the context menu opens, select Convert Document, Word Document to PDF (by Aspose).</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647887" title="_Toc172647887"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Selecting to convert a DOC document to PDF.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.009.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.009 Automating Word docs to PDF in c# for SharePoint" /></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Click OK in the window confirming the request for conversion.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Note the conversion is managed by the document conversion schedule and document conversion load balancer service so it might not happen instantaneously. By default, the document conversion kicks off every minute.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Just refresh the page with the list of documents after several seconds until you see the converted document appears in the list.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647888" title="_Toc172647888"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">The document that is a result of the conversion appears in the list.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.010.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.010 Automating Word docs to PDF in c# for SharePoint" /></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Click on the document to download it. It is a PDF document and will fire up Adobe Reader on your machine.</span></p>
<p style="margin: 0pt 0pt 6pt"><a name="_Toc172647889" title="_Toc172647889"></a><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">Adobe Reader displays the PDF document downloaded from the MOSS site.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="575" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.011.png" height="437" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.011 Automating Word docs to PDF in c# for SharePoint" /></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Just to verify that Aspose.Words and Aspose.Pdf did a great job at accurately converting DOC to PDF, open the original DOC in Microsoft Word and compare with what you have in Adobe Reader.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-weight: bold; font-size: 8.5pt; color: #333399; font-family: 'Verdana'">The original DOC file opened in Microsoft Word to compare how well it was converted to PDF.</span></p>
<p style="margin: 0pt 0pt 6pt"><img width="576" src="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/Add-DOC-to-PDF-and-Other-Conversions-to-Microsoft-Office-SharePoint-Server-2007-with-Aspose-Components.012.png" height="452" title="Automating Word docs to PDF in c# for SharePoint" alt="Add DOC to PDF and Other Conversions to Microsoft Office SharePoint Server 2007 with Aspose Components.012 Automating Word docs to PDF in c# for SharePoint" /></p>
<h5 style="margin: 12pt 0pt 3pt -12pt"><span style="font-weight: bold; font-size: 8.5pt; font-family: 'Verdana'">Troubleshooting</span></h5>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If the conversion does not work, check the MOSS log files, they are pretty detailed. The log files are in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS.</span></p>
<h4 style="margin: 12pt 0pt 6pt -12pt"><span style="font-weight: bold; font-size: 10pt; font-family: 'Verdana'">Summary</span></h4>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">In this article, I have shown how to use Aspose.Words and Aspose.Pdf to add the DOC2PDF conversion feature to MOSS. I have also shown it is very easy to add many more types of conversions to SharePoint using Aspose components.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">As of the time of writing (April 2007), Aspose.Words does not yet support Open Office XML (DOCX) format, but we are working on it. Aspose.Words export to DOCX is planned for Q2 2007 and DOCX import is planned for later in 2007. Having support for DOCX in Aspose.Words will allow to do even more high-fidelity document conversions on the server, so bear with us. Information about new releases of Aspose.Words is published in the </span><a href="http://www.aspose.com/COMMUNITY/blogs/home.aspx?App=aspose.words"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Words Blog</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'">.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If you feel that building your own document converter as shown in this article is too much for you and you would prefer a finished product with a simple installer, let us know. We might package it as a product eventually, say Aspose.Words for SharePoint. </span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">If you are using Microsoft SQL Server Reporting Services, make sure to check our another great product </span><a href="http://www.aspose.com/Products/Aspose.Words.Reporting.Services/"><span style="font-size: 8.5pt; color: #0000ff; font-family: 'Verdana'; text-decoration: underline">Aspose.Words for Reporting Services</span></a><span style="font-size: 8.5pt; font-family: 'Verdana'"> that makes </span><span style="font-size: 8.5pt; font-family: 'Verdana'">possible generating true DOC</span><span style="font-size: 8.5pt; font-family: 'Verdana'">, DOCX</span><span style="font-size: 8.5pt; font-family: 'Verdana'">, RTF and WordprocessingML reports in Microsoft SQL Server 2005 Reporting Services.</span></p>
<p style="margin: 0pt 0pt 6pt"><span style="font-size: 8.5pt; font-family: 'Verdana'">Please excuse any technical inaccuracies regarding SharePoint (if you find any) because my experience with SharePoint before this article was nil and I had to spend some time grasping many concepts that were new to me such as sites, web applications, document libraries and so on and what they mean in the context of MOSS.</span></p>
<p style="margin: 0pt 0pt 6pt">taken from : <a href="http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/add-doc-to-pdf-and-other-conversions-to-microsoft-office-sharepoint-server-2007-with-aspose-components.html">http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/add-doc-to-pdf-and-other-conversions-to-microsoft-office-sharepoint-server-2007-with-aspose-components.html</a></p>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></address>
<p></font></p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="Automating Word docs to PDF in c# for SharePoint" url="http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint&amp;bodytext=Recently%20I%20was%20asked%20to%20write%20some%20code%20that%20would%20automate%20the%20conversion%20of%20word%20docs%20to%20pdf%20from%20a%20web%20upload.%C3%82%C2%A0%20At%20first%20I%20figured%20it%20would%20be%20an%20easy%20task.%C3%82%C2%A0%20I%20first%20tried%20to%20use%20the%20office.dlls%2C%20and%20everything%20worked...%C3%82%C2%A0%20I%20then%20read%20a%20be" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint&amp;notes=Recently%20I%20was%20asked%20to%20write%20some%20code%20that%20would%20automate%20the%20conversion%20of%20word%20docs%20to%20pdf%20from%20a%20web%20upload.%C3%82%C2%A0%20At%20first%20I%20figured%20it%20would%20be%20an%20easy%20task.%C3%82%C2%A0%20I%20first%20tried%20to%20use%20the%20office.dlls%2C%20and%20everything%20worked...%C3%82%C2%A0%20I%20then%20read%20a%20be" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;submitHeadline=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint&amp;submitSummary=Recently%20I%20was%20asked%20to%20write%20some%20code%20that%20would%20automate%20the%20conversion%20of%20word%20docs%20to%20pdf%20from%20a%20web%20upload.%C3%82%C2%A0%20At%20first%20I%20figured%20it%20would%20be%20an%20easy%20task.%C3%82%C2%A0%20I%20first%20tried%20to%20use%20the%20office.dlls%2C%20and%20everything%20worked...%C3%82%C2%A0%20I%20then%20read%20a%20be&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;h=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;t=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F10%2Fautomating-word-docs-to-pdf-in-c%2F&amp;title=Automating%20Word%20docs%20to%20PDF%20in%20c%23%20for%20SharePoint&amp;annotation=Recently%20I%20was%20asked%20to%20write%20some%20code%20that%20would%20automate%20the%20conversion%20of%20word%20docs%20to%20pdf%20from%20a%20web%20upload.%C3%82%C2%A0%20At%20first%20I%20figured%20it%20would%20be%20an%20easy%20task.%C3%82%C2%A0%20I%20first%20tried%20to%20use%20the%20office.dlls%2C%20and%20everything%20worked...%C3%82%C2%A0%20I%20then%20read%20a%20be" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/03/19/problem-with-asposeword-systemaccessviolationexception/' rel='bookmark' title='Permanent Link: Problem with Aspose.word: System.AccessViolationException'>Problem with Aspose.word: System.AccessViolationException</a></li>
<li><a href='http://www.coderetard.com/2008/03/18/how-to-convert-txt-docs-to-pdf-in-aspose/' rel='bookmark' title='Permanent Link: How to Convert Txt Docs to PDF in Aspose c#'>How to Convert Txt Docs to PDF in Aspose c#</a></li>
<li><a href='http://www.coderetard.com/2009/02/11/sharepoint-template-error-the-template-you-have-chosen-is-invalid-or-cannot-be-found/' rel='bookmark' title='Permanent Link: SharePoint Template Error: The template you have chosen is invalid or cannot be found.'>SharePoint Template Error: The template you have chosen is invalid or cannot be found.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/03/10/automating-word-docs-to-pdf-in-c/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
