Is there any way to flush latex's file io buffers. Because of something I'm trying to achieve I have to copy/modify the outputted pdf after it is created(but in the same compile run). The problem is, it seems, that the pdf is not fully flushed before I copy/modify it. The result is a partially copied file which end up corrupt.
Is there any way to get tex/latex/lutex/lualatex to flush the buffers before I do the copy? (the copy is in lualatex and happens right after the pdf is generated. It is not done separately)
.dvi
or.pdf
, depending on mode)? If so, the answer is 'no' as closing the output is the last job TeX does. On the other hand, if you mean the streams we can write to from within TeX then it is doable.