Re: How to create a PDF-Printer from the command line
On 9-01-2018, at 13h 06'44", Curt wrote about "Re: How to create a PDF-Printer from the command line"
> On 2018-01-09, Curt <curty@free.fr> wrote:
> > On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote:
> >> On 9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line"
> >>> >
> >>> >How does one convert a text file to a PDF using the command line?
> >>>
> >>> Step 1. Make sure the text file is also a latex document.
> >>> Step 2. Use latex.
> >>
> >> Assuming step 1 is reached, step 2 will make a dvi file. That was not
> >> what the OP asked for...
> >
> > pdftex (your one step road to a pdf)?
> >
> If you're dealing with latex files, as I have taken some minutes to
> discover (cough), you need 'pdflatex', not pdftex, which will barf
> immediately upon encountering latex commands.
>
I use LaTeX since 1997, so I know about this.
Dealing with step 1, if a text document is properly formated one can
use txt2html to generate a html file which then can be converted
further directly into LaTeX with gnuhtml2latex, or into ps (with
html2ps), pdf (with wkhtmltopdf), etc. I did not use any of the above,
so I can't say how good they work.
Converting text to pdf is something I did many times. In the past I
used enscript and a2ps. Then I experimented with u2ps and cedilla. I
use lately paps (with --font="Freemono 12") for a good UTF-8 coverage.
Of course I go via postscript, but that is not so bad.
In a single go, a pdf printer may still be the only option.
Ionel
Reply to: