Date: prev next · Thread: first prev next last


Hello,

I'm trying to use the OdfTextDocument.insertDocument method to import a text document into another 
one. For example (Kotlin):

val odt = OdfTextDocument.newTextDocument();
val import = OdfTextDocument.loadDocument(Resources.getResourcePath("import.odt"))
odt.insertDocument(import, "newPath");
val file = Files.createTempFile("tmp_", ".odt").toFile();
odt.save(file)
Desktop.getDesktop().open(file)

Unfortunately, the resulting document stays empty. But the created odt-zip-file seems to contain 
the imported document in a subfolder named "newPath". It seems the subdocument has been created 
correctly, but main context.xml does not have any references to "newPath". Do I have to add 
additional nodes to refer to the imported document?

Best regards,
Gerald

eck*cellent IT GmbH

Standort Braunschweig
Theodor-Heuss-Stra?e 2
38122 Braunschweig
Tel.:  +49 (531) 70 22-20 00
Fax:   +49 (531) 70 22-22 99

Standort Dortmund
Emil-Figge-Stra?e 90
44227 Dortmund
Tel.:  +49 (231) 97 10-87 00
Fax:   +49 (231) 97 10-87 69

https://www.eckcellent-it.de
Zertifikat seit 2005 audit berufundfamilie(r)
Zertifizierung nach ISO 9001:2015

-------------------------------------------

Gesch?ftsf?hrung
Imo Hermes
Rebecca Labes

Registergericht: Amtsgericht Braunschweig
Handelsregisternummer: HRB 4631
Ust.-IdNr. DE 195 294 773

Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte Informationen enthalten. Wenn Sie 
nicht der richtige Adressat sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte 
sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail sind nicht gestattet.


This e-mail may contain confidential and/or privileged information. If you are not the intended 
recipient (or have received this e-mail in error) please notify the sender immediately and destroy 
this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is 
strictly forbidden.


-- 
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.