Hi,
I'm testing the Pdf Book extension to export Wiki to PDF. Now I have the problem that no images (.jpg,.png) are exported to the PDF. Only a blank space is left in the document.
I'm using Media Wiki 1.11.0, Pdf Book 0.0.9, HTMLDOC 1.8.27
Any Idea?
Günter Gratzer
Go into the extension's PHP source code, and comment out the lines that remove the intermediate (generated) files during the PDF conversion process. Generate a book, examine the intermediate HTML file, and look at the <img> tags being generated. See if the URLs properly point to the images on your wiki.
DanB
-----Original Message----- ...no images (.jpg,.png) are exported to the PDF. Only a blank space is left in the document. Günter Gratzer
Hi Dan, thank's for the hint! The problem was in my apache configuration. Did a test with a reverse proxy and forgot to change back the ServerName parameter. Now the images are included. They are a little bit too big so I have to check how I can resize them. I guess it's an htmldoc parameter where I can correct this problem.
Günter
-----Ursprüngliche Nachricht----- Von: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] Im Auftrag von Daniel Barrett Gesendet: Mittwoch, 26. März 2008 14:27 An: MediaWiki announcements and site admin list Betreff: Re: [Mediawiki-l] Problem with Extension Pdf Book
Go into the extension's PHP source code, and comment out the lines that remove the intermediate (generated) files during the PDF conversion process. Generate a book, examine the intermediate HTML file, and look at the <img> tags being generated. See if the URLs properly point to the images on your wiki.
DanB
-----Original Message----- ...no images (.jpg,.png) are exported to the PDF. Only a blank space is left in the document. Günter Gratzer
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
thank's for the hint! The problem was in my apache configuration. Did a test with a reverse proxy and forgot to change back the ServerName parameter. Now the images are included. They are a little bit too big so I have to check how I can resize them. I guess it's an htmldoc parameter where I can correct this problem.
If you can figure out how, can you relay the information to me? I have the same problem.
V/r,
Ryan Lane
Hi Ryan, I modified pdfbook.php and included the parameter "--browserwidth 1200". Now the images are smaler. My command looks like this at the moment:
$cmd = "--left $left --right $right --top $top --bottom $bottom"; $cmd = " --size A4 --browserwidth 1200"; $cmd .= " --header ... --footer d.1 --headfootsize 8 --quiet --jpeg --color"; $cmd .= " --bodyfont $font --fontsize $size --linkstyle plain --linkcolor $link"; $cmd .= " --toclevels $levels --format pdf14 --numbered $layout --book"; $cmd = "htmldoc -t pdf14 --charset iso-8859-1 $cmd $file";
Günter
________________________________
Von: mediawiki-l-bounces@lists.wikimedia.org im Auftrag von Lane, Ryan Gesendet: Mi 26.03.2008 22:03 An: MediaWiki announcements and site admin list Betreff: Re: [Mediawiki-l] Problem with Extension Pdf Book
thank's for the hint! The problem was in my apache configuration. Did a test with a reverse proxy and forgot to change back the ServerName parameter. Now the images are included. They are a little bit too big so I have to check how I can resize them. I guess it's an htmldoc parameter where I can correct this problem.
If you can figure out how, can you relay the information to me? I have the same problem.
V/r,
Ryan Lane
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I modified pdfbook.php and included the parameter "--browserwidth 1200". Now the images are smaler. My command looks like this at the moment:
$cmd = "--left $left --right $right --top $top --bottom $bottom"; $cmd = " --size A4 --browserwidth 1200"; $cmd .= " --header ... --footer d.1 --headfootsize 8--quiet --jpeg --color"; $cmd .= " --bodyfont $font --fontsize $size --linkstyle plain --linkcolor $link"; $cmd .= " --toclevels $levels --format pdf14 --numbered $layout --book"; $cmd = "htmldoc -t pdf14 --charset iso-8859-1 $cmd $file";
Awesome. Thanks! That option doesn't seem to be in the man page, but it was exactly what I needed.
V/r,
Ryan Lane
Hi Ryan, here you'll find all commandline options http://www.easysw.com/htmldoc/docfiles/8-cmdref.html
Günter
________________________________
Von: mediawiki-l-bounces@lists.wikimedia.org im Auftrag von Lane, Ryan Gesendet: Do 27.03.2008 16:10 An: MediaWiki announcements and site admin list Betreff: Re: [Mediawiki-l] Problem with Extension Pdf Book
I modified pdfbook.php and included the parameter "--browserwidth 1200". Now the images are smaler. My command looks like this at the moment:
$cmd = "--left $left --right $right --top $top --bottom $bottom"; $cmd = " --size A4 --browserwidth 1200"; $cmd .= " --header ... --footer d.1 --headfootsize 8--quiet --jpeg --color"; $cmd .= " --bodyfont $font --fontsize $size --linkstyle plain --linkcolor $link"; $cmd .= " --toclevels $levels --format pdf14 --numbered $layout --book"; $cmd = "htmldoc -t pdf14 --charset iso-8859-1 $cmd $file";
Awesome. Thanks! That option doesn't seem to be in the man page, but it was exactly what I needed.
V/r,
Ryan Lane
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Can anyone tell me how I can block the Special Pages for all user which are not sysop?
Thanks
Christian Schneider Enterprise Service Specialist
4-tune GmbH Sägereistrasse 29 CH-8152 Glattbrugg
http://www.4-tune.ch christian.schneider@4-tune.ch
Office ZH: +41 (0)44 818 02 03 Office SG: +41 (0)71 930 07 00 Mobile: +41 (0)79 418 4542 Fax: +41 (0)71 930 0701
Hi Günter...
Although htmldoc still has much problems, big part of the problem of the images lies somewhere in PdfBook.php (or PdfExport.php) Both are far from being ready for prime time... alas.
If you comment out the line
unlink ($mytemp);
in the php code, it won't delete te temp .html file (in /tmp on my mac os x system) so you can look at the html code that gets send to htmldoc...
the image link it contains is in the format http://<site>/wiki/ Image:<filename>.<ext>, which point to a wikipage, not the image itself. It should read something like http://<site>/images/<char>/ <twochars>/<filename>.<ext>...
however, there's much more problems with Pdf Book/Export.
I know my reply won't help much, sorry...
GerBNL
On 26-mrt-2008, at 11:54, Günter Gratzer wrote:
Hi,
I'm testing the Pdf Book extension to export Wiki to PDF. Now I have the problem that no images (.jpg,.png) are exported to the PDF. Only a blank space is left in the document.
I'm using Media Wiki 1.11.0, Pdf Book 0.0.9, HTMLDOC 1.8.27
Any Idea?
Günter Gratzer
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Instead of PdfExport, consider the alternative implementations discussed on the Talk page. They take care of the Image: vs. /images/... problem.
http://www.mediawiki.org/wiki/Extension_talk:Pdf_Export
Also, PdfBook and PdfExport have very different implementations. PdfBook has worked like a charm for us since Day 1. PdfExport we had to replace with http://www.mediawiki.org/wiki/Extension_talk:Pdf_Export#Got_it_working_w ith_Win2k3_and_MediaWiki_1.11.0.
DanB
mediawiki-l@lists.wikimedia.org