Posts

Showing posts from August, 2022

Java: Add Watermark to PDF

Image
In daily work and study, the popularization of PDF has brought great convenience for people, but at the same time, a lot of problems have occurred. It is easy to copy and spread the PDF documents, which makes the copyrights difficult to protect. It is also hard to distinguish information in the mass of files, for example, have you ever opened a folder with so many PDF documents used the same name? Even you cannot tell which one is the final modified version. Using watermarks can solve these problems for you now.   This article will be divided two parts to demonstrate how to  add watermark to PDF  in Java applications.    Add Text Watermark Add Image Watermark Programming Environment  First of all, you're required to add the Free Spire.PDF.jar file as a dependency in your Java program. The JAR file can be downloaded from  this link . If you use Maven, you can easily import the JAR file in your application by adding the following code to your project's p...

Replace the existing image on the PDF file in C#/VB.NET

Image
  To err is human and when it comes to documentation, we all can make mistakes. Modern day documents are mostly shared in the PDF format and contain lots of visuals and images. However, there will be times when you may wish to replace an image in the PDF document due to an error pasting the image or otherwise. In this article, I will take a detailed look at the methods for replacing the existing image on the PDF file. To achieve this functionality, you just need to follow a few simple steps. Read on for more information.   Programming Environment   In this test, Free Spire.PDF for .NET is introduced into the program. The Spire.PDF.dll file can be referenced by:   Method 1: Download Free Spire.PDF for .NET locally, unzip it, and install it. After the installation is complete, find Spire.PDF.dll in the BIN folder under the installation path. Then open the "Solution Explorer" in Visual Studio, right-click "References", "Add Reference", and add a r...

Java: Remove Duplicate Values When Merging Cells in Word

Image
     Tables can express content systematically, concisely, and centrally, and have strong logic and contrast. A simple and clear table can make complex data files clear at a glance, so the repeated values in the table are unnecessary, we can delete the repeated values and merge the cells to achieve a clear and concise effect. So today I will show you how to delete duplicate values when merging cells in a Word document through code in a Java program. The following are the steps I have organized, and the Java code is attached for your reference. Programming Environment First, you’re required to add the Spire.Doc.jar file as a dependency in your Java program. The JAR file can be downloaded from this link . If you use Maven, you can easily import the JAR file in your application by adding the following code to your project’s pom.xml file. <repositories>         <repository>         ...