2

Are there any C/C++ libraries available that can be used in creating, loading and saving files in .odt-format?

Alternatively, where can I find tutorial-like information on implementing .odt(/ODF) specifications?

slashmais
  • 7,069
  • 9
  • 54
  • 80
  • Duplicate: [C++ Library to render ODF documents](http://stackoverflow.com/questions/2083802/c-library-to-render-odf-documents) – Peter Wood Sep 10 '12 at 10:54
  • 1
    @PeterWood: sorry, no. rendering != creating, loading and saving. – orlp Sep 10 '12 at 11:06
  • @PeterWood: I did not consider rendering to be a problem if the create/load/save problem can be solved, but thanks for the link - I'm going through the answers there. – slashmais Sep 10 '12 at 12:38
  • Found this: http://stackoverflow.com/q/2619161/15161; now it begs the question: what is the use of a standard if it is so difficult to actually use it? – slashmais Sep 10 '12 at 13:50
  • 1
    @slashmais Flexibility can be perceived as complexity. If you don't need the flexibility, create a template ODT and just fill in the content as needed. As mentioned, there exist XML parsers to actually handle IO. ODT isn't a plaintext file, so some complexity/difficulty is expected. – Ioan Sep 10 '12 at 18:37

1 Answers1

3

This site: OASIS OpenDocument Essentials seems to cover the problem, including howto-examples and shortcuts.
It's quite nicely done and easy to follow.

Flexibility can be perceived as complexity. If you don't need the flexibility, create a template ODT and just fill in the content as needed. As mentioned, there exist XML parsers to actually handle IO. ODT isn't a plaintext file, so some complexity/difficulty is expected. – Ioan

From the link:

The Virtues of Cheating

As you begin to work with OpenDocument files, you may want to write a program that constructs a document with some feature that isn’t explained in this book—this is, after all, an “essentials” book. Just start OpenOffice.org or KOffice, create a document that has the feature you want, unpack the file, and look for the XML that implements it. To get a better understanding of how things works, change the XML, repack the document, and reload it. Once you know how a feature works, don’t hesitate to copy and paste the XML from the OpenDocument file into your program. In other words, cheat. It worked for me when I was writing this book, and it can work for you too!

slashmais
  • 7,069
  • 9
  • 54
  • 80