<?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>Custom Software Development Company, Rich Media Application Development, Business Application Development, Web Application Development &#187; Custom Formatted PDF creation</title>
	<atom:link href="http://www.blog.rightwaysolution.com/tag/custom-formatted-pdf-creation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.rightwaysolution.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 13:04:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Integrate HTML2PDF script into cakePHP as vendor application</title>
		<link>http://www.blog.rightwaysolution.com/integrate-html2pdf-script-into-cakephp-as-vendor-application/</link>
		<comments>http://www.blog.rightwaysolution.com/integrate-html2pdf-script-into-cakephp-as-vendor-application/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 08:34:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP PDF generation]]></category>
		<category><![CDATA[Custom Formatted PDF creation]]></category>
		<category><![CDATA[HTML to PDF Generation]]></category>
		<category><![CDATA[PHP PDF creation]]></category>
		<category><![CDATA[Web based HTML to PDF converter]]></category>

		<guid isPermaLink="false">http://www.blog.rightwaysolution.com/?p=175</guid>
		<description><![CDATA[Vendor function is amazing feature in cakePHP. You can use the vendors directory to keep third-party libraries in cakePHP. When you want to use any ready to use PHP classes or scripts which are not written as per cakePHP convention then you can use vendors directory to keep those scripts. The basic idea is that [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;">Vendor function is amazing feature in cakePHP. You can use the vendors directory to keep third-party libraries in cakePHP. When you want to use any ready to use PHP classes or scripts which are not written as per cakePHP convention then you can use <strong style="mso-bidi-font-weight: normal;">vendors</strong> directory to keep those scripts. The basic idea is that you can access classes you&#8217;ve placed in the vendors directory using Cake&#8217;s vendor() function. <span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">, </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;">In one of our project we were needed to create PDF file on the fly. Nowadays is it very common need in every project so this time we targeted to have perfect solution which can cater this common need of most of projects. We explored available options and we found a good script called HTML2PDF. This script is 100% FREE for commercial AND non-commercial use. HTML2PDF is a simple HTML to PDF / PostScript tool which can quickly and easily convert HTML pages into PDF and PostScript files. It renders URLs of (dynamic) (x)html pages including CSS to PDF and PostScript files on the fly.</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 12pt; line-height: 115%; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-bidi-font-size: 11.0pt;">Features covered </span></strong></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Generate PDF from HTML</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Customize your PDF by providing media, type etc.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">Automatically detect CSS information from the screen</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">You are able to give water mark to all the pages in the pdf.</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;">You can also set the PDF page size</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;">We found this is the best available solution for us. But this script is not written as per CakePHP convention and we wanted to integrate it into cakePHP framework. So we decided to take this script as vendor script into cakePHP. We wrote a wrapper class to use this script into cakePHP application and it worked perfectly. Now we just need to include this vendor script into the controller where we want to use this script and use this script feature through our written wrapper class.</p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;">Limitations </span></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;">Beside its good points there are some limitation with this script as well, below are which we encountered during integrating it into our projects.</p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l1 level1 lfo2;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span>It only works on HTML elements include images but does not work when page contains Flash elements or any other custom objects such as java applets, Active X controls etc&#8230;<span style="mso-spacerun: yes;">  </span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l1 level1 lfo2;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span>It support (included in default installation of the script) almost all fonts but still if any fond it not in its font directory than it will work but the formatting can be an issue. Although they provide alternative font setting so in case any font is not available than alternative font will be use to format the text.</p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; text-indent: -0.25in; mso-list: l1 level1 lfo2;"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: &quot;Times New Roman&quot;;">         </span></span></span>If your HTML page is big than it requires you to extend you memory limit otherwise it will give error.</p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">To know more about this HTML2PDF library <a href="http://html2pdf.seven49.net/Web/en/Home/Default.htm" target="_blank">click here</a> . </span><span style="font-size: small; font-family: Calibri;"> <br style="mso-special-character: line-break;" /></span><span style="font-size: small; font-family: Calibri;"><a href="http://www.rightwaysolution.com" target="_blank">Rightway </a>has handsome experience in developing this kind of functionality. So feel free to <a href="mailto:info@rightwaysolution.com">contact us</a> if you have this kind of requirement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.rightwaysolution.com/integrate-html2pdf-script-into-cakephp-as-vendor-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

