Привет Есть конвертер с docx на pdf на java public byte[] convertDocxBytesToPDF(byte[]…
- User
Привет Есть конвертер с docx на pdf на java public byte[] convertDocxBytesToPDF(byte[] docxBytes) { WordprocessingMLPackage wordMLPackage; try { wordMLPackage = WordprocessingMLPackage.load(new ByteArrayInputStream(docxBytes)); if (wordMLPackage.getMainDocumentPart().getEndNotesPart() != null) { wordMLPackage.getMainDocumentPart().getRelationshipsPart().removePart( wordMLPackage.getMainDocumentPart().getEndNotesPart().getPartName() ); wordMLPackage.getMainDocumentPart().getEndNotesPart().remove(); } ByteArrayOutputStream pdfOut = new ByteArrayOutputStream(); Docx4J.toPDF(wordMLPackage, pdfOut); return pdfOut.toByteArray(); } catch (Docx4JException e) { throw new RuntimeException("Ошибка при конвертации шаблона в PDF", e); } }
но выдает такие сообщения в логах
Only left/first-line indentation is handled at present
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.