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

Dokuwiki proxy setting is ignored

Open XANi opened this issue 9 years ago • 8 comments

dokuwki proxy setting is not propagated into dw2pdf so it is impossible to set up proxy without modyfing php files manually

XANi avatar Oct 11 '16 15:10 XANi

Related fixed issue #210, but about the QR code. There the httpclient was updated, no idea of that fits in solution for this as well.

Klap-in avatar Oct 11 '16 18:10 Klap-in

@XANi how is the last version of dw2pdf behaving? Brings that version improvements?

Klap-in avatar Nov 24 '17 18:11 Klap-in

Are there any news here?

Dennis-Bezold avatar Mar 25 '22 10:03 Dennis-Bezold

Hi @Dennis-Bezold you tested it? What were your findings? At the moment it is not clear if it is really broken. So any description that let us allow reproducing an lacking situation is welcome. For now I assume it is working..

Klap-in avatar Mar 26 '22 09:03 Klap-in

Hi @Klap-in, We're using the version 2021-07-22 of dw2pdf and 2020-07-29 "Hogfather" of dokuwiki.

The interesting part is, when I'm creating the pdf the QR Code is displayed as an red x with no errors or problems in DevTools.

But when I'm doing the export with &debughtml=html then the QR Code is displayed and available in the browser.

I'm not sure what the problem is. We're running an nginx webserver 1.14.1 on a Rocky Linux release 8.5 Server. Dokuwiki is configurated with an proxy server and able to for exmple download plugins and so on.

If you need any logfile entrys, please let me know.

Dennis-Bezold avatar Mar 28 '22 08:03 Dennis-Bezold

I have no proxy available, so I cannot test and I have very limited time. Please could you investigate the situation yourself? Please try to enable logging and see if you can find attempts that skip the proxy setting of DokuWiki. https://mpdf.github.io/installation-setup/logging.html This require some manually additions to DokuPDF (in DokuPDF.class.php), which extends Mpdf\Mpdf() class https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/blob/5d4af507a0bab1e6fa4d223fce2596de8fa0a88a/action.php#L394 See for examples the other settting below this line.

I suspect that RemoteContentFetcher does not use the proxy settings of DokuWiki. https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/blob/5d4af507a0bab1e6fa4d223fce2596de8fa0a88a/vendor/mpdf/mpdf/src/RemoteContentFetcher.php

Klap-in avatar Mar 29 '22 14:03 Klap-in

mpdf support a proxy via curl. https://github.com/mpdf/mpdf/pull/1008 Maybe the settings from dokuwiki should be set for mpdf as well. Maybe the settings from the DokuWiki config can be set when initializing mpdf in dw2pdf.

Klap-in avatar Apr 05 '22 13:04 Klap-in

The QR code is now created locally, since #482.

Klap-in avatar May 05 '23 22:05 Klap-in