Apache docx CreateWatermark Set font in text oR CTTextPath setstyle remove double/single quotes

夙愿已清 提交于 2021-01-28 19:05:00

问题


I am using the code from here by extending this calss https://svn.apache.org/viewvc/poi/tags/REL_3_17_FINAL/src/ooxml/java/org/apache/poi/xwpf/model/XWPFHeaderFooterPolicy.java?view=markup#l416

COde from this :CTTextPath shapeTextPath = shape.addNewTextpath(); shapeTextPath.setStyle("font-family:"Cambria";font-size:1pt");

Tried various combination and permutation but in the end in xml it removes it and prints like :

<v:textpath style="font-family:Cambria;font-size:1pt" string="test"/>

Any help is needed. should be like this

<v:textpath style="font-family:'Cambria';font-size:1pt" string="test"/>

来源:https://stackoverflow.com/questions/63056200/apache-docx-createwatermark-set-font-in-text-or-cttextpath-setstyle-remove-doubl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!