Extension talk:Mpdf/Archive

Images and TOC
Extension seems to be working great so far except for just a few issues...

The first is that no images appear in the exported pdf. They show up as little white boxes with a red x. Is there anything I need to tweak to get these to display properly? When I hover over the x icons it displays a URL in the format http://servernamehere/mediawiki/index.php?title=File:filenamehere.jpg ..could this be the problem since its not pointing to the actual file location?

The second issue is that the TOC doesn't seem to render properly and often breaks the formatting. Is there any way around this? And is it possible to have the TOC links point to the proper section of the actual exported pdf document itself when clicked? This type of extension is exactly what I've been looking for since I need to be able to export PDF but don't have root access so can't use any of the alternate htmldoc extensions, so appreciate any help you can provide! Thanks in advance


 * Hi. When I hover over the x icons it displays a URL - this is normal. By default, picture in the wiki have a link to the page file. This can be corrected by setting link=. Sample: myfile.jpg


 * TOC links point to the proper section of the actual exported pdf document - mPDF has its own means of ToC Index Bookmarks. Please, read mPDF manual


 * TOC doesn't seem to render properly - I'm working on improving render


 * They show up as little white boxes with a red x - This is true for all images or only some of them?


 * in the near future I will make a few examples showing work of this extension --Pastakhov (talk) 04:23, 7 August 2012 (UTC)


 * Thanks for your response, Pastakhov. The little white boxes with a red x show up for all images. I set showImageErrors to true in order to determine what the problem is and after doing so, I receive the msg "mPDF error: IMAGE Error (http://*serveriphere*/mediawiki/images/2/23/Flag-USA.png): Could not find image file" when attempting to export a page to PDF. Any idea what the fix could be?


 * Mpdf required also gd php module for works with images png, svg and etc... thanks for report problem --Pastakhov (talk) 05:26, 10 August 2012 (UTC)


 * Yeah I already have gd enabled, and have checked to make sure I followed the other requirements exactly as you had written. It's not just png files that don't show up, the other image files (i.e. jpg, gif, etc) are not working at all either. Everything else seems to render in the exported pdf without any issues, it's just the images that show up as red x..and if I click the link that the missing image (red x) refer to, the pictures load in the browser fine they just don't appear in the pdf file...any other ideas how to fix this issue? 

You can place them on http://pastebin.com/ --Pastakhov (talk) 04:14, 17 August 2012 (UTC)
 * I need to see the html source of a wiki page and logs from a web server at the time of export to pdf format.


 * What exactly is it that you are looking for from the webserver log? I'm using IIS, and the only line that prints out in the server log when I try to export a page to pdf (with imageerrors set to true in the mpdf file), is for example a line like this: "GET /mediawikiold/skins/common/images/poweredby_mediawiki_88x31.png - 80 - 10.1.19.124 - 401 2 5 0" And on the webpage itself I get a blank page with the error: "mPDF error: IMAGE Error (http://10.1.19.124/mediawikiold/skins/common/images/poweredby_mediawiki_88x31.png): Could not find image file"


 * If I'm not mistaken, IIS return 401 error - Unauthorized. You configure authorization on the web server? --Pastakhov (talk) 06:56, 21 August 2012 (UTC)


 * There are no IIS errors that appear. The pdf itself exports without any IIS error, its just that when I open the exported file on my computer, all of the images are missing and have red x in their place. If I set "$this->showImageErrors = true" in mpdf's config.php file and try exporting a pdf again, it gives me the mpf IMAGE error I wrote in the msg above. Again, the missing images (that show up as red x in the pdf) appear to point to the right file (i.e. if I type them into a webbrowser, the image displays fine), it is just that they are not getting rendered properly in the exported pdf. This goes for both internal images that I've uploaded onto my server (i.e. http://10.1.19.124/mediawikiold/skins/common/images/poweredby_mediawiki_88x31.png) and for external images (i.e. http://upload.wikimedia.org/wikipedia/mediawiki/a/a9/Example.jpg)--none of them show up on the exported pdf.


 * Any ideas for how to resolve this issue so that images show up properly??

I am sorry for the long wait, I'm on vacation until September 17 --Pastakhov (talk) 04:50, 7 September 2012 (UTC)


 * No problem, upon your return if you do have any ideas how to resolve this, I'd love to hear!


 * mpdf return error 'Could not find image file' if can't download image file from web server. it is possible for one of the following reasons:


 * allow-url-fopen disabled by settings in php.ini.
 * not exist or disabled curl library


 * In my php.ini I have php_curl.dll enabled and allow_url_fopen = On . Any other ideas what might be causing this error?
 * no, ideas ended ... I can offer download a clean mpdf and see how it will be generated pdf files of the examples. If there is a problem with the images, you will need to contact the developer mpdf. Unfortunately there is a very tangled source code and few means for debugging. if I have more ideas at the expense of this problem, I will write here--Pastakhov (talk) 04:07, 21 September 2012 (UTC)

Header and Footer
We use Mediawiki 1.19 and want to export some pages as PDF. Mpdf works fine but i would like to add a header (Mediawiki-Pagename) and a footer (Page x of y) on any page. Anyone an idea how to realize this?

Thank you in advance

Michael


 * According to the documentation mpdf, this is done by using special tags. At an early date i will try to solve the problem of adding these tags in a wiki page.--Pastakhov (talk) 10:18, 15 November 2012 (UTC)


 * Please download and try new version of Mpdf extension. Sample in http://www.xboct.org/wiki/Mpdf, PDF --Pastakhov (talk) 13:38, 15 November 2012 (UTC)


 * Sorry, hurried and forgot to mention use magic word for adds mpdf tags in wiki page. --Pastakhov (talk) 14:20, 15 November 2012 (UTC)

How to not include Wiki header and sidebar tools in PDF output
When exporting a wiki page to PDF with Mpdf extension, the resulting PDF has also the wiki page header / footer (e.g. search, "powered by mediawiki") and the sidebar included at the end of the PDF page. How to prevent this? Thanks. Kai,


 * Does the printable version have wiki page header / footer? --Pastakhov (talk) 04:11, 7 April 2014 (UTC)


 * No, printable version is without header and footer.


 * Thanks you for feedback. It is fixed in version 0.4.0. --Pastakhov (talk) 05:01, 8 April 2014 (UTC)


 * Looks much better now. Thanks a lot. One small issue. At each chapter heading, there is a preceding "[edit]" link which links to editing this chapter. Is it possible to remove this? Thanks, Kai.


 * I've removed it in version 0.4.1. Feel free to contact me if you need else something. --Pastakhov (talk) 12:13, 8 April 2014 (UTC)


 * Works perfectly now. Thanks, Kai.

Ignorance in using the
So this is probably something very easy and I have tried to educate myself before posting here but I'm out of ideas. I have attempted to use the #mpdftags but it does nothing when I select the PDF Export Button. I have even copied the example and tried that with no luck. I am running MW 1.21 with Mpdf (Version 0.4.1, 2014-04-08). Any thoughts or ideas would be a big help. Thanks. Clifford.kasper (talk) 14:03, 6 August 2014 (UTC)