Update CertSignController.java

This commit is contained in:
Ludy87 2025-05-02 19:36:29 +02:00
parent c66dc984c0
commit 89ddcd68d4
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -146,8 +146,8 @@ public class CertSignController {
summary = "Sign PDF with a Digital Certificate",
description =
"This endpoint accepts a PDF file, a digital certificate and related"
+ " information to sign the PDF. It then returns the digitally signed PDF"
+ " file. Input:PDF Output:PDF Type:SISO")
+ " information to sign the PDF. It then returns the digitally signed PDF"
+ " file. Input:PDF Output:PDF Type:SISO")
public ResponseEntity<byte[]> signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request)
throws Exception {
MultipartFile pdf = request.getFileInput();
@ -161,6 +161,7 @@ public class CertSignController {
String reason = request.getReason();
String location = request.getLocation();
String name = request.getName();
// Convert 1-indexed page number (user input) to 0-indexed page number (API requirement)
Integer pageNumber = request.getPageNumber() != null ? (request.getPageNumber() - 1) : null;
Boolean showLogo = request.getShowLogo();