WordprocessingMLPackage.FilterSettings filterSettings = new WordprocessingMLPackage.FilterSettings(); filterSettings.setRemoveProofErrors(true); filterSettings.setRemoveContentControls(true); filterSettings.setRemoveRsids(true); wmlPackage.filter(filterSettings);
@Deprecated // since its questionable whether this // is important enough to live in WordprocessingMLPackage, // and in any case probably should be replaced with a TraversalUtil // approach (which wouldn't involve marshal/unmarshall, and // so should be more efficient). public void filter( FilterSettings filterSettings ) throws Exception { if (filterTemplate==null) { // first use Source xsltSource = new StreamSource( org.docx4j.utils.ResourceUtils.getResource( "org/docx4j/openpackaging/packages/filter.xslt")); filterTemplate = XmlUtils.getTransformerTemplate(xsltSource); } transform(filterTemplate, filterSettings.getSettings() ); }
WordprocessingMLPackage.FilterSettings filterSettings = new WordprocessingMLPackage.FilterSettings(); filterSettings.setRemoveProofErrors(true); filterSettings.setRemoveContentControls(true); filterSettings.setRemoveRsids(true); wmlPackage.filter(filterSettings);
@Deprecated // since its questionable whether this // is important enough to live in WordprocessingMLPackage, // and in any case probably should be replaced with a TraversalUtil // approach (which wouldn't involve marshal/unmarshall, and // so should be more efficient). public void filter( FilterSettings filterSettings ) throws Exception { if (filterTemplate==null) { // first use Source xsltSource = new StreamSource( org.docx4j.utils.ResourceUtils.getResource( "org/docx4j/openpackaging/packages/filter.xslt")); filterTemplate = XmlUtils.getTransformerTemplate(xsltSource); } transform(filterTemplate, filterSettings.getSettings() ); }