<?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>Agence de Développement Informatique du Nord &#187; zend pdf</title>
	<atom:link href="http://blog.adin.pro/tag/zend-pdf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Make a PDF into magento using zend_pdf</title>
		<link>http://blog.adin.pro/2014-09-29/make-a-pdf-into-magento-using-zend_pdf/</link>
		<comments>http://blog.adin.pro/2014-09-29/make-a-pdf-into-magento-using-zend_pdf/#comments</comments>
		<pubDate>Mon, 29 Sep 2014 14:24:16 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[zend pdf]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=411</guid>
		<description><![CDATA[<p>Here my code to generate a PDF file into Magento using the zend_pdf embeded library.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2014-09-29/make-a-pdf-into-magento-using-zend_pdf/">Make a PDF into magento using zend_pdf</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Here my code to generate a PDF file into Magento using the zend_pdf embeded library.</p>
<pre class="brush: php; title: ; notranslate">
//in my controller
public function prindPdfAction()
{
        $pdf = new Zend_Pdf();
        $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
        $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
        $page-&gt;setFont($font, 12);

        //add a logo
        $image = Mage::getBaseDir('media').'/logo_pdf.jpg';
        if (is_file($image)) {
            $image = Zend_Pdf_Image::imageWithPath($image);
            $x = 20;
            $y = 700;
            $page-&gt;drawImage($image, $x, $y, $x + 118, $y + 112);
        }

        //add text
        $page-&gt;setFont($font, 16);
        $titre = &quot;Ecole &quot;;
        $page-&gt;drawText($titre, 155, $page-&gt;getHeight()-85, &quot;UTF-8&quot;);

        //add pages to main document
        $pdf-&gt;pages[] = $page;

        //generate pdf
        $content =  $pdf-&gt;render();

        $fileName = 'details.pdf';
        //send it to the browser to download
        $this-&gt;_prepareDownloadResponse($fileName, $content);
}
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2014-09-29/make-a-pdf-into-magento-using-zend_pdf/">Make a PDF into magento using zend_pdf</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2014-09-29/make-a-pdf-into-magento-using-zend_pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
