Posts

Showing posts from February, 2023

C#/VB.NET: How to Add Header and Footer in Word Documents

Image
  Often, the header displays additional information about the document at the top of each page. Inserting time, graphics, company microlabels, document titles, file names, or author names is possible. Footer is the area at the bottom of each page in the document. It is often used to display additional information about the document. You can insert text or graphics into the footer. The purpose of today's article is to show you how to add headers and footers to Word documents programmatically. For your reference, I have attached C#/VB.NET code with the ideas and methods I have sorted out. Programming Environment In this test, Free Spire.Doc for .NET is introduced into the program. The Spire.Doc.dll file can be referenced by: Method 1: Download Free Spire.Doc for .NET locally, unzip it, and install it. After the installation is complete, find Spire.Doc.dll in the BIN folder under the installation path. Then open the "Solution Explorer" in Visual Studio, right-click ...

How to Change Font Color in Word via Java

Image
To make it easier for readers to grasp the main points of an article, we sometimes need to modify the color of the font to highlight the key points. This article will explain how to change the font color in Word programmatically. To explain how to do this, this article will be divided into two parts.I have attached the C#/VB.NET code for your reference, along with the steps I took to sort things out.     Change Font Color of a Paragraph     Change Font Color of a Specific Text 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. Method 1: Introduced manually. Download Free Spire.Doc for Java locally, unzip it, and find the Spire.Doc.jar file in the lib folder. Open the following interface in IDEA, and import the jar file in the local path into the Java program: Method 2: If you use Maven , you can easily import the JAR file in your ap...

How to Convert OpenDocument Presentation (.odp) to PDF via Java Application

Image
  OpenDocument Format (ODF) is a document file format that contains OpenDocument presentations. It consists of a collection of pages (slides) containing text, graphics and multimedia content, which can be displayed in front of an audience in a controlled manner. But at work, you may need to convert it to a PDF document. Today I will introduce a method for you to convert ODP documents to PDF format quickly and efficiently. The following are the steps and methods I have organized, and the Java code is attached for your reference. OK, here we go. Programming Environment First, you’re required to add the Spire.Presentation.jar file as a dependency in your Java program. The JAR file can be downloaded from this link. Method 1: Introduced manually. Download Free Spire. Presentation for Java locally, unzip it, and find the Spire. Presentation .jar file in the lib folder. Open the following interface in IDEA, and import the jar file in the local path into the Java program: Metho...