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

Dokuwiki proxy setting is ignored #245

Open XANi opened 8 years ago

XANi commented 8 years ago

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

Klap-in commented 8 years ago

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 commented 6 years ago

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

Dennis-Bezold commented 2 years ago

Are there any news here?

Klap-in commented 2 years ago

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..

Dennis-Bezold commented 2 years ago

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.

Klap-in commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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