<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" > <channel><title>Comments on: iText tutorial: Merge &amp; Split PDF files using iText JAR</title> <atom:link href="http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/feed" rel="self" type="application/rss+xml" /><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html</link> <description>Tutorials, Java, J2EE, Struts, AJAX, JavaScript, CSS, Web 2.0, MySQL, Articles</description> <lastBuildDate>Wed, 08 Feb 2012 10:36:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: to split</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-25726</link> <dc:creator>to split</dc:creator> <pubDate>Mon, 30 Jan 2012 11:58:04 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-25726</guid> <description>thank you for the great tutorial and comments. They help me a lot, to write my own split function</description> <content:encoded><![CDATA[<p>thank you for the great tutorial and comments. They help me a lot, to write my own split function</p> ]]></content:encoded> </item> <item><title>By: Dennis Lindeman</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-18362</link> <dc:creator>Dennis Lindeman</dc:creator> <pubDate>Fri, 02 Dec 2011 19:31:47 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-18362</guid> <description>I tried the concatPDFs code. It concatenates two files OK. But, it does not copy the signatures that were in the files. It also does not copy text data fields.</description> <content:encoded><![CDATA[<p>I tried the concatPDFs code. It concatenates two files OK. But, it does not copy the signatures that were in the files. It also does not copy text data fields.</p> ]]></content:encoded> </item> <item><title>By: mani</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-15868</link> <dc:creator>mani</dc:creator> <pubDate>Fri, 02 Sep 2011 11:15:53 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-15868</guid> <description>very useful code for all guys who r in initial stage thank u very much</description> <content:encoded><![CDATA[<p>very useful code for all guys who r in initial stage thank u very much</p> ]]></content:encoded> </item> <item><title>By: Searock</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-15456</link> <dc:creator>Searock</dc:creator> <pubDate>Sat, 23 Jul 2011 05:12:00 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-15456</guid> <description>You could reduce the number of lines by using PdfStamper class.PdfReader pdfReader = new PdfReader(fileDialog.FileName); FileOutputStream fout = new FileOutputStream(&quot;C:\\output1.pdf&quot;); PdfStamper splitter = new PdfStamper(pdfReader, fout); pdfReader.SelectPages(&quot;1 - 10&quot;); splitter.Close(); pdfReader.Close();</description> <content:encoded><![CDATA[<p>You could reduce the number of lines by using PdfStamper class.</p><p>PdfReader pdfReader = new PdfReader(fileDialog.FileName);<br /> FileOutputStream fout = new FileOutputStream(&#8220;C:\\output1.pdf&#8221;);<br /> PdfStamper splitter = new PdfStamper(pdfReader, fout);<br /> pdfReader.SelectPages(&#8220;1 &#8211; 10&#8243;);<br /> splitter.Close();<br /> pdfReader.Close();</p> ]]></content:encoded> </item> <item><title>By: fryguy</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14616</link> <dc:creator>fryguy</dc:creator> <pubDate>Thu, 28 Apr 2011 19:36:31 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14616</guid> <description>Does anybody have any examples for splitting a PDF at bookmarks that exist at a level 2?  The code provided by Goblin_Queen works great for level 1 bookmarks, but I&#039;m not quite sure how to expand that to level 2 bookmarks as the resulting hashmap for the &quot;Kids&quot; do not contain page information.HashMap bm = bookmarks.get(i); List kids = (List) bm.get(&quot;Kids&quot;);The kids hashmap does not have the &quot;Page&quot; defined.</description> <content:encoded><![CDATA[<p>Does anybody have any examples for splitting a PDF at bookmarks that exist at a level 2?  The code provided by Goblin_Queen works great for level 1 bookmarks, but I&#8217;m not quite sure how to expand that to level 2 bookmarks as the resulting hashmap for the &#8220;Kids&#8221; do not contain page information.</p><p> HashMap bm = bookmarks.get(i);<br /> List kids = (List) bm.get(&#8220;Kids&#8221;);</p><p>The kids hashmap does not have the &#8220;Page&#8221; defined.</p> ]]></content:encoded> </item> <item><title>By: teakey</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14554</link> <dc:creator>teakey</dc:creator> <pubDate>Wed, 13 Apr 2011 09:23:39 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14554</guid> <description>hi,thanks for your coding ,but I still have a problem to merge files that carry different sizes! how could i solve it? some page is large while other is small.I am tired with it.help!</description> <content:encoded><![CDATA[<p>hi,thanks for your coding ,but I still have a problem to merge files that carry different sizes!<br /> how could i solve it? some page is large while other is small.I am tired with it.help!</p> ]]></content:encoded> </item> <item><title>By: uday</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14465</link> <dc:creator>uday</dc:creator> <pubDate>Thu, 31 Mar 2011 08:40:00 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14465</guid> <description>Very good code for merging &amp; splitting.... good work itext............exactly suits my requirement.</description> <content:encoded><![CDATA[<p>Very good code for merging &amp; splitting&#8230;.<br /> good work itext&#8230;&#8230;&#8230;&#8230;exactly suits my requirement.</p> ]]></content:encoded> </item> <item><title>By: natalie Afota</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14432</link> <dc:creator>natalie Afota</dc:creator> <pubDate>Mon, 28 Mar 2011 05:53:35 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14432</guid> <description>HeyI have used your code for merging few pdf files but I still have a problem to merge files that carry different sizes! I have try to had a command to set the page sizedocument.newPage(); pageOfCurrentReaderPDF++; currentPageNumber++; document.setPageSize(pdfReader.getPageSize(pageOfCurrentReaderPDF));Thanks, for the helpful code!Natalie</description> <content:encoded><![CDATA[<p>Hey</p><p>I have used your code for merging few pdf files but I still have a problem to merge files that carry different sizes!<br /> I have try to had a command to set the page size</p><p>document.newPage();<br /> pageOfCurrentReaderPDF++;<br /> currentPageNumber++;<br /> document.setPageSize(pdfReader.getPageSize(pageOfCurrentReaderPDF));</p><p>Thanks, for the helpful code!</p><p>Natalie</p> ]]></content:encoded> </item> <item><title>By: Luke Pacholski</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14267</link> <dc:creator>Luke Pacholski</dc:creator> <pubDate>Fri, 04 Mar 2011 21:01:25 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14267</guid> <description>Dimitri asked:&quot;Viral : If you already found the script for splitting pdfs by page size, it would be VERY handy&quot;I found the answer here:http://java-x.blogspot.com/2006/11/merge-pdf-files-with-itext.html#comment-3167256311373072651document.setPageSize(pdfReader.getPageSizeWithRotation(pageOfCurrentReaderPDF)); document.newPage();I.e., immediately before creating a new page, set the page size to the page size (and orientation) of the page you are reading in. The only issue to be aware of is the PDF has to be (I believe) version 1.5 or higher. You&#039;ll get errors trying to open PDFs saved as 1.4.pdfWriter.setPdfVersion(PdfWriter.PDF_VERSION_1_5);</description> <content:encoded><![CDATA[<p>Dimitri asked:</p><p>&#8220;Viral : If you already found the script for splitting pdfs by page size, it would be VERY handy&#8221;</p><p>I found the answer here:</p><p><a href="http://java-x.blogspot.com/2006/11/merge-pdf-files-with-itext.html#comment-3167256311373072651" rel="nofollow">http://java-x.blogspot.com/2006/11/merge-pdf-files-with-itext.html#comment-3167256311373072651</a></p><p>document.setPageSize(pdfReader.getPageSizeWithRotation(pageOfCurrentReaderPDF));<br /> document.newPage();</p><p>I.e., immediately before creating a new page, set the page size to the page size (and orientation) of the page you are reading in. The only issue to be aware of is the PDF has to be (I believe) version 1.5 or higher. You&#8217;ll get errors trying to open PDFs saved as 1.4.</p><p>pdfWriter.setPdfVersion(PdfWriter.PDF_VERSION_1_5);</p> ]]></content:encoded> </item> <item><title>By: Shivakumar</title><link>http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html/comment-page-1#comment-14102</link> <dc:creator>Shivakumar</dc:creator> <pubDate>Tue, 22 Feb 2011 03:20:48 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1406#comment-14102</guid> <description>Hi Viral , I got the following errors:Exception in thread &quot;main&quot; java.lang.OutOfMemoryError: Java heap space at java.io.ByteArrayOutputStream.write(Unknown Source) at com.itextpdf.text.pdf.RandomAccessFileOrArray.InputStreamToArray(Rand omAccessFileOrArray.java:182) at com.itextpdf.text.pdf.RandomAccessFileOrArray.(RandomAccessFile OrArray.java:172) at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:237) at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:248) at MergePDF.splitPDF(split.java:38) at ShivaPdf.main(split.java:87)How to resolve them.</description> <content:encoded><![CDATA[<p>Hi Viral , I got the following errors:</p><p>Exception in thread &#8220;main&#8221; java.lang.OutOfMemoryError: Java heap space<br /> at java.io.ByteArrayOutputStream.write(Unknown Source)<br /> at com.itextpdf.text.pdf.RandomAccessFileOrArray.InputStreamToArray(Rand<br /> omAccessFileOrArray.java:182)<br /> at com.itextpdf.text.pdf.RandomAccessFileOrArray.(RandomAccessFile<br /> OrArray.java:172)<br /> at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:237)<br /> at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:248)<br /> at MergePDF.splitPDF(split.java:38)<br /> at ShivaPdf.main(split.java:87)</p><p>How to resolve them.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: viralpatel.net @ 2012-02-09 10:28:44 -->
