Hello Andrew,
1. You get a ZIP file error, as it seems you are loading a flat XML file
(all XML in one file without ZIP).
The usual suffix is ODT and your file's suffix is FODT.
Drag & Drop your input file into a text editor or try to unzip it. :-)
2. The broken links are a combination mistake of Michael and me, I have
not fixed it as I am chewing on an 8-year-old source code generation
problem.
But I am getting closer...
3. Example Code can be found in the test folder of ODFDOM, but you are
absolutely right it should be better documented. Any suggestions on where
to place it?
Considering switching the HTML generation from old proprietary (no
longer supported) Apache Markdown to HTML conversion with Sphinx - created
for API documentation in the first place.
Good luck and happy holidays!
Svante
Am Mi., 31. März 2021 um 21:38 Uhr schrieb Andrew Willerding <
awillerding@callistacti.com>:
Hi,
I haven't used the ODF libraries since they were part of Apache and now
I have a project I'd like to make use of manipulating and creating ODF
files and understand that "things have changed." ;-)
I'm trying to run this code which ran fine with the Apache libraries
try {
template = TextDocument.loadDocument(templateFile);
} catch (Exception ex) {
logItem("Template:" + templateFile.getAbsolutePath()
+ ",TemplateFile not found.",
ex);
throw new IOException(ex.getMessage());
}
and receiving
java.lang.IllegalArgumentException:
org.odftoolkit.odfdom.pkg.OdfValidationException; The ODF package
'file:////ReportTemplates/ReportAgr.fodt' shall be a ZIP file!
My Maven dependency is ..
<dependency>
<groupId>org.odftoolkit</groupId>
<artifactId>simple-odf</artifactId>
<version>0.9.0-RC1</version>
<classifier>jar-with-dependencies</classifier>
</dependency>
I guess I have 2 questions. The immediate question is why am I getting
the ZIP file error and how do I fix the situation. The second question
is where do I find the documentation on how to use the new ODF Toolkit?
The links seem to be broken on the web site.
(https://tdf.github.io/odftoolkit/docs/
<https://tdf.github.io/odftoolkit/docs/>) I have a simple need. I have
created a template document that I want to use to replace fields (like
name, address) with dynamic values and also add items to an existing table.
Some existing example Java code to do this would be very very helpful.
Thanks,
Andrew
--
Andrew Willerding
Callista CTI
ph: 416 444-9702 x9455
fx: 416 444-9732
cell: 416 712-2323
www: http://www.callistacti.com
--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy
--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.