<?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>ramraje.com &#187; iText</title>
	<atom:link href="http://www.ramraje.com/ramraj/java-frameworks/itext/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ramraje.com</link>
	<description>Software Programming Blog</description>
	<lastBuildDate>Mon, 19 Dec 2011 08:56:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>iText PDF Generator</title>
		<link>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/</link>
		<comments>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 13:51:00 +0000</pubDate>
		<dc:creator>Ramraj Edagutti</dc:creator>
				<category><![CDATA[iText]]></category>
		<category><![CDATA[Adobe PDF]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PDF Generation]]></category>

		<guid isPermaLink="false">http://www.ramraje.com/2008/09/itext-pdf-generator/</guid>
		<description><![CDATA[Here I am going to explain how to creat a simple pdf file with java pdf library called iText. There are other well known similar frameworks like Apache cocoon, and PDFBox which are good and mature. But I choose to use iText, because of its popularity and support, and infact it is very good for [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/' addthis:title='iText PDF Generator '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Here I am going to explain how to creat a simple pdf file with java pdf library called iText. There are other well known similar frameworks like Apache cocoon, and PDFBox which are good and mature. But I choose to use iText, because of its popularity and support, and infact it is very good for pdf generation from scratch.<span id="more-54"></span></p>
<p>iText generates pdf dynamically, ideally this framework is very useful for developer who wants to enhance thier web application developement with dyanamic pdf generation based on user inputs on the fly.</p>
<p>Using iText, you can able to generate, maniulate and parse the pdf file. And, please remember, this is not an end user tool to view pdf files. To view the generated pdf files you should have installed Acrobat PDF software from <a title="Adode systems" href="http://www.adobe.com" target="_blank">Adobe Systems</a>.</p>
<p>Enough said, we will get into the code and make our hands diryt, okay.<br />
Download latest iText jar file <a href="http://prdownloads.sourceforge.net/itext/iText-2.1.3.jar">Click here</a> , and put it in your project&#8217;s classpath.<br />
First thing, you need is to create document object</p>
<blockquote><p>com.lowagie.text.Document document = new com.lowagie.text.Document();</p></blockquote>
<p>Second, create PDFWriter object by passing document, and give pdf file name that you want to create</p>
<blockquote><p>com.lowagie.text.pdf.PdfWriter.PdfWriter.getInstance(document, new<br />
FileOutputStream(&#8220;HelloWorld.pdf&#8221;));</p></blockquote>
<p>Third, open the document to start writing onto it</p>
<blockquote><p>document.open();</p></blockquote>
<p>Fourth, add a paragraph to your document</p>
<blockquote><p>document.add(new Paragraph(&#8220;Hello Ramraj&#8230;.&#8221;));</p></blockquote>
<p>Finally, you need to close the document</p>
<blockquote><p>document.close();</p></blockquote>
<blockquote style="text-align: left;"><p>That&#8217;s it, It&#8217;s that simple to create pdf using iText.</p></blockquote>
<p>Probably some time later I will attach the full source code here:-)</p>
<p>Enough staying at office, I gotta go home, bye</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/' addthis:title='iText PDF Generator '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.ramraje.com/java-frameworks/itext/itext-pdf-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

