<p>I have a pdf file of a logo, about 1"x2" in dimension.  Can anybody provide the code snippet to import that PDF logo into another PDF file using the <a href="http://framework.zend.com/manual/en/zend.pdf.html" rel="nofollow noreferrer">Zend_PDF</a> API's?  </p>

<p>Ideally, I'd like to be able to place it like the PNG, TIFF or JPG objects with the Zend_Pdf_Image object. </p>

<p>In other words, I want to be able to place the little 1x2" pdf document on top of a 8.5x11" page, not use the original pdf as a background.  </p>

<p>Thanks!</p>

[{'answer_id': 66011, 'author': 'nlucaroni', 'author_id': 157, 'author_profile': 'https://Stackoverflow.com/users/157', 'pm_score': 1, 'selected': False, 'text': '<p>I believe you can <a href="http://framework.zend.com/manual/en/zend.pdf.pages.html#zend.pdf.pages.cloning" rel="nofollow noreferrer">clone a page</a> --like a template. Not sure if this is enough for you, it does look like the preferred way to do things. Of course, if you have a pdf that you want to add a, say, watermark, to, uhh, this is clearly insufficient --but in this case a hi-res png would probably suffice.</p>\n'}, {'answer_id': 75021, 'author': 'user6824', 'author_id': 6824, 'author_profile': 'https://Stackoverflow.com/users/6824', 'pm_score': 2, 'selected': False, 'text': '<p>It looks like as of this date, there\'s no way to do it using the Zend_PDF API\'s.  The Zend_Pdf_Page class has a drawContentStream() which looked promising, but when I checked into it, the method body was empty.  Maybe a later release of the API will support it.  </p>\n\n<p>So, if you want place another PDF inside another dynamically generated PDF document like an image, use <a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/demos/simple-demo/" rel="nofollow noreferrer">FPDI + FPDF/TCPDF</a>.</p>\n\n<pre><code>$pdf = &amp; new FPDI (\'P\', \'in\', \'Letter\' );\n$pagecount = $pdf-&gt;setSourceFile ( APP . \'logo.pdf\' );\n$tplidx = $pdf-&gt;importPage ( 1, \'/MediaBox\' );\n\n$pdf-&gt;addPage ();\n$pdf-&gt;useTemplate ( $tplidx, 1, 1 );\n$pdf-&gt;Output ( \'output.pdf\', \'F\' );\n</code></pre>\n'}, {'answer_id': 198422, 'author': 'gnud', 'author_id': 27204, 'author_profile': 'https://Stackoverflow.com/users/27204', 'pm_score': 0, 'selected': False, 'text': "<p>Not what you asked for, but probably what you need (:</p>\n\n<p>Convert the smaller logo pdf to a TIFF/PNG/WhatEver (using, for example, imagemagick's <code>convert</code>, or the GIMP). Then, place this image with the normal Zend API.</p>\n\n<p>This conversion could also be done on the fly, using the Imagick php class, I would imagine.</p>\n"}]
['https://Stackoverflow.com/questions/64759', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6824/']