<?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: Concatenate PDF in PHP</title>
	<atom:link href="http://neo22s.com/concatenate-pdf-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://neo22s.com/concatenate-pdf-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=concatenate-pdf-in-php</link>
	<description>Web development, scripts, source code and IT stuff</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:49:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Using TCPDF and FPDI, merge PDF docs of Different Orientations &#171; Hours and Hours</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-5541</link>
		<dc:creator>Using TCPDF and FPDI, merge PDF docs of Different Orientations &#171; Hours and Hours</dc:creator>
		<pubDate>Mon, 19 Dec 2011 16:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-5541</guid>
		<description>[...] you to the commenter, lexey111, on http://neo22s.com/concatenate-pdf-in-php/ for this solution. Share this:TwitterFacebookLike this:LikeBe the first to like this post.   [...]</description>
		<content:encoded><![CDATA[<p>[...] you to the commenter, lexey111, on http://neo22s.com/concatenate-pdf-in-php/ for this solution. Share this:TwitterFacebookLike this:LikeBe the first to like this post.   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-5521</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Tue, 13 Dec 2011 22:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-5521</guid>
		<description>Nice work.
I am trying to use this, resolve some minor issues and copied the code as it is with test pdf files in the same location as other php files. However, I am getting the error - &quot;TCPDF ERROR : Cannot open xxxxx.pdf&quot;. I don&#039;t think this has to do with permision to read the pdf file, but then I am not sure why the problem is there. The code crashes while at this line:

$pagecount = $this-&gt;setSourceFile($file);

I also get the warning call_user_func_array(): First argument is expected to be a valid callback, &#039;concat_pdf::TCPDF::SetFont&#039;</description>
		<content:encoded><![CDATA[<p>Nice work.<br />
I am trying to use this, resolve some minor issues and copied the code as it is with test pdf files in the same location as other php files. However, I am getting the error &#8211; &#8220;TCPDF ERROR : Cannot open xxxxx.pdf&#8221;. I don&#8217;t think this has to do with permision to read the pdf file, but then I am not sure why the problem is there. The code crashes while at this line:</p>
<p>$pagecount = $this-&gt;setSourceFile($file);</p>
<p>I also get the warning call_user_func_array(): First argument is expected to be a valid callback, &#8216;concat_pdf::TCPDF::SetFont&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adrianbj</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4444</link>
		<dc:creator>adrianbj</dc:creator>
		<pubDate>Thu, 06 Oct 2011 17:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4444</guid>
		<description>Take a look at:
http://www.vankouteren.eu/blog/2009/07/fpdf-error-unable-to-find-xref-table/

Also maybe try to ensure that the PDF is v1.4 or less</description>
		<content:encoded><![CDATA[<p>Take a look at:<br />
<a href="http://www.vankouteren.eu/blog/2009/07/fpdf-error-unable-to-find-xref-table/" rel="nofollow">http://www.vankouteren.eu/blog/2009/07/fpdf-error-unable-to-find-xref-table/</a></p>
<p>Also maybe try to ensure that the PDF is v1.4 or less</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apy</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4443</link>
		<dc:creator>apy</dc:creator>
		<pubDate>Thu, 06 Oct 2011 17:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4443</guid>
		<description>Hi, I write from Italy sorry for my bad English.
I have an application written in PHP using FPDF libraries FPDI + to concatenate PDF files but for some files I get the error ‘FPDF error: Unable to find xref table’, I saw in the files of the two libraries and found the function called function error ($ msg) that contains the following statement “die (‘ FPDF error: ‘. $ msg);” that causes the error message: how can I change this statement so that my application in case of ‘FPDF error: Unable to find xref table’ go ahead without crashing? I am new to php … Thanks to all</description>
		<content:encoded><![CDATA[<p>Hi, I write from Italy sorry for my bad English.<br />
I have an application written in PHP using FPDF libraries FPDI + to concatenate PDF files but for some files I get the error ‘FPDF error: Unable to find xref table’, I saw in the files of the two libraries and found the function called function error ($ msg) that contains the following statement “die (‘ FPDF error: ‘. $ msg);” that causes the error message: how can I change this statement so that my application in case of ‘FPDF error: Unable to find xref table’ go ahead without crashing? I am new to php … Thanks to all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lexey111</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4251</link>
		<dc:creator>lexey111</dc:creator>
		<pubDate>Tue, 16 Aug 2011 18:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4251</guid>
		<description>Oops, sorry parser eat a code, I&#039;ll try PRE tag

I mean

&lt;pre&gt;
  if ($s[&#039;w&#039;] &lt; $s[&#039;h&#039;]){...
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Oops, sorry parser eat a code, I&#8217;ll try PRE tag</p>
<p>I mean</p>
<pre>
  if ($s['w'] &lt; $s[&#039;h&#039;]){...
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: lexey111</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4250</link>
		<dc:creator>lexey111</dc:creator>
		<pubDate>Tue, 16 Aug 2011 18:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4250</guid>
		<description>Nice solution, thnx a lot!
But a little correction needed:

use
&lt;code&gt;
if ($s[&#039;w&#039;]  AddPage(&#039;P&#039;, array($s[&#039;w&#039;], $s[&#039;h&#039;]));
} else {
   $this -&gt; AddPage(&#039;L&#039;, array($s[&#039;w&#039;], $s[&#039;h&#039;]));
}
&lt;/code&gt;

instead simple &#039;P&#039; if pages in files have a different orientation.</description>
		<content:encoded><![CDATA[<p>Nice solution, thnx a lot!<br />
But a little correction needed:</p>
<p>use<br />
<code><br />
if ($s['w']  AddPage('P', array($s['w'], $s['h']));<br />
} else {<br />
   $this -&gt; AddPage('L', array($s['w'], $s['h']));<br />
}<br />
</code></p>
<p>instead simple &#8216;P&#8217; if pages in files have a different orientation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bikash</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4196</link>
		<dc:creator>Bikash</dc:creator>
		<pubDate>Wed, 13 Jul 2011 09:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4196</guid>
		<description>Hello 
  First of all thanx for the code for the concatenation of multiple files and its working fine but as per my requirement instead of passing the pdf files how can I merge the content of pdf files that are stored in the database to a single pdf file ?

Is there a way to solve my above problem using your same code ?

Greetings</description>
		<content:encoded><![CDATA[<p>Hello<br />
  First of all thanx for the code for the concatenation of multiple files and its working fine but as per my requirement instead of passing the pdf files how can I merge the content of pdf files that are stored in the database to a single pdf file ?</p>
<p>Is there a way to solve my above problem using your same code ?</p>
<p>Greetings</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chema</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4136</link>
		<dc:creator>Chema</dc:creator>
		<pubDate>Mon, 06 Jun 2011 09:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4136</guid>
		<description>hello,

that&#039;s because that PDF uses a password as far as I know.

regards</description>
		<content:encoded><![CDATA[<p>hello,</p>
<p>that&#8217;s because that PDF uses a password as far as I know.</p>
<p>regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liior</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4135</link>
		<dc:creator>Liior</dc:creator>
		<pubDate>Mon, 06 Jun 2011 09:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4135</guid>
		<description>Hello everybody, the script looks great, but I have a problem which is not documented here :

This is what the script says when I try to concat :
TCPDF ERROR: File is encrypted!

Do you have an idea of what do I have to do ?

Greetings</description>
		<content:encoded><![CDATA[<p>Hello everybody, the script looks great, but I have a problem which is not documented here :</p>
<p>This is what the script says when I try to concat :<br />
TCPDF ERROR: File is encrypted!</p>
<p>Do you have an idea of what do I have to do ?</p>
<p>Greetings</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NZoli</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4034</link>
		<dc:creator>NZoli</dc:creator>
		<pubDate>Wed, 27 Apr 2011 06:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4034</guid>
		<description>@David M
I solved the TCPDF ERROR thing in a simple way :) I had to switch to JAVA instead of PHP and use an API called iText or something like that. If you got a lot of time AND skill you could do the following in PHP: research the PDF file format and create the xref table by yourself(as I understand it&#039;s a matrix of pointer offsets which tell the reader from where to take the info. PDF is a kind of RAR internally, very confusing)</description>
		<content:encoded><![CDATA[<p>@David M<br />
I solved the TCPDF ERROR thing in a simple way :) I had to switch to JAVA instead of PHP and use an API called iText or something like that. If you got a lot of time AND skill you could do the following in PHP: research the PDF file format and create the xref table by yourself(as I understand it&#8217;s a matrix of pointer offsets which tell the reader from where to take the info. PDF is a kind of RAR internally, very confusing)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David M.</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-4033</link>
		<dc:creator>David M.</dc:creator>
		<pubDate>Wed, 27 Apr 2011 03:35:37 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-4033</guid>
		<description>I have the same experience with NZoli. I also get TCPDF ERROR. Why is it showing? Do you have now a solution?

David M.
Blog Writer
&lt;a href=&quot;http://www.deskchairmat.net/&quot; rel=&quot;nofollow&quot;&gt;deskchairmat.net&lt;/a&gt; .</description>
		<content:encoded><![CDATA[<p>I have the same experience with NZoli. I also get TCPDF ERROR. Why is it showing? Do you have now a solution?</p>
<p>David M.<br />
Blog Writer<br />
<a href="http://www.deskchairmat.net/" rel="nofollow">deskchairmat.net</a> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NZoli</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3929</link>
		<dc:creator>NZoli</dc:creator>
		<pubDate>Wed, 09 Mar 2011 12:30:03 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3929</guid>
		<description>Hello. I am using your script exactly as it is here. Your code works fine with &quot;perfect&quot; PDF-s(like those created with tcpdf library) but when trying to concatenate pdf-s from different sources(like scanned invoices) I get TCPDF ERROR: Unable to find pointer to xref table .Have you met this error?</description>
		<content:encoded><![CDATA[<p>Hello. I am using your script exactly as it is here. Your code works fine with &#8220;perfect&#8221; PDF-s(like those created with tcpdf library) but when trying to concatenate pdf-s from different sources(like scanned invoices) I get TCPDF ERROR: Unable to find pointer to xref table .Have you met this error?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chema</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3784</link>
		<dc:creator>Chema</dc:creator>
		<pubDate>Sat, 05 Feb 2011 08:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3784</guid>
		<description>Hello you can change that in the class $this-&gt;AddPage(’P&#039;, array($s[&#039;w&#039;], $s[&#039;h&#039;]));

Instead of P=portrait put L= landspcape ;)</description>
		<content:encoded><![CDATA[<p>Hello you can change that in the class $this-&gt;AddPage(’P&#8217;, array($s['w'], $s['h']));</p>
<p>Instead of P=portrait put L= landspcape ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3781</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Fri, 04 Feb 2011 14:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3781</guid>
		<description>Hi, i&#039;m italian, i&#039;m sorry for my english.
First thank&#039;s for the code, but i have a question.
I&#039;m using this system to concatenate different pdf. The problem is the layout.
I have a pdf in Landscape layout and the system create a normal pdf (concatenate) so part of my file is invisible.
Is there a way to solve my problem?

Thank&#039;s so much</description>
		<content:encoded><![CDATA[<p>Hi, i&#8217;m italian, i&#8217;m sorry for my english.<br />
First thank&#8217;s for the code, but i have a question.<br />
I&#8217;m using this system to concatenate different pdf. The problem is the layout.<br />
I have a pdf in Landscape layout and the system create a normal pdf (concatenate) so part of my file is invisible.<br />
Is there a way to solve my problem?</p>
<p>Thank&#8217;s so much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kei</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3694</link>
		<dc:creator>kei</dc:creator>
		<pubDate>Tue, 25 Jan 2011 08:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3694</guid>
		<description>first, thank you very much for your response!!!!!
Yes, i was thinking about that, but i do not know how exactly to make this, the problem is that i am a bit new to the php programming...
Can you give me some tips on how to do this store-erase thing....
Thanks a lot!!!!!!</description>
		<content:encoded><![CDATA[<p>first, thank you very much for your response!!!!!<br />
Yes, i was thinking about that, but i do not know how exactly to make this, the problem is that i am a bit new to the php programming&#8230;<br />
Can you give me some tips on how to do this store-erase thing&#8230;.<br />
Thanks a lot!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chema</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3683</link>
		<dc:creator>chema</dc:creator>
		<pubDate>Mon, 24 Jan 2011 15:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3683</guid>
		<description>just store it, do the concatenation and then erase it ;)</description>
		<content:encoded><![CDATA[<p>just store it, do the concatenation and then erase it ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kei</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3682</link>
		<dc:creator>kei</dc:creator>
		<pubDate>Mon, 24 Jan 2011 14:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3682</guid>
		<description>Hej!

I have a problem implementing this function for concatenation. The problem is that first i am generating a pdf on the fly with data from a html form. And then, after the pdf has been generated, i am trying to add another pdf, which is already created. The problem is, that i do not know how to call the generated on the fly pdf, as it is not stored anywhere... 
I hope somebody can help me with this issue...
Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hej!</p>
<p>I have a problem implementing this function for concatenation. The problem is that first i am generating a pdf on the fly with data from a html form. And then, after the pdf has been generated, i am trying to add another pdf, which is already created. The problem is, that i do not know how to call the generated on the fly pdf, as it is not stored anywhere&#8230;<br />
I hope somebody can help me with this issue&#8230;<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joris</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-3656</link>
		<dc:creator>Joris</dc:creator>
		<pubDate>Fri, 21 Jan 2011 10:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-3656</guid>
		<description>Thanks for the &quot;remove horizontal line&quot; tip. Works like a charm, and very fast.</description>
		<content:encoded><![CDATA[<p>Thanks for the &#8220;remove horizontal line&#8221; tip. Works like a charm, and very fast.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Homer</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2620</link>
		<dc:creator>Homer</dc:creator>
		<pubDate>Tue, 16 Nov 2010 07:14:46 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2620</guid>
		<description>Hello,

this works just fine for small files. Is there any possibility to fix the memory-problem merging many files to one large one? 
--&gt; Fatal error: Allowed memory size of 33554432 bytes exhausted
I cannot adjust the memory_limit on the server. There should be a possibility to merge the file not completely in memory.

I tried the memory optimation add-on ( http://www.fpdf.de/downloads/addons/76/ ) but I think it cannot be used for concat_pdf. If anyone knows better - just let me know.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>this works just fine for small files. Is there any possibility to fix the memory-problem merging many files to one large one?<br />
&#8211;&gt; Fatal error: Allowed memory size of 33554432 bytes exhausted<br />
I cannot adjust the memory_limit on the server. There should be a possibility to merge the file not completely in memory.</p>
<p>I tried the memory optimation add-on ( <a href="http://www.fpdf.de/downloads/addons/76/" rel="nofollow">http://www.fpdf.de/downloads/addons/76/</a> ) but I think it cannot be used for concat_pdf. If anyone knows better &#8211; just let me know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Dagey</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2244</link>
		<dc:creator>Ryan Dagey</dc:creator>
		<pubDate>Sun, 22 Aug 2010 17:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2244</guid>
		<description>No, the PDFs are located in the same directory as the testing structure I setup, so the array is just array(&quot;1.pdf&quot;, &quot;1.pdf&quot;).  I can try full path to see if it makes a difference, and there are no errors on from the script itself, I&#039;m not sure if PHP logs anywhere via syslog.</description>
		<content:encoded><![CDATA[<p>No, the PDFs are located in the same directory as the testing structure I setup, so the array is just array(&#8220;1.pdf&#8221;, &#8220;1.pdf&#8221;).  I can try full path to see if it makes a difference, and there are no errors on from the script itself, I&#8217;m not sure if PHP logs anywhere via syslog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Dagey</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2243</link>
		<dc:creator>Ryan Dagey</dc:creator>
		<pubDate>Sun, 22 Aug 2010 17:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2243</guid>
		<description>Thanks for the assistance, yes FPDF_TPL is on the server here: http://ryan.neoterichovercraft.com/pdf/fpdi/fpdf_tpl.php (my basic understanding is that tcpdf.php is included first, within my PHP, providing the TCPDF class, followed by fpdi.php which includes fpdf_tpl.php providing FPDF_TPL as an extension of FPDF that itself is defined as an extension of TCPDF via the file fpdi2tcpdf_bridge.php).  Originally, I had not downloaded fpdf_tpl.php and the system generated an error.

I downloaded FPDF_TPL along with FPDI and inserted fpdf_tpl.php into the fpdi/ directory.  I think that&#039;s the right location?  As a workaround, I did try to use FPDF directly based on a comment above (not using the bridge), but the result kept giving me an error the &quot;D&quot;/&quot;I&quot;/&quot;F&quot; was not a valid output parameter.

The PDFs would be newer PDFs generated by BullZip (1.5 I believe), so I used BullZip and converted the PDFs (originally Word documents) to 1.4 and then to 1.3, neither of those options seemed to make a difference, the final output was still blank.</description>
		<content:encoded><![CDATA[<p>Thanks for the assistance, yes FPDF_TPL is on the server here: <a href="http://ryan.neoterichovercraft.com/pdf/fpdi/fpdf_tpl.php" rel="nofollow">http://ryan.neoterichovercraft.com/pdf/fpdi/fpdf_tpl.php</a> (my basic understanding is that tcpdf.php is included first, within my PHP, providing the TCPDF class, followed by fpdi.php which includes fpdf_tpl.php providing FPDF_TPL as an extension of FPDF that itself is defined as an extension of TCPDF via the file fpdi2tcpdf_bridge.php).  Originally, I had not downloaded fpdf_tpl.php and the system generated an error.</p>
<p>I downloaded FPDF_TPL along with FPDI and inserted fpdf_tpl.php into the fpdi/ directory.  I think that&#8217;s the right location?  As a workaround, I did try to use FPDF directly based on a comment above (not using the bridge), but the result kept giving me an error the &#8220;D&#8221;/&#8221;I&#8221;/&#8221;F&#8221; was not a valid output parameter.</p>
<p>The PDFs would be newer PDFs generated by BullZip (1.5 I believe), so I used BullZip and converted the PDFs (originally Word documents) to 1.4 and then to 1.3, neither of those options seemed to make a difference, the final output was still blank.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adrianbj</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2241</link>
		<dc:creator>adrianbj</dc:creator>
		<pubDate>Sun, 22 Aug 2010 16:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2241</guid>
		<description>Something else to look at - are you pointing to the full server path of the PDFs (ie /var/www/pdfs/1.pdf etc)?

Also, is PHP logging any errors?</description>
		<content:encoded><![CDATA[<p>Something else to look at &#8211; are you pointing to the full server path of the PDFs (ie /var/www/pdfs/1.pdf etc)?</p>
<p>Also, is PHP logging any errors?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adrianbj</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2240</link>
		<dc:creator>adrianbj</dc:creator>
		<pubDate>Sun, 22 Aug 2010 16:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2240</guid>
		<description>Ryan,

A couple of thoughts:

Do you have FPDF_TPL on your server?

The basic free version of FPDI only supports PDF format up to 1.4 (v5): http://www.setasign.de/products/pdf-php-solutions/fpdi/downloads/ You can pay for a version that support more recent PDF file formats, or just make sure to save all the PDFs in this older version.</description>
		<content:encoded><![CDATA[<p>Ryan,</p>
<p>A couple of thoughts:</p>
<p>Do you have FPDF_TPL on your server?</p>
<p>The basic free version of FPDI only supports PDF format up to 1.4 (v5): <a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/downloads/" rel="nofollow">http://www.setasign.de/products/pdf-php-solutions/fpdi/downloads/</a> You can pay for a version that support more recent PDF file formats, or just make sure to save all the PDFs in this older version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Dagey</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2237</link>
		<dc:creator>Ryan Dagey</dc:creator>
		<pubDate>Sat, 21 Aug 2010 16:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2237</guid>
		<description>Thanks for the suggestion adrianbj, that is returning the right number of pages (each PDF we want to concatenate is 1 page).  The PDF that appears for either download or on the server has the right number of pages (one per file), it&#039;s just that each page is completely blank.  I setup a test environment to try to work on this located here: http://ryan.neoterichovercraft.com/pdf/ (the execution file is pdf.php)

I changed it to just try to concatenate the same file twice to see if that would help, but no go, here&#039;s the PHP that I&#039;m using:
files = $files;
 }

 function concat() {
  foreach($this-&gt;files AS $file) {
   $pagecount = $this-&gt;setSourceFile($file);
   for ($i = 1; $i ImportPage($i);
    $s = $this-&gt;getTemplatesize($tplidx);
    $this-&gt;AddPage(&#039;P&#039;, array($s[&#039;w&#039;], $s[&#039;h&#039;]));
    $this-&gt;useTemplate($tplidx);
   }
  }
 }
}

$pdf =&amp; new concat_pdf();
$pdf-&gt;setFiles(array(&#039;1.pdf&#039;, &#039;1.pdf&#039;));
//$pdf-&gt;setFiles(array(&#039;1.pdf&#039;, &#039;2.pdf&#039;, &#039;3.pdf&#039;));
$pdf-&gt;concat();
$pdf-&gt;Output(&quot;output.pdf&quot;, &quot;I&quot;);
?&gt;

I&#039;m sure I&#039;m missing obvious, but it&#039;s eluding me.</description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion adrianbj, that is returning the right number of pages (each PDF we want to concatenate is 1 page).  The PDF that appears for either download or on the server has the right number of pages (one per file), it&#8217;s just that each page is completely blank.  I setup a test environment to try to work on this located here: <a href="http://ryan.neoterichovercraft.com/pdf/" rel="nofollow">http://ryan.neoterichovercraft.com/pdf/</a> (the execution file is pdf.php)</p>
<p>I changed it to just try to concatenate the same file twice to see if that would help, but no go, here&#8217;s the PHP that I&#8217;m using:<br />
files = $files;<br />
 }</p>
<p> function concat() {<br />
  foreach($this-&gt;files AS $file) {<br />
   $pagecount = $this-&gt;setSourceFile($file);<br />
   for ($i = 1; $i ImportPage($i);<br />
    $s = $this-&gt;getTemplatesize($tplidx);<br />
    $this-&gt;AddPage(&#8216;P&#8217;, array($s['w'], $s['h']));<br />
    $this-&gt;useTemplate($tplidx);<br />
   }<br />
  }<br />
 }<br />
}</p>
<p>$pdf =&amp; new concat_pdf();<br />
$pdf-&gt;setFiles(array(&#8217;1.pdf&#8217;, &#8217;1.pdf&#8217;));<br />
//$pdf-&gt;setFiles(array(&#8217;1.pdf&#8217;, &#8217;2.pdf&#8217;, &#8217;3.pdf&#8217;));<br />
$pdf-&gt;concat();<br />
$pdf-&gt;Output(&#8220;output.pdf&#8221;, &#8220;I&#8221;);<br />
?&gt;</p>
<p>I&#8217;m sure I&#8217;m missing obvious, but it&#8217;s eluding me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adrianbj</title>
		<link>http://neo22s.com/concatenate-pdf-in-php/comment-page-1/#comment-2236</link>
		<dc:creator>adrianbj</dc:creator>
		<pubDate>Sat, 21 Aug 2010 14:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://neo22s.com/?p=255#comment-2236</guid>
		<description>$pagecount = $pdf-&gt;setSourceFile($filepath);

will return the number of pages in a document and will confirm that FPDI is working.

HTH</description>
		<content:encoded><![CDATA[<p>$pagecount = $pdf-&gt;setSourceFile($filepath);</p>
<p>will return the number of pages in a document and will confirm that FPDI is working.</p>
<p>HTH</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: neo22s.com @ 2012-02-12 12:07:38 by W3 Total Cache -->
