dokuwiki-plugin-dw2pdf icon indicating copy to clipboard operation
dokuwiki-plugin-dw2pdf copied to clipboard

Image links with @TPLBASE@ not working in exported PDF

Open r0ckarong opened this issue 8 years ago • 4 comments

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.

r0ckarong avatar Mar 17 '16 13:03 r0ckarong

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

Klap-in avatar Nov 17 '17 10:11 Klap-in

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.

splitbrain avatar Nov 17 '17 10:11 splitbrain

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

Klap-in avatar Nov 19 '17 23:11 Klap-in

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.

splitbrain avatar Nov 20 '17 09:11 splitbrain