Verify if a PowerPoint Document is Digitally Signed Using Java

Import JAR Dependency (2 Methods)

<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation.free</artifactId>
<version>5.1.0</version>
</dependency>
</dependencies>

Steps and Sample Code

  • Create a Presentation instance.
  • Load a PowerPoint document using Presentation.loadFromFile() method.
  • Detect if the document is digitally signed or not using Presentation.isDigitallySigned() method.
import com.spire.presentation.Presentation;

public class VerifyIfPPTisDigitallySigned {
public static void main(String []args) throws Exception {
//Create a Presentation instance
Presentation ppt = new Presentation();
//Load a PowerPoint document
ppt.loadFromFile("DigitalSignature.pptx");

//Verify if the document is digitally signed or not
if (ppt.isDigitallySigned()) {
System.out.println("This document is digitally signed");
} else {
System.out.println("This document is not digitally signed");
}
}
}

--

--

--

Sharing Java Code

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Get Testnet NMT

The Simplest Guide to Building a Stock Backtester in Python

CS373 Fall 2021: Entry #5

Spring vs Spring Boot: A Comparison of Frameworks

Defining and fine tuning an API in Laravel with the Stoplight Platform

Yes, I am a fullstack developer.

Why you should care about the Scope of the bean in your Spring boot app

The only line of code you need for dark mode.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Wilson

Andrew Wilson

Sharing Java Code

More from Medium

Add Transitions to Powerpoint Slides in Java

Continuous Integration & Delivery with a Java Build Pipeline

Singleton Pattern

Spring Cloud Gateway with logs