<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043703" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043703</link>
    <description></description>
    <language>en</language>
          <item>
    <title>I use fpdf and fpdi for</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/printable-page-html-form#comment-1240865</link>
    <description> &lt;p&gt;I use fpdf and &lt;a href=&quot;http://www.setasign.de/products/pdf-php-solutions/fpdi/&quot;&gt;fpdi&lt;/a&gt; for printing online certificates. They fill out a form on one page, and fpdf works its magic when they submit it.&lt;/p&gt;
&lt;p&gt;Here&#039;s what some of the code looks like, maybe it will help you:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;require_once(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;fpdi.php&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// initiate FPDI&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;amp; new &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;FPDI&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// add a page&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;AddPage&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// set the sourcefile&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;setSourceFile&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;/var/www/vhosts/mysite.com/cw/CE.pdf&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// import page 1&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tplIdx &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;importPage&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// use the imported page and place it at point 10,10 with a width of 100 mm&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;useTemplate&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tplIdx&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// now write some text above the imported page&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;SetFont&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;Arial&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;SetTextColor&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// $x and $y are offset values, if we add an extra line to a file, we can just adjust those&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;65 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;83.5 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;52 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;105 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$course_title&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;82 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;113.5 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$course_cert_number&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;55 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;122 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ethics_content&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;157 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;122 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$total_credit_hrs&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;74 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;146.5 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$purchase_date&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;154 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;146.5 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$completion_date&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;145 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;207 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$provider_date&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;62 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;241.5 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$WAOIC&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pdf&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Output&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;CE.pdf&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;D&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Apr 2009 16:30:00 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1240865 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Cheers. I&#039;ll have a gander</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/printable-page-html-form#comment-1240834</link>
    <description> &lt;p&gt;Cheers. I&#039;ll have a gander at them, as the textarea isn&#039;t ideal really due to it being able to scroll- printing will lose top or bottom.&lt;/p&gt;
 </description>
     <pubDate>Fri, 24 Apr 2009 22:40:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1240834 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>PDF is the way to go for</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/printable-page-html-form#comment-1240819</link>
    <description> &lt;p&gt;PDF is the way to go for making sure the print looks as intended.&lt;/p&gt;
&lt;p&gt;As for the margins, a rule of thumb I follow is anything within 3/4&quot; of edges cannot be anything you &quot;need&quot;. I have had an inject printer that actually had 3/4&quot; margin at the bottom of the page. &lt;/p&gt;
&lt;p&gt;Usually if they have &quot;shrink to fit printable area&quot; turned on, it is still pretty decent, and at least with a PDF, all proportional. You can also recommend to them that they shut off that feature.&lt;/p&gt;
&lt;p&gt;I have used two PDF generators, fpdf, and html2pdf which from the docs says it uses a modified copy of fpdf. Be prepared to take time to play around with each, to see what works and what doesn&#039;t. But if you do, you can achieve some great results! &lt;/p&gt;
&lt;p&gt;(Note on the html2pdf, if you google that, there is a PAID service that if i remember correctly comes up as first result, look for the result on sourceforge)&lt;/p&gt;
&lt;p&gt;A hint for just using fpdf: The application we needed it for was to print up certificates for completing online exams. The easiest thing to do was to make a PDF file of the complete certificate EXCEPT for what needs customized (in our case, the name, company, title, date). Then in FPDF you can tell it to start with an existing PDF (which had the graphics/logos/etc) already, and we used fpdf to only add in text. Saved a lot of time! For some reason though, when you do that, the pdf didn&#039;t come in proportional, so had to tweak the coords, but in the end was a great looking certificate.&lt;/p&gt;
&lt;p&gt;If you go the HTML2pdf route, be prepared to be more limited in your layout compared to just looking at it in a browser. Again, both require reading the docs and playing around  but the end result will be worth it!&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 24 Apr 2009 13:23:06 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1240819 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hmm, I&#039;ve since found</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/printable-page-html-form#comment-1240811</link>
    <description> &lt;p&gt;Hmm, I&#039;ve since found &lt;code&gt;page-break-after: always;&lt;/code&gt; but can&#039;t find any info about it being cross browser.&lt;/p&gt;
&lt;p&gt;I have never worked with PDF from PHP, how effective is the handling of individual pages? There is still user specific print margins to consider, although I guess they can sort them out themselves.&lt;/p&gt;
 </description>
     <pubDate>Fri, 24 Apr 2009 09:40:27 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1240811 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I would vote pdf.</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/printable-page-html-form#comment-1240807</link>
    <description> &lt;p&gt;I would vote pdf.&lt;/p&gt;
 </description>
     <pubDate>Fri, 24 Apr 2009 09:30:39 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1240807 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
