[pmwiki-users] GeneratePDF recipe limitation

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 7 20:53:47 CDT 2006

On Wed, Sep 06, 2006 at 06:31:44PM +1000, Kathryn Andersen wrote:
> I am using GeneratePDF http://www.pmwiki.org/wiki/Cookbook/GeneratePDF
> on our Wiki at work.  I didn't use PublishPDF because it seems much more
> difficult to set up, since we run behind a firewall and thus would have
> to set up our own server, and I tried and I gave up.  Using the
> generatepdf.php plus installing htmldoc was much simpler.
> Unfortunately, I've just discovered a limitation with generatepdf -- it
> doesn't handle images.  If there is an image on the page, it isn't
> included in the generated PDF.
> [...]
> Since it was written by PM, I thought I'd send an appeal here.  Is there
> any way of making this recipe deal with images correctly?

I've updated the recipe, see


Essentially there are some additional arguments that need to be
passed to htmldoc to get it to work, and an environment variable
needs to be set.  

The (new) version in the cookbook still uses a temporary file
for generating the HTML; somehow I'm much more comfortable doing
this than having htmldoc access its pages via the webserver.
(Also it means that any query string parameters are preserved when
displaying the page.)  With the new options in place it does seem
to be embedding images properly (see the bottom of the pages
in the lists above).

Let me know if this works or not; if not, then I'll write a version
of the recipe that generates the page via an http:// request instead
of from a temporary .html file.

I'm also wanting to add a built-in "break page" markup to the recipe;
just haven't figured out what that should be yet.  (What do PublishPDF
and other similar recipes use?)


More information about the pmwiki-users mailing list