Read contents of the pdf using vim [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 10 years ago .

How can we read contents of the pdf file using vim command in the terminal? I have tried using pdftk by uncompressing it but still its not working for me. Is there any other way to decrypt or decode the pdf so that we can read by the terminal in any Linux flavour using vim.

asked Jan 22, 2014 at 10:33 Rohit Singhal Rohit Singhal 429 1 1 gold badge 3 3 silver badges 17 17 bronze badges

in vim's official website, the definition of vim is clear: vim the editor It is not pdf reader, it is not MS-Word reader. You can of course write a pdf reader with other language, e.g. Java with itext lib. and in vim call that tool. but this is not the right way to use vim. my 2 cents.

Commented Jan 22, 2014 at 10:39

@Kent but see we can open anything using vim but the main thing is that we will not able to read it because it is in encrypted format. So my tast is to decode it, so that we can be able to understand what the pdf has while using vim. And the main things is that it should not loose anything while decrypted. If you want to get my question more please visit this pdflabs.com/docs/pdftk-cli-examples there is a method to uncompress and according to this command we can able to use vim or emacs to read the pdf.

Commented Jan 22, 2014 at 11:04

pdftk (or qpdf, or cpdf, that can uncompress content streams, too, among other things) do not asciify (i.e. ASCII85Encode ) binary streams like images, fonts etc. Unfortunately. Therefore, most PDF files after un-compression still contain binary data and are not suitable for text editor. Maybe you want have a look at COS-structure editors/explorers (PoDoFo browser, Enfocus PDF browser, iText RUPS (they are all free) etc.).