I'd like to know what is a suitable tool to generate document templates.

94 views
Skip to first unread message

Omar Meat Boy Gutiérrez

unread,
Mar 26, 2014, 12:16:40 PM3/26/14
to web...@googlegroups.com

Hi everyone,

I'd like to discuss with you about your experience with document templates.

I have the next problem:

a) A customer want to generate different kinds of documents. He creates the `templates` using programs like Word.
b) I receive the document and I need to convert it to HTML.

What I need is the next:

A tool intended to be used by the customer where he can to generate `templates` adding special fields, tables, titles.

My boss is thinking in use markmin, I guess markdown is also a good choice.

According to your experience, what other tool can be used? Is it markmin a good choice? Am I missing something?

Greetings

Massimo Di Pierro

unread,
Mar 26, 2014, 12:55:18 PM3/26/14
to web...@googlegroups.com
MS Word documents can be easily be converted to HTML because Word can export to HTML. The resulting HTML is terrible and not humanly readable, but works.
If you use markmin notice in web2py there is a gluon.contrib.markmin.markmin2pdf which is designed to generate documents. markmin is more powerful then markdown.
You may also want to look into reportlab.

Omar Gutiérrez

unread,
Mar 26, 2014, 1:30:05 PM3/26/14
to web...@googlegroups.com
Thanks for the answer Massimo,

We discarded MS Word to HTML conversion because we have problems with the code generated (we have a kind of preview in HTML)

Thanks to mention Reportlab, we are using xhtml2pdf Pisa tool.

Cheers


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/vkmSNzY3oTA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Limedrop

unread,
Mar 26, 2014, 4:30:43 PM3/26/14
to web...@googlegroups.com
If your customer is happy using MS Word why force them to change?  Word files are just zipped up xml that can be manipulated using tools such as lxml.etree.  We let our customers upload Word templates that we then populate with data and return to them as docx.  That way they can use Word to apply all the formatting they want, using the tool they already know - and we don't need to handle any formatting.

I don't know if such an approach would meet your need, but perhaps the better option is to find a docx preview tool?

Omar Gutiérrez

unread,
Mar 26, 2014, 6:08:17 PM3/26/14
to web...@googlegroups.com
Limedrop,
 
If your customer is happy using MS Word why force them to change?  Word files are just zipped up xml that can be manipulated using tools such as lxml.etree.  We let our customers upload Word templates that we then populate with data and return to them as docx.  That way they can use Word to apply all the formatting they want, using the tool they already know - and we don't need to handle any formatting.

Thanks I liked your answer, we know that MS Word is a zipped up XML. We have been considered use OpenOffice documents and lxml.etree or dom.minidom. However I did not take the decision.
 

I don't know if such an approach would meet your need, but perhaps the better option is to find a docx preview tool?

IMHO, to find a docx preview tool could carry out more difficulties.

Cheers

Derek

unread,
Mar 31, 2014, 2:29:13 PM3/31/14
to web...@googlegroups.com
Word can make clean HTML if you choose to save as "Web Page Filtered". It's default is to add a bunch of office specific tags so that you can load it back into office and it will retain all the properties not supported by the HTML exporter. 
Reply all
Reply to author
Forward
0 new messages