2013/3/1 Shemeer AT <[email protected]>
>
>
>
> Hello,
>
>
>
> I am new to this project.
>
> I would like to add one document in another document.
>
> How I can achieve this using java.
>
Yes, you can do this by the latest ODF Simple JAVA api. It's very easy,
here is the sample codes.
public void testinsertContentFromDocumentAfter() {
TextDocument src1 = TextDocument.loadDocument("SourceDocument.odt");
TextDocument target1 =
TextDocument.loadDocument("TargetDocument.odt");
Paragraph p1 = target1.getParagraphByIndex(2, true);
target1.insertContentFromDocumentAfter(src1, p1, false);
target1.save(ResourceUtilities.newTestOutputFile("TestInsertDocumentWithStyleAfter.odt"));
}
>
> Please help me.