package com.renchunjie.cwh.main;
import com.renchunjie.cwh.bean.wordBean.*;
import com.renchunjie.cwh.bean.htmlBean.*;
import com.renchunjie.cwh.config.WordNumberConfig;
import com.renchunjie.cwh.utils.ProductNumFormat;
import org.docx4j.XmlUtils;
import org.docx4j.dml.wordprocessingDrawing.Inline;
import org.docx4j.jaxb.Context;
import org.docx4j.openpackaging.exceptions.Docx4JException;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.Part;
import org.docx4j.openpackaging.parts.PartName;
import org.docx4j.openpackaging.parts.WordprocessingML.*;
import org.docx4j.wml.*;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.jsoup.Jsoup;
import org.jsoup.select.Elements;
import javax.xml.bind.JAXBException;
import java.io.*;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.*;
public final class Cwh {
private String jurl = "/home/irmFiles/wordImg/";
private ObjectFactory factory = Context.getWmlObjectFactory();
private WordprocessingMLPackage wordMLPackage;
private HashMap<String,String> wordNumberFormat;
private HashMap<String,Integer> numberFormat_num;
private HashMap<String,String> numClass;
private ProductNumFormat productNumFormat;
private StyleDefinitionsPart styleDefinitionsPart;
private FontTablePart fontTablePart;
{
try {
styleDefinitionsPart = new StyleDefinitionsPart();
styleDefinitionsPart.setJaxbElement ((Styles) XmlUtils.unmarshalString("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><w:styles xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:sl=\"http://schemas.openxmlformats.org/schemaLibrary/2006/main\" mc:Ignorable=\"w14\"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:asciiTheme=\"minorHAnsi\" w:hAnsiTheme=\"minorHAnsi\" w:eastAsiaTheme=\"minorEastAsia\" w:cstheme=\"minorBidi\"/></w:rPr></w:rPrDefault></w:docDefaults><w:latentStyles w:count=\"260\" w:defQFormat=\"0\" w:defUnhideWhenUsed=\"1\" w:defSemiHidden=\"1\" w:defUIPriority=\"99\" w:defLockedState=\"0\"><w:lsdException w:qFormat=\"1\" w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"Normal\"/><w:lsdException w:qFormat=\"1\" w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 1\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 2\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 3\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 4\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 5\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 6\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"heading 7\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:name=\"heading 8\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:name=\"heading 9\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 1\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 2\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 3\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 4\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 5\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 6\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 7\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 8\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index 9\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 1\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 2\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 3\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 4\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 5\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 6\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 7\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 8\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toc 9\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"Normal Indent\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"footnote text\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"annotation text\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"header\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"footer\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"index heading\"/><w:lsdException w:qFormat=\"1\" w:uiPriority=\"0\" w:name=\"caption\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"table of figures\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"envelope address\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"envelope return\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"footnote reference\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"annotation reference\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"line number\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"page number\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"endnote reference\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"endnote text\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"table of authorities\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"macro\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"toa heading\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List Bullet\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List Number\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List 2\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List 3\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List 4\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List 5\"/><w:lsdException w:unhideWhenUsed=\"0\" w:uiPriority=\"0\" w:semiHidden=\"0\" w:name=\"List Bul
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
java实现docx文档在线编辑(docx转html,html转word,样式精准) (111个子文件)
Cwh.class 76KB
test.class 17KB
PPR.class 7KB
ProductNumFormat.class 7KB
TC.class 6KB
Table.class 5KB
TblPrWord.class 5KB
WordNumberConfig.class 5KB
RPR.class 5KB
Html.class 4KB
TblPrExWord.class 4KB
RprWord.class 4KB
TR.class 4KB
PprWord.class 3KB
ChineseNumToArabicNumUtil.class 3KB
TcWord.class 3KB
PPRFormat.class 3KB
TableWord.class 3KB
SectPrWord.class 2KB
Line.class 2KB
RWord.class 2KB
TrWord.class 2KB
WordAndHtmlConfig.class 2KB
Ind.class 1KB
IndWord.class 1KB
Cwh$1.class 1KB
PWord.class 1KB
cwh.iml 6KB
Cwh.java 91KB
test.java 17KB
ProductNumFormat.java 13KB
PPR.java 7KB
TblPrWord.java 5KB
TC.java 5KB
ChineseNumToArabicNumUtil.java 5KB
RPR.java 5KB
WordNumberConfig.java 4KB
TblPrExWord.java 4KB
Table.java 4KB
RprWord.java 3KB
Html.java 3KB
TR.java 2KB
PPRFormat.java 2KB
TcWord.java 2KB
PprWord.java 2KB
SectPrWord.java 2KB
Line.java 2KB
WordAndHtmlConfig.java 1KB
TableWord.java 1KB
TrWord.java 1KB
RWord.java 1KB
Ind.java 967B
IndWord.java 603B
PWord.java 487B
workspace.xml 44KB
pom.xml 2KB
Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml 662B
Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml 655B
Maven__com_fasterxml_jackson_core_jackson_annotations_2_7_0.xml 644B
Maven__com_fasterxml_jackson_core_jackson_databind_2_7_3.xml 623B
compiler.xml 618B
Maven__org_apache_xmlgraphics_xmlgraphics_commons_2_1.xml 614B
Maven__com_fasterxml_jackson_core_jackson_core_2_7_3.xml 595B
Maven__org_apache_xmlgraphics_batik_transcoder_1_9.xml 593B
Maven__org_apache_xmlgraphics_batik_extension_1_9.xml 586B
Maven__org_apache_xmlgraphics_batik_constants_1_9.xml 586B
Maven__org_apache_xmlgraphics_batik_awt_util_1_9.xml 579B
Maven__org_apache_httpcomponents_httpclient_4_5_2.xml 577B
Maven__org_docx4j_docx4j_ImportXHTML_3_3_6.xml 573B
Maven__org_apache_xmlgraphics_batik_svg_dom_1_9.xml 572B
Maven__org_apache_xmlgraphics_batik_parser_1_9.xml 565B
Maven__org_apache_xmlgraphics_batik_svggen_1_9.xml 565B
Maven__org_apache_xmlgraphics_batik_script_1_9.xml 565B
Maven__org_apache_xmlgraphics_batik_bridge_1_9.xml 565B
Maven__org_apache_httpcomponents_httpcore_4_4_4.xml 563B
Maven__org_docx4j_docx4j_export_fo_3_3_6.xml 559B
Maven__org_apache_commons_commons_lang3_3_4.xml 556B
Maven__org_apache_xmlgraphics_batik_i18n_1_9.xml 551B
Maven__org_apache_xmlgraphics_batik_util_1_9.xml 551B
Maven__org_apache_xmlgraphics_batik_anim_1_9.xml 551B
Maven__org_slf4j_jcl_over_slf4j_1_7_21.xml 548B
Maven__org_apache_xmlgraphics_batik_dom_1_9.xml 544B
Maven__org_apache_xmlgraphics_batik_ext_1_9.xml 544B
Maven__org_apache_xmlgraphics_batik_xml_1_9.xml 544B
Maven__org_apache_xmlgraphics_batik_css_1_9.xml 544B
Maven__org_apache_xmlgraphics_batik_gvt_1_9.xml 544B
Maven__commons_codec_commons_codec_1_10.xml 543B
Maven__org_antlr_stringtemplate_3_2_1.xml 541B
Maven__org_docx4j_xhtmlrenderer_3_0_0.xml 538B
Maven__org_antlr_antlr_runtime_3_5_2.xml 534B
Maven__org_apache_pdfbox_fontbox_2_0_4.xml 524B
Maven__org_plutext_jaxb_xslfo_1_0_1.xml 521B
Maven__org_plutext_jaxb_svg11_1_0_2.xml 521B
Maven__net_engio_mbassador_1_2_4_2.xml 520B
Maven__org_slf4j_slf4j_api_1_7_21.xml 513B
Maven__commons_io_commons_io_2_4.xml 503B
Maven__org_apache_xmlgraphics_fop_2_2.xml 502B
Maven__xml_apis_xml_apis_1_0_b2.xml 502B
Maven__com_google_guava_guava_19_0.xml 499B
Maven__xalan_serializer_2_7_2.xml 497B
共 111 条
- 1
- 2
资源评论
- 小鹏求知2020-06-09解析内容有限,有的解析报错,学习可以,如果要直接用的话,不建议下载,总之不值这个分
婷豆
- 粉丝: 10
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功