Hi,
I am trying to use the below code and insert template inside a template using the three import format modes, But i don’t see any difference in the generated files. Wanted to know the exact use case of the three options. Please find the attached generated files and also see the below code snippet.
Document doc = new Document("C:\\IDM\\SummaryTotal\\fixed\\EmbedTemplates\\MainTemplate.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToDocumentEnd();
builder.insertBreak(BreakType.PAGE_BREAK);
Document docToInsert = new Document("C:\\IDM\\SummaryTotal\\fixed\\EmbedTemplates\\SubTemplate.docx");
builder.insertDocument(docToInsert, ImportFormatMode.USE_DESTINATION_STYLES);
builder.getDocument().save("C:\\IDM\\SummaryTotal\\fixed\\EmbedTemplates\\Generated_UDS.docx");
Generated_KDS.docx (10.3 KB)
Generated_KSF.docx (10.3 KB)
Generated_UDS.docx (10.3 KB)
MainTemplate.docx (12.8 KB)
SubTemplate.docx (12.1 KB)