When using icePDF with font rack package to convert pictures, there will be an official watermark. You can remove the watermark by decompiling the shelf package, just modify the two classes in the shelf package.
1. First download the package to the icepdf.
2. Use decompression software to decompress the jar file to obtain a folder named icepdf-core.
3. Find 2 class files to be modified, use decompile software, and save it as a java file.
In the ProductInfo.class file under the icepdf-core/org/icepdf/core/application folder,
The Padding.class file in the icepdf-core/org/icepdf/core/pobjects/graphics folder.
4. Modify the contents in the two java files.
(1) Modify the getVersion() method in the ProductInfo.java file to return an empty string.
(2) There are two places to be modified in the Padding.java file. One is to modify the top two characters array to be empty.
The second is to add an int definition to the second for loop of the static statement block.
5. Compile two java files into class files. Those with the java environment can directly use the javac command to compile. (Java files should be placed in the corresponding directory for executing the commands. In this example, the commands are executed on the c disk, so the java files should also be placed in the c disk, as shown in the figure below)
Note: (1) If the error in the red circle of the following image is compiled, it is because the java file is UTF-8 encoding problem, open the java file in Notepad, save it as ANSI format, and then recompile it.
(2) When compiling the Padding.java file, the following error was reported. Because of the lack of dependency packages, the entire org folder under the icepdf-core folder unzipped in step 2 was copied to the C disk and then recompiled.
6. Finally, use compression software to replace the two compiled classes into the jar file. This is OK!
The above method of removing watermarks from icePDF (recommended) is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.