Where to create pdf files to be later downloaded at running time

I have my play application that is able to create a pdf file at the folder:


while using sbt run. (I am also using LatexToPdf for this task). However, after compiling for production using:

sbt clean stage

and running my program, if I try to create and retrieve that file using the same code I get the errors:

[error] - util.LatexToPdf.CLaTeXOutputFilter$ - projectMou.tex: [error2] ! I can’t find file `/home/useraccount/Documents/CTSC-Camino/target/universa
[error] - util.LatexToPdf.CLaTeXOutputFilter$ - projectMou.tex: [error2] ! Emergency stop.
[error] - application -

So, I get the exception:

  FileNotFoundException: File ' ..... /target/universal/stage/app/util/LatexToPdf/temp/mypdffile.pdf' does not exist

However, for the file mypdffile.pdf I have no problems to create and use it if I use sbt run.
Any ideas?

I have to use LatexToPdf to create some reports that are the result of running some scala controller. While this process is working for me in development mode I can’t understand how to get the same results in production mode.