[pmwiki-users] Pmwiki2pdf and js problems

Tina, Hadgie hadgie.tina at eds.com
Tue Apr 3 20:26:58 CDT 2007


Thanks PM.

I have installed htmldoc and use GeneratePDF recipe and got no problems
this time.

Even pages with attached images of size greater than 5 MB is also no
problem.

-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com] 
Sent: Tuesday, 3 April 2007 11:21 AM
To: Tina, Hadgie
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Pmwiki2pdf and js problems

On Tue, Apr 03, 2007 at 11:10:09AM +0930, Tina, Hadgie wrote:
>    I have 2 issues: 
>    1) I have installed the pmwiki2pdf cookbook and was successful. I
have
>    tried viewing pages in PDF and they are OK. However, I seem to have
a
>    problem when viewing pages with size of 2 MB. For example, I have a
page
>    with an image size of 2 MB. When I tried viewing it in PDF, I keep
on
>    getting an error "Fatal error: Allowed memory size of 33554432
bytes
>    exhausted (tried to allocate 733143925 bytes) in
>    /var/www/html/pmwiki/cookbook/pmwiki2pdf/html2fpdf-3.0.2b/fpdf.php
on line
>    2201".

If I'm reading things correctly, the pmwiki2pdf recipe relies on an HTML
to PDF converter that has been written in PHP.  Since the converter is
written in PHP, I suspect that converting large HTML pages (2 MB) to PDF
would end up taking an absolutely huge amount of memory.  

If you're primarily wanting to convert wiki pages to PDF, I'd recommend
looking at the GeneratePDF or WikiPublisher recipes, as they use C-based
utilities for their conversion, which will likely be a lot faster and
use up much less memory.

If you're just wanting to have a way of storing static pages for
retrieval, you might look at the ExportHTML recipe.

>    I have modified /etc/php.ini variables "memory_limit" to 1 GB, and
>    max_execution_time to 180 and stop/start apache, but still gets the
"Fatal
>    Error: Allowed Memory size ...." message.  I tried other values
like 32
>    MB, 64 MB, etc., but I get similar "Fatal error..." message.

When you changed /etc/php.ini, did you also restart the webserver?
Did the "Fatal error..." message indicate a larger allowed memory size
(i.e., 1GB instead of 32MB)?

But no matter how we look at it, 1GB is an awful lot of memory for a PHP
script to be using, and I'd suspect that something is seriously amiss
somewhere.

>    2) My 2nd issue is a "File does not exists" message that keeps on
>    appearing on Apache log. The message says "File does not exists:
>    /var/www/html/pmwiki/pub/js". I believe that this is not related to
the
>    1st issue above, as I get this message even before I installed
pmwiki2pdf
>    recipe. What is ../pub/js and how it is used by pmwiki?

PmWiki itself doesn't come with or use anything called 'pub/js', so I'm
guessing it must be coming from a recipe or skin.

Hope this helps,

Pm

References:
[1]  http://www.pmwiki.org/wiki/Cookbook/GeneratePDF
[2]  http://www.wikipublisher.org/
[3]  http://www.pmwiki.org/wiki/Cookbook/ExportHTML




More information about the pmwiki-users mailing list