Как установить цвет фона (цвет страницы) для документа Word (.doc или .docx) в Java?

Некоторые библиотеки, такие какhttp://poi.apache.org мы могли бы создатьдокумент Word с любым цветом текста, но дляфон или выделение текста, я не нашел никакого решения.

Цвет страницы для слова ручным способом !:

https://support.office.com/en-us/article/Change-the-background-or-color-of-a-document-6ce0b23e-b833-4421-b8c3-b3d637e62524

Вот мой основной код для создания текстового документа от poi.apache

        // Blank Document
        @SuppressWarnings("resource")
        XWPFDocument document = new XWPFDocument();
        // Write the Document in file system
        FileOutputStream out = new FileOutputStream(new File(file_address));
        // create Paragraph
        XWPFParagraph paragraph = document.createParagraph();
        paragraph.setAlignment(ParagraphAlignment.RIGHT);

        XWPFRun run = paragraph.createRun();
        run.setFontFamily(font_name);
        run.setFontSize(font_size);
        // This only set text color not background!
        run.setColor(hex_color);

        for (String s : text_array) {
            run.setText(s);
            run.addCarriageReturn();
        }

        document.write(out);
        out.close();

Ответы на вопрос(2)

Ваш ответ на вопрос