Discussion:
[Mayan EDMS: 2604] Document preprocess on upload
Dexter
2018-07-26 10:14:41 UTC
Permalink
Hi All,

Is it possible to perform a preprocess on uploaded document ?

The idea is that we would like the sources of the documents to be uploaded
( for example LaTeX files and projects), and make Mayan run the compiler
and generate a PDF. This PDF will be what is shown in the preview.

Without this we must upload the PDF version, and find another system to
store the sources. We don't like the idea of using two tools to store
documents

Thanks
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-08-08 21:39:44 UTC
Permalink
This is an interesting concept. Since Mayan was originally made to be used
in government and legal setting, one of the philosophies was to keep the
uploaded document intact. This is to preserve the chain of evidence.

In this case the possible solution we've come up with is to add new
workflow actions to create a new document (PDF) based on a previously
uploaded document (LaTex one) and then delete the previous document. This
way there is a log of how the PDF was created and the upload process
doesn't need to be customized. For this three workflow actions need to be
created: A document delete action, one to call an external binary and
another to the upload a new file as a document.

More discussion is needed but just letting you know how far we are in the
brainstorm.
Post by Dexter
Hi All,
Is it possible to perform a preprocess on uploaded document ?
The idea is that we would like the sources of the documents to be uploaded
( for example LaTeX files and projects), and make Mayan run the compiler
and generate a PDF. This PDF will be what is shown in the preview.
Without this we must upload the PDF version, and find another system to
store the sources. We don't like the idea of using two tools to store
documents
Thanks
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dexter
2018-08-08 22:07:12 UTC
Permalink
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
Post by Dexter
Hi All,
Is it possible to perform a preprocess on uploaded document ?
The idea is that we would like the sources of the documents to be uploaded
( for example LaTeX files and projects), and make Mayan run the compiler
and generate a PDF. This PDF will be what is shown in the preview.
Without this we must upload the PDF version, and find another system to
store the sources. We don't like the idea of using two tools to store
documents
Thanks
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-08-15 20:39:25 UTC
Permalink
I understand better now. It would just be a case of adding support for
previewing LaTeX files in the converter app. Can you provide some sample
LaTeX files (no confidential or private information) or point to links of
LaTeX used for testing rendering software? A list of software or command
used for generating PDFs out of LaTeX files will be useful too as we don't
have experience with LaTeX files.
Post by Dexter
Thanks. Your idea seem to do the what is expected but has the following
- 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
Post by Dexter
Hi All,
Is it possible to perform a preprocess on uploaded document ?
The idea is that we would like the sources of the documents to be
uploaded ( for example LaTeX files and projects), and make Mayan run the
compiler and generate a PDF. This PDF will be what is shown in the preview.
Without this we must upload the PDF version, and find another system to
store the sources. We don't like the idea of using two tools to store
documents
Thanks
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dexter
2018-08-16 07:39:28 UTC
Permalink
Hi,

LaTeX was just an example. I have in mind ReST documents to be processed by
the SPHINX build system.

You can go to https://github.com/DexterMagnific/QSvgStyle, clone the
repository and build the doc/ directory by typing 'make latexpdf'
In this example, we would upload the whole doc/ directory to MAYAN
(compressed, for example: doc.sphinx.zip). MAYAN would recognize the
sphinx.zip extension and perform local generation of the PDF. Then you
would follow the standard picture generation from PDF.

Thanks
Post by Dexter
Hi All,
Is it possible to perform a preprocess on uploaded document ?
The idea is that we would like the sources of the documents to be uploaded
( for example LaTeX files and projects), and make Mayan run the compiler
and generate a PDF. This PDF will be what is shown in the preview.
Without this we must upload the PDF version, and find another system to
store the sources. We don't like the idea of using two tools to store
documents
Thanks
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...