On 21/04/2024 15:21, Svante Schubert wrote:
Hello Jeremy,
On Sun, 21 Apr 2024 at 15:34, Jeremy Morton <admin@game-point.net
<mailto:admin@game-point.net>> wrote:
I've been looking into ways to edit ODF files from my C# program and
was surprised at how limited it currently is. Considering ODF is an
open format I'd have thought there would be a straightforward way to
do it but it seems that unless you happen to be using Java (and can
use this ODF Toolkit),
So far I was able to follow you...
you actually have to install and run an
instance of LibreOffice - then communicate with it using the
LibreOffice SDK - to edit these files which seems like a rather crazy
way of doing things to me, especially on a server.
What scenario are you describing above?
As the ODF Toolkit page says "Unlike other approaches which rely on
runtime manipulation of heavy-weight editors via an automation
interface, the ODF Toolkit is lightweight and ideal for server use."
I believe that to manipulate ODFs using the LibreOffice SDK's CLI
libraries (which is one of the only ways to do it from C# I think):
https://api.libreoffice.org/examples/examples.html#CLI_examples
... you have to install and run LibreOffice. Instead of just opening
files and modifying them, the libraries connect to LibreOffice and use
some kind of RPC mechanism to get it to modify the files, introducing
an enormous dependency of installing the LibreOffice suite, which I
don't want to have especially on a server.
The ODFDOM of the ODF Toolkit is just Java and does not require a
LibreOffice.
That's the point - this toolkit is much more like what I want.
Problem is it's Java-only, hence my question.
As soon as someone requires a layout engine it makes sense to load the
ODF in LibreOffice.
My program wouldn't require it, though, as it just wants to manipulate
LibreOffice documents.
For instance, in case you like to generate an ODF document with the
ODFDOM from data sources and finally like create a PDF from it.
As the ODF Toolkit
homepage acknowledges, this is a very heavyweight way to do things.
Could you provide the link, I am getting curious here :-)
https://odftoolkit.org/
The whole idea of manual porting seems awkward to me as you duplicate
the maintenance costs. Found issues and new features have to be
implemented for each language.
Is there a better way to do it? Automatic code generation? Given how
different different languages are, that tends to be pretty hard to
achieve in practice, although I'd take it if it were offered.
--
Best regards,
Jeremy Morton (Jez)
--
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.