A java implementation of the ODFDOM API. Use this tag for questions regarding the toolkit. For questions regarding the API itself, use tag "odfdom".
Questions tagged [odftoolkit]
29 questions
16
votes
1 answer
XDocReport converting ODT to PDF with OSGI
To start to work with XDocReport I want to convert ODT to PDF.
All my application is OSGi. So I install the following…

Pavel_K
- 10,748
- 13
- 73
- 186
6
votes
1 answer
Add content to frames of an OpenOffice odp presentation in ODFToolkit
I want to use a Open Office / Libre Office Presentation as a template and insert text and images into slides. I am trying to use odftoolkit. If I have a slide with the boxes, they are represented as in the XML
How do I access those to…

Amala
- 1,718
- 1
- 17
- 29
3
votes
1 answer
ODF Toolkit-Casting Problem
I am developing a webservice to create an odt document with odf toolkit. I did use below code to create a new document but i am getting an casting error. What o you think about it? How can i create formatted(colored etc) text? Thanks
My Code Just
…

Güngör Basa
- 628
- 2
- 9
- 27
2
votes
4 answers
Verifying integrity of documents
What are the steps to verify integrity of these documents ? doc,docx,docm,odt,rtf,pdf,odf,odp,xls,xlsx,xlsm,ppt,pptm
Or at least of some of them. Usually when uploaded to a content repository.
I guess that inputStream is always 99,99% read properly…

lisak
- 21,611
- 40
- 152
- 243
2
votes
1 answer
Optimize writing ods files with simple-odf
This is my code to write my file:
SpreadsheetDocument ods = SpreadsheetDocument.newSpreadsheetDocument();
Table table = Table.newTable(ods, 4000, 20, 0, 0);
table.setTableName("foo");
Border border = new Border(Color.BLACK, 1,…

oscar
- 1,636
- 6
- 31
- 59
2
votes
1 answer
How do I extract images from an odt document using Odf Toolkit?
First of all I'm very new to Java and programming generally, so apologies if my question or attempts at solving it are naive.
I'm trying to create a program which displays images, stored in an Open Document Text (.odt) document, in a Javax.Swing…

user5399283
- 51
- 8
2
votes
0 answers
Setting style on a paragraph using ODF toolkit simple-odf.0.8.1
This question has been already asked by another member in octobre 2014, but the incubating simple-odf.0.8.1 does not seem to solve the problem.
I'm trying to generate an ODF text document (*.odt), applying styles to the newly generated paragraphs.…

Pierre
- 21
- 3
2
votes
1 answer
Java Swing preview of a ODF word document
Does anyone know a way to embed an non-editable preview (like a print preview) of a odf writer document existing on the hard drive of the app host into a Java Swing GUI interface ?

RedCH
- 96
- 1
- 3
2
votes
1 answer
How can the Page Size, Page Orientation, and Page Margins of an ods Spreadsheet Be Set Using ODFDOM?
The Apache Incubation Project ODFDOM allows users to programmatically read and create various open document format files, including spreadsheets.
I am trying to set various print options for a spreadsheet I am creating, using their re-vamped "Simple…

romeara
- 1,426
- 1
- 17
- 26
2
votes
1 answer
How to print OpenDocument Text using OdfToolkit?
Can I print a ODF text document using OdfToolkit? Or is there a open source lib that provide this usability? I can't find any. Target machine must not have installed Open/Libre Office.
Alternatively how to print files using installed Open/Libre…

kbec
- 3,415
- 3
- 27
- 42
1
vote
0 answers
Java Odftoolkit: Copy header (with its style, tables etc) from an OpenOffice writer doc to another with ODFDOM
I couldn't find a way to copy the header from an OpenOffice writer doc to another with ODFDOM.
I tried this:
TextDocument docIntestazione = TextDocument.loadDocument("intestazione.odt");//the file with only the header
TextDocument docBody =…

bale
- 11
- 2
1
vote
0 answers
How to use version odfdom-java 0.10.0?
I've been studying ODF Toolkit to generate .odt files. This example Creating Text Documents Using ODFDOM runs when I use 0.8.6 version, but fails when I change to the newer version 0.10.0 (or even the 0.9.0).
Does anybody there know a site or…

Fred Guedes Pereira
- 11
- 2
1
vote
1 answer
get specific page of .odt document using java (odftoolkit)
OdfDocument odfDocument = OdfDocument.loadDocument(in);
int pages = odfDocument.getOfficeMetadata().getDocumentStatistic().getPageCount();
I am getting the total pages, but can't find a solution to get specific page of .odt document. Can you…

Hassan Ahmad
- 11
- 3
1
vote
1 answer
Formatting cells with Apache ODF Toolkit Simple API and Java
I need to create a ods document using the Apache ODF Toolking and to format the content of its cells.
I was able to set a format for dates and simple numbers, but for some reason when I try to format with scientific notation it does not work. It…

Enrico Scantamburlo
- 87
- 1
- 9
1
vote
2 answers
apache odftoolkit portrait/landscape mode
I'm using library apache odftoolkit to generate report from Java code to *.odt file. Have code like this:
outputOdt = TextDocument.newTextDocument();
Paragraph p = outputOdt.addParagraph("some text");
p.appendTextContent("some text");
I'm adding…

Vitaliy
- 11
- 4