mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Update CertSignController.java
This commit is contained in:
parent
c66dc984c0
commit
89ddcd68d4
@ -146,8 +146,8 @@ public class CertSignController {
|
|||||||
summary = "Sign PDF with a Digital Certificate",
|
summary = "Sign PDF with a Digital Certificate",
|
||||||
description =
|
description =
|
||||||
"This endpoint accepts a PDF file, a digital certificate and related"
|
"This endpoint accepts a PDF file, a digital certificate and related"
|
||||||
+ " information to sign the PDF. It then returns the digitally signed PDF"
|
+ " information to sign the PDF. It then returns the digitally signed PDF"
|
||||||
+ " file. Input:PDF Output:PDF Type:SISO")
|
+ " file. Input:PDF Output:PDF Type:SISO")
|
||||||
public ResponseEntity<byte[]> signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request)
|
public ResponseEntity<byte[]> signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
MultipartFile pdf = request.getFileInput();
|
MultipartFile pdf = request.getFileInput();
|
||||||
@ -161,6 +161,7 @@ public class CertSignController {
|
|||||||
String reason = request.getReason();
|
String reason = request.getReason();
|
||||||
String location = request.getLocation();
|
String location = request.getLocation();
|
||||||
String name = request.getName();
|
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;
|
Integer pageNumber = request.getPageNumber() != null ? (request.getPageNumber() - 1) : null;
|
||||||
Boolean showLogo = request.getShowLogo();
|
Boolean showLogo = request.getShowLogo();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user