An interface for WP2PDF

UPDATE: I am no longer maintaining this hack.  I haven’t touched it in 2 years, and don’t intend to.  My apologies to those who come here looking for help, but I just don’t have the time to work on all the plugins and hacks that I have released over the years.  If someone else would like to take over development be my guest.

I really have begun to dig WP2PDF by theWalrus over at the www.thewalrus.info/.

Apart from a couple of small gripes from yours truly, I have found this software to be excellent and way more fun than allowed by law.  The only problem I could see was to really use it to its fullest you (the site author/admin) had to do alot of work, manually adding links here and there.

So I decided to throw together the following plugin, that currently gives your site visitors an easy to use interface to WP2PDF, allowing them and you to get more out of this great little piece of hackage.  Currently the interface is limited to creating a PDF by year, and creating one by month.  In the next version I plan to include by author and possibly by category, and probably someway to combine them, so if you want to have a PDF of all the posts that author a made in month b, under category ( c ) you could easily do that.

This plugin is pretty straightforward, all you need to do is edit the $wp2pdfpath="/pdfstuff/wp2pdf";bit and away you go.  Please note, I have my server set up to run without file extensions, so your $wp2pdfpath would be more like this:$wp2pdfpath="/pdfstuff/wp2pdf.php";Later.

  1. personal avatar DeWaun
    Stroll on over and visit DeWaun
    March 1, 2007

    I have installed this plugin and edited the path to:

    $wp2pdfpath=”/wp-content/plugins/wp2pdf.php”;

    (which is correct) and have activated the wp2pdf.php file in the plug-ins panel…but nothing happens. That’s it.

    What am I missing??

  2. personal avatar Amit Gupta
    Stroll on over and visit Amit Gupta
    March 1, 2007

    Don’t you have any docs for this? I activated the plugin after changing the path but then what? I thought that this would give a link on the post page to convert a post to PDF. But can’t figure out what does it do?
    Can you please explain a bit?

    Thanks

  3. personal avatar Chris J. Davis
    Stroll on over and visit Chris J. Davis
    March 1, 2007

    No there are no docs, when I wrote this, the majority of users who employed hacks and plugins were gnarly enough to use it with out hand holding.

    You have to add the function to your template. So you would place:

    <?php convert_dialog() ?>

    Where ever in your template that you would like to have the dialog appear. One other thing, I don’t know how you came to the conclusion that this plugin would insert the “convert to PDF” links next to each post, but that is not what this does. This plugin adds a form to allow your visitors to convert entire months/years to PDF.

    Hope that helps.

  4. personal avatar nibl
    Stroll on over and visit nibl
    March 1, 2007

    It would be great if you could create a PDF of the current post. From a pure blog point of view this may not sound interesting, but many folks, like me, use WP for publishing reviews and articles. Then it would make sense for visitors to just grab the current post in PDF if they like the article, don’t you think?

  5. personal avatar Chris J. Davis
    Stroll on over and visit Chris J. Davis
    March 1, 2007

    Hey nibl,

    It would be great if you could create a PDF of the current post.

    That is exactly what wp2pdf does on its own, you set it up and provide a link that creates a PDf of just the current article.

    I had created the interface for people who wanted a finer grain control offered to their visitors.

  6. personal avatar Chris
    Stroll on over and visit Chris
    March 1, 2007

    I would really like to get a copy of your WP2PDF plugin. The link to the source appears to be broken. Would you mind fixing the link or emailing me a copy of the source? Don’t worry, I won’t need to pester you with support requests. ;) Thanks for your work on this great plugin.

  7. personal avatar Frederic
    Stroll on over and visit Frederic
    March 1, 2007

    ps. I’m so tempted to sign into this site and post a comment from a different computer so I get to be user 10,000 as well… :S

  8. personal avatar Frederic
    Stroll on over and visit Frederic
    March 1, 2007

    if you wouldn’t mind, could you possibly post a zip of the phps for some reason your server is parsing it instead of serving it as text… thanks :)

  9. personal avatar Michael
    Stroll on over and visit Michael
    March 1, 2007

    Where’s the plugin please?

  10. personal avatar brian
    Stroll on over and visit brian
    March 1, 2007

    Great plugin !

    Could you use this to produce a PDF of your whole site ?

    hail hail

  11. personal avatar Dan
    Stroll on over and visit Dan
    March 1, 2007

    any idea why I would get

    Fatal error: Call to undefined function: get_settings() in /home/websitep/public_html/live/homebasedbusinesses/wp2pdf/admin/auth.php on line 44

    I used complete url’s in the auth.php file just to be sure but I still
    get this error.

    Also, when I click the “PDF” button on the page, it simply goes to the post page
    or the archive page but does not create a pdf. However, no error code is generated at that time so I figure it must be basically installed correctly
    except for the above auth.php error.

    Thanks!
    Dan

  12. personal avatar Dan
    Stroll on over and visit Dan
    March 1, 2007

    Ok fixed that by simply switching the path back to ../../wp-config.php

    Now I get the following error in: Text, Color, Security, Output and Fonts
    when I select them from the wp2pdf setup screen:

    Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/websitep/public_html/live/homebasedbusinesses/wp2pdf/admin/setup_security.php on line 1

    Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/websitep/public_html/live/homebasedbusinesses/wp2pdf/admin/setup_text.php on line 1

    etc. etc.

    Dan

  13. personal avatar Dan McTaggart
    Stroll on over and visit Dan McTaggart
    March 1, 2007

    Hi,

    Well I squashed all those errors, guess how?
    Simply by opening the files in a text editor and resaving them!
    Believe it or not.

    Now, everything seems to function, but pdf’s are not created
    it simply goes to either the post or archive.

    No PDF is created.

    Is there pdf creator software from adobe that I need or something?

    Thanks!
    Dan

  14. personal avatar Dan
    Stroll on over and visit Dan
    March 1, 2007

    after going through the file and correcting problems like double quotes that should be single quotes and binary files that should be ascii files, etc… I decided that something was definitely wrong.

    On a debugger hunch I chmod’d everything to 777.
    Guess what the output is now?

    One or more required files have not been found. Please check your installation!

    Oh well, nice archive displayer anyway.
    hahahahahahaha

    Dan

Leave a Reply