- I've hooked luatex's
stop_runcallback so I can do some processing on the output pdf after it is generated.
- To process the pdf I need to call os.execute. When doing so I an error saying "All command executes disabled" but otherwise everything works normal execute os.execute doesn't execute the command I want.
- I use
-shell-escapeto try and get os.execute to work
I then get an error that that the
Failed to open PDF file: Main.pdf Errors encountered. No output created. Done. Input errors, so no output created. Error: Failed to open PDF file: Main.pdf Errors encountered. No output created. Done. Input errors, so no output created.
yet Main.pdf is clearly created but os.execute still does not execute(note that adding
-shell-execute to the command line is the only change that creates this error). I get a different error from my os.execute too. It is no
ALSO! If I simply use 'copy ...' to try and copy the main.pdf file to a tmp location(thinking maybe it was locked) I get a new pdf but it is not complete as if the buffers were not fully flushed. (if that were the case then I would just get that annoying error message but otherwise everything else would be ok)
- Trying to get os.excute to work. I use
shell-escapebut this cases other problems
- My callback is suppose to be called after the pdf is generated BUT when I simply try to copy it, it seems to not copy all of the file. Either the pdf is not being flushed or something is adding additional stuff to the end of the pdf(although I wouldn't expect this and at the very least would expect the original pdf to be valid).
I've tried writing several minutes and the copy still doesn't get the whole file(it's missing about 1kb at the end after some hyperref stuff).
Anyone have any ideas whats going on?
(if I can get this to work I should have the ability to make
\include precompilable(so it will not compile the included file unless the tex file changed but will import a precompiled version))