I am programmatically generating PDF's from a template and would like to avoid hitting the hard-drive all the time. Not so much for optimization but because I run parallell threads on all the cores and if the files are not to crash I would have to use some sort of strange naming-system.
I would very much like to run pdflatex or xelatex without the use of files. Make it read the tex file from a string (or stdin) and make it print the data for the pdf to stdout.
In pdflatex there is an -ipc option that might do what I want, but I can't figure out how to use it.
Any help would be very appreciated.
cat test.tex | pdflatex
works. However it does put the output in texput.pdf. The problem with printing the pdf to stdout is that TeX writes lots of other output files as well, that are often used in a subsequent run of TeX (e.g. to generate the table of contents).