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
Context
- [dev] Migrating to new ODF · Andrew Willerding
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.