-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use a template (TemplateProcessor) for odt? #952
Comments
I'm having the same issue - using LibreOffice 5.2.0.4 |
TemplateProcessor can only deal with Word 2007 and higher :-/. @Progi1984 to be closed |
Scratch that - I apologise. Have used so many different ODT processors that I can't remember which one gave which result. Thst said, TemplateProcessor should still throw an exception for ODTs. |
Hello, |
@papoteur-mga |
Hello, |
@papoteur-mga Thank you for sharing that. |
@knulo If you mean this is fine, I can request a pull. |
@papoteur-mga Please give me some time to test... |
Hmm, sorry, I don't understand what PDF has to do. templateProcessor takes a text document and replaces inside it the tags. If PDF is needed, this is to the developer to add a step which transform the generated text document to PDF or something telse. |
@papoteur-mga Was only an idea for getting output of template handeled stuff to PDF. ;-) |
What I use is for example:
This is meant to be used as templateProcessor in https://phpword.readthedocs.io/en/latest/templates-processing.html but replacing with templateProssessorOdt. |
@papoteur-mga Thanks. I will discover that tomorrow. |
@papoteur-mga After some trouble with cloning the repo (my fault!), I'm now about to test your enhancements.
that is cloned for inserting the HTML input. |
Thanks for your test. |
@papoteur-mga O.K. and good luck! |
Hello, |
@papoteur-mga Thanks! I'll check your improvements next days and report my experience... ;-) |
@papoteur-mga
This results in one blank page, the block marks are gone, but not filled with the new (desired) content. And also header and footer aren't there anymore. If I do additionally that after the above:
This results in one page without header and footer and only with one line: So it seems, page breaks and setImageValue aren't handeled yet? |
Can you give a complete example. I can't detect a problem. Did you included instructions like
before setComplexBlock ?
The same here, did you clone blocks before? |
@papoteur-mga
And the same code works with Docx template processor. So I guess an issue with template processing for Odt. |
@knulo : no problem, I have no production constraints ;) |
@papoteur-mga |
@papoteur-mga Now the odt is generated with content (big surprise!) 😁 Kind regards and thanks for your patience |
Hi Knut,
At the last line, there is no formatting data. This is what is inserted in the document. Thus I would say that the XMLWriter for ODT doesn't provide the formatting you expect. This is the same code as for Word2007 templates. |
it's work, when i got missing watermark on convert docx to pdf with soffice. |
The "setImageValue" function did not work, the text with the key disappeared, but the image did not appear. In the docx it appears normal. |
I'm trying to create an odt file using a template, with this code:
however the file is damaged, and nothing has been replaced... I can't find much on using an odf template, does anyone have this working?
Thanks!
-Michèlle
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: