Skip to content

Commit

Permalink
Added converting alt chunks #152
Browse files Browse the repository at this point in the history
  • Loading branch information
Desire456 committed Jul 20, 2021
1 parent 32ef277 commit 77906d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ protected void saveAndClose() {
outputStream.flush();
}
} else if (ReportOutputType.html.equals(outputType)) {
convertAltChunks();
if (documentConverter != null) {
convertAltChunks();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
writeToOutputStream(wordprocessingMLPackage, bos);
documentConverter.convertToHtml(DocumentConverter.FileType.DOCUMENT, bos.toByteArray(), outputStream);
outputStream.flush();
} else {
HTMLSettings htmlSettings = Docx4J.createHTMLSettings();
htmlSettings.setWmlPackage(wordprocessingMLPackage);
htmlSettings.setOpcPackage(wordprocessingMLPackage);
Docx4J.toHTML(htmlSettings, outputStream, Docx4J.FLAG_NONE);
outputStream.flush();
}
Expand Down

0 comments on commit 77906d1

Please sign in to comment.