Adding pdf2html

jean-christophe manciot actionmystique at gmail.com
Sun May 12 10:20:21 CEST 2019


Hi there,

With *cgit 1.2.1-18-gbd0293f* patched with the about-link patches attached
below and *git 1:2.20.1-2* on Ubuntu Eoan (19.10), I am trying to allow pdf
files to be translated online using the about link.

The tool used to perform the translation is *pdf2htmlex* from Ubuntu artful
with all required libraries also from artful (pdf2htmlex also exists on
Debian stretch). It works fine on other distributions of the same family
(artful version on eoan or stretch version on buster for instance); an
example of such a translation from pdf into html format is attached below:

*$ pdf2htmlex "README.pdf"*

*Preprocessing: 3/3Working: 3/3*
Modifying *about-formatting.sh* with:

*sed -i '/exec \.\/txt2html;/i \*
* *.pdf) exec pdf2htmlEX; ;;' filters/about-formatting.sh*

However, using that tool with cgit seems trickier than expected: I get the
error "502 Bad Gateway" when clicking on the about link available here:
https://git.sdxlive.com/GNS3-Labs-Collection/tree/README.pdf

I also tried to replace "exec pdf2htmlEX" with "exec ./pdf2htmlEX" in
filters/about-formatting.sh and copy pdf2htmlEX in the
filters/html-converters folder leading to the same end result.

Any suggestion?

-- 
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190512/985c8970/attachment-0002.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190512/985c8970/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: about-link-1.patch
Type: text/x-patch
Size: 1837 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190512/985c8970/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: about-link-2.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190512/985c8970/attachment-0003.bin>


More information about the CGit mailing list