1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/pdftotext.md

25 lines
682 B
Markdown
Raw Normal View History

2017-12-05 21:12:55 +01:00
# pdftotext
> Convert PDF files to plain text format.
> More information: <https://www.xpdfreader.com/pdftotext-man.html>.
2017-12-05 21:12:55 +01:00
- Convert `filename.pdf` to plain text and print it to `stdout`:
2017-12-05 21:12:55 +01:00
`pdftotext {{filename.pdf}} -`
- Convert `filename.pdf` to plain text and save it as `filename.txt`:
2017-12-05 21:12:55 +01:00
`pdftotext {{filename.pdf}}`
- Convert `filename.pdf` to plain text and preserve the layout:
2019-12-02 17:44:17 +01:00
`pdftotext -layout {{filename.pdf}}`
- Convert `input.pdf` to plain text and save it as `output.txt`:
2017-12-05 21:12:55 +01:00
`pdftotext {{input.pdf}} {{output.txt}}`
- Convert pages 2, 3 and 4 of `input.pdf` to plain text and save them as `output.txt`:
2017-12-05 21:12:55 +01:00
2017-12-07 11:59:30 +05:30
`pdftotext -f {{2}} -l {{4}} {{input.pdf}} {{output.txt}}`