Icepdf watermark removal method (recommended)

When using icepdf with font rack package to convert PDF to picture, there will be an official watermark. The watermark can be removed by decompilating the shelf package. You only need to modify the two classes in the shelf package.

1. First download the shelf package to icepdf.

2. Use the decompression software to decompress the jar file to get a folder named icepdf core.

3. Find 2 class files to be modified, use decompile software, and save them as java files.

Productinfo. In the icepdf core \ ORG \ icepdf \ core \ application folder Class file,

In the icepdf core \ ORG \ icepdf \ core \ objects \ graphics folder, click padding Class file.

4. Modify the contents of the two java files.

(1) Modify productinfo GetVersion () method in Java file to return an empty string.

(2)Padding. The java file needs to be modified in two places. One is to modify the top two character arrays to be empty.

The second is to add int definition in the second for loop of static statement block.

5. Compile the two java files into class files. Those with Java environment can be compiled directly with javac commands. (java files should be placed in the corresponding directory where the command is executed. In this example, the command is executed on Disk C, so java files should also be placed on Disk C, as shown in the following figure)

Note: (1) if there is an error in the red circle in the following figure when compiling, it is because the java file is UTF-8 coding. Open the java file in Notepad, save it as ANSI format, and then recompile.

(2) Compile padding The following error occurs in the java file because the dependent package is missing. Copy the org folder under the icepdf core folder extracted in step 2 to Disk C, and then recompile.

6. Finally, use the compression software to replace the two compiled classes into the jar file. That's OK!

The above icepdf watermarking method (recommended) is all the content shared by Xiaobian. I hope it can give you a reference and support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>