There are many examples and posts for adding a watermark to docx but are there any example/s of the opposite please.
I need to be able to remove any watermark from all sections of a document.
It is currently Mon Nov 25, 2024 3:16 am
java.lang.IllegalAccessError: Method 'java.lang.Class org.apache.xalan.extensions.ExtensionHandler.getClassForName(java.lang.String)' is inaccessible to class 'org.apache.xalan.extensions.ExtensionHandlerJavaPackage' (declaration of 'org.apache.xalan.extensions.ExtensionHandlerJavaPackage' appears in /data/app/~~ZVtmRtuHfRuZhq2toABrQA==/com.example.myapplication-ahlQie1BfblXFLdcJxSU1Q==/base.apk!classes3.dex)
File templateZip = new File("resources/doctest.docx")
WordprocessingMLPackage template = WordprocessingMLPackage.load(templateZip)
def map = ["pagebreak": "<w:r><w:br w:type=\"page\"/></w:r>"]
template.mainDocumentPart.variableReplace(map)
Total posts 10111 • Total topics 2842 • Total members 2074