Page 1 of 1

Issue while adding Webdings Text

PostPosted: Tue Feb 28, 2012 3:37 am
by sureshbabubv
Dear All,

While I try to add a text(special Character) using webdings as shown in the attachment, I am not getting the correct text.


Please advice me how to resolve this.

Thanks & Regards,
B.V.Suresh Babu.

Re: Issue while adding Webdings Text

PostPosted: Tue Feb 28, 2012 5:07 am
by sureshbabubv
Dear All,

I resolved this issue as shown belo.e

Code: Select all
    org.docx4j.wml.RPr objRpr1 = factory.createRPr();
                  RStyle rStyle1 = factory.createRStyle();
                  rStyle1.setVal("wipo-icon1");
                  objRpr1.setRStyle(rStyle1);
                  org.docx4j.wml.Text t1 = factory.createText();
                  t1.setValue("");
                  org.docx4j.wml.R run1 = factory.createR();
                  run1.setRPr(objRpr1);
                  run1.getContent().add(t1);
                  
                  paragraph.getContent().add(run1);



The style I used for "wipo-icon1" is as follows.


Code: Select all
<w:style w:type="character" w:customStyle="1" w:styleId="wipo-icon1">
      <w:name w:val="wipo-icon1" />
      <w:basedOn w:val="DefaultParagraphFont" />
      <w:rPr>
         <w:rFonts w:ascii="Webdings" w:hAnsi="Webdings" w:hint="default" />
         <w:sz w:val="24" />
         <w:szCs w:val="24" />
      </w:rPr>
   </w:style>



Thanks & Regards,
B.V.Suresh Babu.