FS#44365 - [lesspipe] pdf are not processed correctly, html2text is broken

Attached to Project: Community Packages
Opened by Peter Wu (Lekensteyn) - Thursday, 26 March 2015, 23:57 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 27 March 2015, 10:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

`less foo.pdf` fails for PDF files when poppler is installed. This happens because the pdftohtml command somehow takes precedence, combined with html2text.

html2text does not get executed because the Python version does not support the -style option, and because '-' for stdin is not (yet) supported[1].

The attached patch fixes the incompatibility with html2text, but I prefer the output of pdftotext (maybe disable pdftohtml detection?).

I suggest to either apply the patch or disable disable html2text because its output is uglier (alternatively, apply the patch but change the detection order).

[1]: https://github.com/Alir3z4/html2text/pull/56

Additional info:
* package version: 1.82-2

Steps to reproduce:

1. Install poppler (for pdftohtml)
2. LESSOPEN='|/usr/bin/lesspipe.sh %s' less foo.pdf
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 27 March 2015, 10:01 GMT
Reason for closing:  Fixed

Loading...