styles - Relationship problem

Hi all.
I have a small problem with setting bold font style in document.
I have WordprocessingMLPackage this.wmlPack and I'm trying this:
But log says this:
Loading part /word/styles.xml
Convenience method established from /word/document.xml to /word/styles.xml
.. added.
No relationships word/_rels/styles.xml.rels
word/styles.xml false
[Content_Types].xml false
word/_rels/document.xml.rels false
word/document.xml false
_rels/.rels false
Could you advise me please, how correctly use bold, underline or italic font in document?
I'm using docx4j v2.0 release.
Thanks, Bob.
I have a small problem with setting bold font style in document.
I have WordprocessingMLPackage this.wmlPack and I'm trying this:
- Code: Select all
P p = this.wmlPack.getMainDocumentPart().createParagraphOfText("text");
BooleanDefaultTrue b = new BooleanDefaultTrue();
b.setVal(true);
p.getPPr().getRPr().setB(b);
this.wmlPack.getMainDocumentPart().addObject(p);
But log says this:
Loading part /word/styles.xml
Convenience method established from /word/document.xml to /word/styles.xml
.. added.
No relationships word/_rels/styles.xml.rels
word/styles.xml false
[Content_Types].xml false
word/_rels/document.xml.rels false
word/document.xml false
_rels/.rels false
Could you advise me please, how correctly use bold, underline or italic font in document?
I'm using docx4j v2.0 release.
Thanks, Bob.