Note that where one variable is implied by two options, the second option c maximum characters per line (default 80) l lines per page (default 60, determined automatically v use given line spacing (default 12 points) s use font at given pointsize (default 10) f use PostScript (must be in standard 14, default: Courier)
It reads from standard input or a named file, and writes the PDF file Text2pdf makes a 7-bit clean PDF file (version 1.1) from any input file. (here I set the variable CC=gcc on AIX, on linux this will not be an issue) $. Very simple to compile, just save the text2pdf.c and Makefile into the same directory and type make. I'm able to use it into AIX OS without problem.
Just use the text2pdf, which is free and opensource.Īt the link you can download the source or the pre-compiled binary for windows, solaris, dos.
Then it executes ps2pdf to produce the final file.įor more options see the help files with :help :hardcopy. This opens example.txt in Vim and executes the command passed to the -c option, which in this case is a hardcopy command followed by a quit ( q) command. Select the PDF text you wish to extract and click OK. If you click the Select button from the Adobe Reader toolbar on the top, the program will select the files you’ve saved. The PDF file you want to convert in Adobe Reader should now be open. You can do the same directly from a terminal (without interacting with Vim) by using the following command vim example.txt -c "hardcopy > example.ps | q" ps2pdf example.ps Start Microsoft Word on your desktop by using the Start menu. Then you can convert the PostScript file into a PDF by using the following command ps2pdf example.ps The header of each page in the PostScript file will contain the original filename and the page number. Which will produce a file example.ps containing all the text in example.txt. For example you can open example.txt and execute :hardcopy > example.ps You can print text to a PostScript file using Vim and then convert it to a PDF, as long as Vim was compiled with the +postscript feature.įor this you use the :hardcopy > command.