Thanks. Your idea seem to do the what is expected but has the following major drawbacks:
- Creating a new doc will destroy the link between the "source" and the created PDF
- By deleting the original document, we can no longer have access to the source. This is problematic for the review process: in order to change the document, we need to download the source, modify it and upload a new version in source form. As the link between source and PDF is lost, the newly created PDF from the modified source will not be a new PDF version but a new document
What I was thinking of is much simpler: You're generating pictures from uploaded documents for the preview. In fact, you upload a PDF and preview pictures of pages. This time you would upload a LaTeX and still preview pictures. You just need to recognize that this is a LaTeX document and run the generator locally. This will either be hardcoded in the source (like now for PDFs, OO documents, ...) or offer a mean of launching PDF generators for unknown types.
Thanks