当前位置: 首页 > 知识库问答 >
问题:

生成来自HTML的docx,带有带有docx4j的Base64图像

卫甫
2023-03-14

我试图生成一个. docx从超文本标记语言字符串与docx4j在Java,其中包含Base64图像里面。目前,我能够生成Word并下载它(在一个Vaadin项目内),但图像没有正确插入。但是,如果我把超文本标记语言代码放入index.html页面,它们确实显示正确!

我使用的代码是这样的:

try{
    String html = "<html xmlns='http://www.w3.org/1999/xhtml'><head><style type='text/css'>.p-nombreProceso {   font-family: Arial;     font-size: 48px;    color: magenta;     text-align: center; } .li-seccion {     font-family: Arial; } .a-seccion {  font-family: Arial; } .p-tituloSeccion {    font-family: Arial;     font-size: 18px;    color: #e06666; } .p-subtitulo {    font-family: Arial;     font-size: 16px;    color: #434343;     font-weight: bold; } .p-subtitulo2 {    font-family: Arial;     font-size: 14px;    color: #434343;     font-weight: bold; } .table-default {   width: 100%;    border: none;   empty-cells: show; } .th-default {  background: #e06666;    text-align: center;     vertical-align: middle;     height: 30px;   font-family: Arial;     font-size: 14px;    color: white;   font-weight: bold; } .td-default-par {  background: #e0bbbb;    text-align: center;     vertical-align: middle;     height: 30px;   font-family: Arial;     font-size: 12px;    color: black; } .td-default-impar {     color: black; } .img-default {  margin: 0 auto;     display: block;     height: auto;   max-width: 100%; } .img-diagrama {  margin: 0 auto;     display: block;     height: auto;   max-width: 100%; } </style><meta content='text/html' http-equiv='Content-Type' charset='UTF-8'></head><body bgcolor='#F0F0F0' style='margin:10px'><div style='margin:auto;padding:10px;background-color:white;width:700px;'><p class='p-nombreProceso'>Comenzar el día</p><ol class='olIndice'><li class='li-seccion'><a class='a-seccion' href='#descripcionDelProceso'>DESCRIPCIÓN DEL PROCESO</a></li><li class='li-seccion'><a class='a-seccion' href='#duenoDelProceso'>DUEÑO DEL PROCESO</a></li><li class='li-seccion'><a class='a-seccion' href='#participantes'>PARTICIPANTES</a></li><li class='li-seccion'><a class='a-seccion' href='#diagramaDelProceso'>DIAGRAMA DEL PROCESO</a></li><li class='li-seccion'><a class='a-seccion' href='#catalogoDeElementos'>CATÁLOGO DE ELEMENTOS</a></li><li class='li-seccion'><a class='a-seccion' href='#actividades'>ACTIVIDADES</a></li></ol><a name='descripcionDelProceso'><p class='p-tituloSeccion'>1. DESCRIPCIÓN DEL PROCESO</p></a><div><p><span style='background-color:transparent; color:#434343; font-family:arial; font-size:15px'>Phasellus ut arcu ut nulla dignissim auctor. Etiam sed elit sed diam tempus consectetuer. Proin dignissim, velit a gravida elementum, metus tellus dictum mauris, quis auctor est lectus in sapien. Fusce diam arcu, ultricies non, ullamcorper feugiat, semper quis, tortor. Phasellus egestas feugiat augue. Vestibulum nec wisi. Vivamus lacus wisi, tincidunt quis, vulputate sit amet, placerat vitae, massa.</span></p>  <p><span style='background-color:transparent; color:#434343; font-family:arial; font-size:15px'>Nullam tortor. Fusce malesuada. Quisque dolor mauris, malesuada quis, ultricies non, interdum blandit, lectus. Etiam nulla lacus, nonummy a, blandit sed, pellentesque eget, arcu. Phasellus id pede. Vivamus tortor nibh, tempus auctor, interdum a, faucibus ut, mi. Aliquam tincidunt turpis eleifend orci. Mauris at odio vel metus ullamcorper blandit. Nullam tortor.</span></p> </div><a name='duenoDelProceso'><p class='p-tituloSeccion'>2. DUEÑO DEL PROCESO</p></a><p class='duenoProceso'>santiago.cotto</p><a name='participantes'><p class='p-tituloSeccion'>3. PARTICIPANTES</p></a><a name='diagramaDelProceso'><p class='p-tituloSeccion'>4. DIAGRAMA DEL PROCESO</p></a><div style='width:100%'><img alt='' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAxsAAAEVCAYAAACIS/iQAAA1oElEQVR42u3dCXwV5bnH8VPASpVaei0gghBcWAoKSimgrIqKFxC8YqUgFSEgCIrIqoBilc2oCIhCEsIWSEICCQRkCYtsWkQihbIVkE1CWEMIEJHlvfMMM8fJyXJOcvbw+34+zyc5+znDvMzzz8w7x2YLMgfV2tKb0z55dWbqP9aFrXs6c9DiOld6x1dR3WPKq17z774+IKnG5fdWNvrx43VPRY9f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2XvgezYAAAAQqEZo9ZKtgD0YxSFseKNkXoh5uls5UxRf6gcAAAB4yM0eNmSPiMz7kJLgQdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACBsUYQMAAACEDYqwAQAAAMIGRdgAAAAACqnX+MhfTmdcpdm+yUvWgZ7jIq8xIgAAAOAxvT+auSV1TxoN901e2/efUK99FLWdEQEAAACP6TEm8oN5Kzen03Df3DV/deqpnuPCwxgRAAAA8Jieo8Pr9f141umMzGs03TdxvfnZnLTQ8RGNGBEAAADwqNCxEcsSVm09QtN9c9aCNT8cDh0XuYqRAAAAAI/rNWZazVfHR57a9t/0DJrvm6t2HzpzUf7te4yOrMNIAAAAgFf0HBveqk9Y1JEf/nv8NE34zVG7Dp45+1pY1NGeY8LbMgIAAADg9cDRc1zkmRlLNq1nDkfxrjnLN2/qNS7iBEEDAAAAPiOHVMkcjt4fRR2bHL9q5Tf/PvTD6XNXs2nQg/x7NLR/wy27fto6NXHdyj4fR+3T/o1TOHQKAAAAfiFnqZLT4vYYG7lBa0yz5dulqaCuK6FjIrbI6W056xQA/Or/AfO4VdP0NnkcAAAAAElFTkSuQmCC' class='img-diagrama'/></div><a name='catalogoDeElementos'><p class='p-tituloSeccion'>5. CATÁLOGO DE ELEMENTOS</p></a><p class='p-subtitulo'>ACTIVIDADES</p><table cellspacing='0' cellpadding='0' class='table-default'><thead class='thead-default'><tr class='tr-default'><th class='th-default'>ACTIVIDAD</th><th class='th-default'>DESCRIPCIÓN</th><th class='th-default'>RESPONSABLE</th></tr></thead><tbody class='tbody-default'><tr class='tr-default'><td class='td-default-impar' rowspan='1'>Despertar</td><td class='td-default-impar' rowspan='1'>Abrir los ojos y tomar conciencia áéíóúñ</td><td class='td-default-impar'></td></tr><tr class='tr-default'><td class='td-default-par' rowspan='1'>Desayunar</td><td class='td-default-par' rowspan='1'>Desayuno nutritivo</td><td class='td-default-par'></td></tr><tr class='tr-default'><td class='td-default-impar' rowspan='1'>Volver a dormir</td><td class='td-default-impar' rowspan='1'>Vuelvo a cerrar los ojos y sigo durmiendo</td><td class='td-default-impar'></td></tr><tr class='tr-default'><td class='td-default-par' rowspan='1'>Ir a trabajar</td><td class='td-default-par' rowspan='1'>Ir al trabajo a continuar el día</td><td class='td-default-par'></td></tr></tbody></table><p class='p-subtitulo'>EVENTOS</p><table cellspacing='0' cellpadding='0' class='table-default'><thead class='thead-default'><tr class='tr-default'><th class='th-default'>EVENTO</th><th class='th-default'>DESCRIPCIÓN</th></tr></thead><tbody class='tbody-default'><tr class='tr-default'><td class='td-default-impar'></td><td class='td-default-impar'>Evento de comienzo</td></tr><tr class='tr-default'><td class='td-default-par'></td><td class='td-default-par'>Evento de cierre</td></tr></tbody></table><p class='p-subtitulo'>GATEWAYS</p><table cellspacing='0' cellpadding='0' class='table-default'><thead class='thead-default'><tr class='tr-default'><th class='th-default'>GATEWAYS</th><th class='th-default'>DESCRIPCIÓN</th></tr></thead><tbody class='tbody-default'><tr class='tr-default'><td class='td-default-impar'>¿Seguir durmiendo?</td><td class='td-default-impar'>Evalúo si puedo seguir durmiendo o debo levantarme</td></tr></tbody></table><a name='actividades'><p class='p-tituloSeccion'>6. ACTIVIDADES</p></a><p class='p-subtitulo'>Despertar</p><p class='descripcionActividades'></p><p class='p-subtitulo'>Desayunar</p><p class='descripcionActividades'></p><p class='p-subtitulo'>Volver a dormir</p><p class='descripcionActividades'></p><p class='p-subtitulo'>Ir a trabajar</p><div><p><strong>Dependiendo</strong> <u>c&oacute;mo est&eacute;</u> el d&iacute;a, y <u>cuanto tiempo tenga</u> para llegar al trabajo, puedo ir de alguna de las siguientes maneras:</p> </div><p></p><div><p>Otra opciones posibles podr&iacute;an ser:</p>  <ul>     <li>Ir en auto</li>     <li>Ir en taxi</li>     <li>Ir en bicicleta</li> </ul>";
    WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
    AlternativeFormatInputPart afiPart = new AlternativeFormatInputPart(new PartName("/hw.html"));
    afiPart.setBinaryData(html.getBytes());
    afiPart.setContentType(new ContentType("text/html"));
    Relationship altChunkRel = wordMLPackage.getMainDocumentPart().addTargetPart(afiPart);

    // .. the bit in document body
    CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk();
    ac.setId(altChunkRel.getId() );
    wordMLPackage.getMainDocumentPart().addObject(ac);

    // .. content type
    wordMLPackage.getContentTypeManager().addDefaultContentType("html", "text/html");
    SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    saver.save(byteArrayOutputStream);
    return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
}catch(Exception ex){
    return new ByteArrayInputStream(new String("ERROR: " + ex.getMessage()).getBytes());
}

有没有什么特别的工作应该做,而我没有做?

编辑:

我现在可以插入图片了!用以下代码替换WordprocessingMLPackage wordMLPackage行下方和SaveToZipFile saver行上方的代码:

StringReader strR = new StringReader(html);
Tidy tid = new Tidy();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
tid.parse(strR, baos);
html = baos.toString();
XHTMLImporterImpl xHTMLImporter = new XHTMLImporterImpl(wordMLPackage);
wordMLPackage.getMainDocumentPart().getContent().addAll(xHTMLImporter.convert(html, null));

但是现在,编码不能正常工作:比如


共有1个答案

闻人德庸
2023-03-14

问题出在Word而不是docx4j上。

当涉及到导入XHTML时,Microsoft Word不支持嵌入数据。如果您将html字符串保存在单独的超文本标记语言文件中,并尝试在Word中打开它,您将看到它将文件带入其格式存在,但图像已损坏。

更好的解决方案是,您的代码“本机”导入XHTML(而不是作为AltChunk:@JasonPlutext在他的评论中提供了一个这样做的链接),然后使用自定义代码导入图像:即提取和解码Base64内容,这样您就有了二进制数据,然后使用docx4j API(BinaryPartAbstractImage.createImagePart()或类似工具)将其输入Word。

 类似资料:
  • 我正在使用Docx4j Version3将docx转换为html。 文档包含由制表符、空格和换行符组成的空白。生成的HTML要么具有无法识别的字符,要么根本不保留空白。 谢谢你。

  • 我正在尝试使用DOCX4j、Java11、Spring Boot2.3.5、Ubuntu18.04.5将DOCX转换为HTML,我正在Tomcat9上运行我的.war文件。 当我运行代码时,我得到这个错误。我怎么才能修好这个? 我的代码 编辑:我试着在Tomcat9、Windows10上运行同样的战争,一切都正常。有趣...但是如何在Linux-Tomcat上解决这个问题呢?(检查了tomcat/

  • 我正在用docx4j做我的第一个项目。。。以https://github.com/plutext/docx4j/blob/master/docx4j-samples-docx4j/src/main/java/org/docx4j/samples/ConvertOutHtml.java我得到一个html文件,其中的图像链接到一个外部目录。是否可以将图像以base64格式直接嵌入html文件中?此外,

  • 我有带有图表的示例docx: 例 当我运行示例项目时:组织.docx4j.samples.转换输出PDF 我有空的pdf。 如何将带有图表的docx转换为pdf?我需要一个免费的工具/库。

  • 我想用apache poi转换一个docx到pdf,docx是用Docx4j正确生成的。对于简单的文档,转换很好,但是当我想转换一个更风格化的文档时,POI抛出了一个异常: org.apache.xmlbeans.impl.values.xmlvalueOutoFrangeException:union value'0000ff“>http://schemas.openxmlformats.org