Linux – Easiest method to create pdf from template using command line (without pdflatex)

latexlinuxpdfpdftk

For ten years I have been generating billings for me and my wife in this way:

  1. Create TeX template with LyX or by hand
  2. Using in this source placeholder text
  3. Then:

    cat template | sed s/placeholder1/somevalue1/ |sed s/placeholder2/somevalue2 ... > output.tex
    pdflatex output.tex 
    

Sadly in last years this process is becoming more and more difficult because TeX packages are becoming larger and larger (don't know why, but a full TeX installation on Ubuntu is almost 3 GB), and I always get lots of errors in the generation.

So, since I can control all the processes involved, is there a better (easier/more portable) way to create the template and then fill it with fields and create a PDF?

Best Answer

I have seen PDF files generated by using Python and ReportLab. In the open source version you have to do some programming to get to the output, but there are several examples and this should be straightforward for someone who could handle TeX.

What I have not used but what seems even simpler is to use rst2pdf. The generating/editing the .rst markup format is much the same as using LaTeX.

Related Question