i am using docx4j to convert an word document to HTML ,i want to know if there are a way to convert just a page of the document.
For example in my application i want convert just the third page of document to HTML not the entire document.
It is currently Sun Jun 22, 2025 12:03 am
public static void main(String[] args) throws Exception {
String inputfilepath = System.getProperty("user.dir") + "/checkbox.docx";
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File(inputfilepath));
template = WordprocessingMLPackage.load(this.getClass().getClassLoader().getResourceAsStream(templatePath));
MainDocumentPart documentPart = template.getMainDocumentPart();
documentPart.addStyledParagraphOfText("Heading1", "test1");
documentPart.addStyledParagraphOfText("Heading1", "test2");
documentPart.addStyledParagraphOfText("Heading1", "test3");
Total posts 10181 • Total topics 2864 • Total members 2095