splitbrain / dokuwiki-plugin-dw2pdf

A fork of Luigi Micco's PDF export plugin for DokuWiki
http://www.dokuwiki.org/plugin:dw2pdf
55 stars 68 forks source link

Image links with @TPLBASE@ not working in exported PDF #228

Open r0ckarong opened 8 years ago

r0ckarong commented 8 years ago

We have a DokuWiki installation (DW2PDF 2015-09-02, DW 2015-08-10a "Detritus")

It's hosted in an Apache on CentOS in an AWS instance, authentication works against OneLogin and WSO2IS via custom plugin.

Now when I generate a PDF on the localhost or show the debug html all images work fine when I use image links like this in the template files

@TPLBASE@images/myimage.jpg

When I try to download the PDF via browser though I get a PDF file without the images. When I hardcode the image links to their location on the filesystem

/var/www/html/dokuwiki/lib/plugins/dw2pdf/tpl/mytemplate/images/myimage.jpg

It works for both cases. What do I have to configure differently to allow PHP or MPDF or whatever is responsible for grabbing the images? I can't find the right place. I have permitted the public AWS IP in the apache config.

Klap-in commented 6 years ago

Recently @INC@ and @TPLINC@ are added, next to existing @TPLBASE@. I do not yet understand there purpose, but is it something that is useful at this place?

addition in: 893987a24582311038ed9e719e73ecc819c486b5

splitbrain commented 6 years ago

Their purpose was exactly fixing this problem. I had a customer deployment on a windows machine where @TPLBASE@ images would not display (even though the same template worked fine on my linux machine). I was on time pressure so the quickest way to "fix" the problem was using @TPLINC@ to give the full file system path instead.

Klap-in commented 6 years ago

@splitbrain Does this require further follow-up? or is this a sufficient solution, so that this issue can be closed?

splitbrain commented 6 years ago

I think it would be useful to figure out why it fails sometimes, unfortunately I don't have access to this customer system so I can not test it.