Post2PDF

dutch english

Another piece of code I found: Post2PDF. It does exactly what it says: it prints the current post to a PDF file, downloadable by clicking an icon. I modded the code a little to add a date to the footer and the URL of the post:

$footer = str_replace("__PAGE_NUMBER__", parent::PageNo(), preg_replace('/(__\w+__)/e', '($1)', get_option("sw_pdf_footer")));

became

$footer = "http://www.beulbek.nl".$_SERVER['REQUEST_URI']." @ ". date('d-m-Y, H:i')." - ".str_replace("__PAGE_NUMBER__", parent::PageNo(), preg_replace('/(__\w+__)/e', '($1)', get_option("sw_pdf_footer")));

Add to your favorites:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon

This entry was posted on Friday, March 23rd, 2007 at 23:09 and is filed under Blog. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Post2PDF”

blips April 8th, 2007 at 20:24

To bad it does not contain comments and it fails if there is a gif file in the post.

groetjes Blips.

Leave a Reply