I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
?
and 2)
Any way to clean up unprintable characters before sending them to xed?
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
?
and 2)
Any way to clean up unprintable characters before sending them to xed?
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
?
and 2)
Any way to clean up unprintable characters before sending them to xed?
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will
show all the pdf garbage.
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
and 2)
Any way to clean up unprintable characters before sending them to xed?
or pdf2txt from pdfminer
http://www.unixuser.org/~euske/python/pdfminer/
On 21/04/2022 15:47, Ottavio Caruso wrote:
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
?
and 2)
Any way to clean up unprintable characters before sending them to xed?
without using less : pdftotext?
Ottavio Caruso <[email protected]> wrote:
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage.
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
There is vipe from the moreutils package to edit/view in an external
program the content of stdout inside a pipeline.
https://joeyh.name/code/moreutils/
$ less file.pdf | EDITOR=xed vipe
and 2)
Any way to clean up unprintable characters before sending them to xed?
For that you have GNU strings.
$ less file.pdf | strings | EDITOR=xed vipe
On 21/04/2022 17:59, Chris Elvidge wrote:
On 21/04/2022 15:47, Ottavio Caruso wrote:
I can view a simplified version of a pdf file with less:
$ less file.pdf
If I press "v" an editor will open but it will show all the pdf garbage. >>>
I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.
1)Is there a more elegant way than:
$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
?
and 2)
Any way to clean up unprintable characters before sending them to xed?
without using less : pdftotext?
pdftotext is horrible. It doesn't remove odd characters and messes up
with formatting.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 05:38:25 |
| Calls: | 12,100 |
| Calls today: | 8 |
| Files: | 15,003 |
| Messages: | 6,517,909 |
| Posted today: | 1 |