1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 19:02:09 +02:00
tldr/pages/common/pdftotext.md
Lena d427f333b2
pages/*: add backticks around I/O streams (#10436)
* as suggested in #10428
* standard input  => `stdin`
* standard output => `stdout`
* standard error  => `stderr`

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-08-09 10:59:02 +05:30

682 B

pdftotext

Convert PDF files to plain text format. More information: https://www.xpdfreader.com/pdftotext-man.html.

  • Convert filename.pdf to plain text and print it to stdout:

pdftotext {{filename.pdf}} -

  • Convert filename.pdf to plain text and save it as filename.txt:

pdftotext {{filename.pdf}}

  • Convert filename.pdf to plain text and preserve the layout:

pdftotext -layout {{filename.pdf}}

  • Convert input.pdf to plain text and save it as output.txt:

pdftotext {{input.pdf}} {{output.txt}}

  • Convert pages 2, 3 and 4 of input.pdf to plain text and save them as output.txt:

pdftotext -f {{2}} -l {{4}} {{input.pdf}} {{output.txt}}