Hi there!
Say I have some html, that I'm parsing using docx4j to write in .docx format to the output stream:
.....
<p>Blah blah blah</p>
<br/>
<p>Blah blah blah</p>
....
How do I get docx4j to treat the br tag as a page break?
Thanks
It is currently Sun Apr 27, 2025 7:30 am
risto45 wrote:What I'm doing is: I load docx file, replace some placeholders, generate some tables and convert the result into pdf.
Everything work fine on my development machine (running on Windows 7).
But now when I installed the same thing onto our test server (running on Linux CentOS), everything seems to work, pdf is generated and placeholders are replaced,
but all the russian characters are replaced with questionmarks. The doc contains both latin and russian letters. ...
Here you can suggest features you'd like to see added to docx4j, or vote for features already suggested.
The idea is to be able to prioritise development efforts.
Use your votes wisely...
If it is for pptx or xlsx components, please put or in the title. ...
private void addUnorderedListPoint(String text, int i) {
docx4jParagraph[i] = factory.createP();
org.docx4j.wml.Text t = factory.createText();
t.setValue(text);
org.docx4j.wml.R run = factory.createR();
run.getContent().add(t);
docx4jParagraph[i].getContent().add(run);
org.docx4j.wml.PPr ppr = factory.createPPr();
docx4jParagraph[i].setPPr( ppr );
PPrBase.Spacing space = new PPrBase.Spacing();
space.setAfter(BigInteger.ZERO);
space.setBefore(BigInteger.ZERO);
ppr.setSpacing(space);
NumPr numPr = factory.createPPrBaseNumPr();
ppr.setNumPr(numPr);
Ilvl ilvlElement = factory.createPPrBaseNumPrIlvl();
numPr.setIlvl(ilvlElement);
ilvlElement.setVal(BigInteger.valueOf(0));
NumId numIdElement = factory.createPPrBaseNumPrNumId();
numPr.setNumId(numIdElement);
numIdElement.setVal(BigInteger.valueOf(listNumber));
}
I have one last question and I'm pretty sure there's an easy fix, but Googling the problem hasn't seemed to help me. When I try and throw a JaxBException i'm getting a restriction:
Access restriction: The type JAXBException is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar
Did the recent Java package add some restriction to these elements? It occurs for all 4 javax.xml.bind libraries I attempt to import. Perhaps you've encountered this ...
Total posts 10160 • Total topics 2859 • Total members 2089