Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Alfresco - Generate documents dynamically from templates
1. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
1
Generate dynamically documents from templates
and print integration
Alfresco Tech Talk Live #114 – David
Antón Lou
2. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
2
• Pharma standarized documents
Must accomplish GMP(Good Manufacturing Practises)
Custom .docx template for each type
Generate .pdf files
Automatic fields filling
Watermarks
Network printing
What is the business case?
Introduction
3. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
3
Templates are fine...
But not quite
Document
Templates With templates we can:
✓ Easy way to create documents
✓ Save time writting common
parts
✓ Follow the GMP standards
But we have some problems if:
✗ Wrong template
✗ Want to update metadata
4. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
4
First, remove the parts that
might change
Document
Templates
Docx4
j
• Remove header and footer
• Remove cover page body
• Remove history page body
5. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
5
After that, generate custom
parts from freemarker
templates
Document
Templates
6. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
6
Finally, construct the pdf
joining all parts
Document
Templates
7. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
7
And the final result...
Document
Templates
8. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
8
As a summary
Document
Templates
With this approach we can:
✓ Modify documents dynamically
✓ Change templates on runtime
✓ Without editing manually documents
Docx4
j
9. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
9
• CUPS(Common Unix Printing System)
• Integration using Cups4j
For get all the printers in the local network
Going back to the paper.
Unfortunately, in some
business cases it‘s
necessary
Network
Printing
10. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
10
• Integration using Cups4j
For printing documents in concrete printer
Going back to the paper.
Unfortunately, in some
business cases it‘s
necessary
Network
Printing
11. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
11
Demo
12. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
12
About the
team
“Es de bien nacido, el ser
agradecido„
Eduardo Luján
Technology and Infraestructure
Beatriz Estévez
Software Engineer
@mimacom
https://www.linkedin.com/company/mimacom
13. Copyright: mimacom ag, 2018. Alle Rechte vorbehalten, auch bzgl. jeder Verwertung, Reproduktion und Weitergabe
Alfresco Tech Talk, 14th March 2018
13
About me
David Antón Lou
Software Engineer
mimacom Ibérica
Av. Portal de l’Ángel 38, 3er 4ª
08002 Barcelona
T: +34 93 024 96 92
E: david.anton@mimacom.com
@davidantonlou
https://www.linkedin.com/in/davidantonlou/
Hinweis der Redaktion
Give thanks to two other members of the Alfresco mimacom team
Finally, here you have my contact information and social media.
I spect you like this technical talk, and if you want to have more details about, you can contact with me.