We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Sign pdf document with LTV enabled


I’m using aspose pdf for java 21.4 to sign documents.

Although I enable to use LTV, the generated file shows that LTV is not enabled.

This is my code:

Document doc = new Document("/Users/lmunoz/Desktop/pruebas/docprueba.pdf");
PdfFileSignature signature = new PdfFileSignature(doc);
PKCS7 pkcs = new PKCS7("/apps/aspose/Direccion.pfx", "XXXXXXX");
Rectangle rect = new Rectangle(100, 600, 400, 100);
signature.sign(1, true, rect, pkcs);
signature.save("/apps/aspose/Digitally Signed PDF.pdf");

Document doc2 = new Document("/apps/aspose/Digitally Signed PDF.pdf");
PdfFileSignature signature2 = new PdfFileSignature(doc2);
System.out.println("LTV enabled: " + signature2.isLtvEnabled());

The system.out checks “true” but if I open the pdf, it is not enabled, like I show you in the image. SignedLTVDisabled.png (8.0 KB)

How can I get LTV enabled?



Can you please share the source PDF and pfx file so that we may try to reproduce the same on our end.


I share the original pdf file docprueba.pdf (33.0 KB) and the signed one (Digitally Signed PDF.pdf (91.9 KB)) but not the pxf file because it’s an oficial one. I think any pfx is valid to reproduce this case.

My pfx is valid until 2022/03/22.



I have been able to reproduce the issue on our end. A ticket with ID PDFJAVA-40526 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.