slovensko-digital / autogram

Nový, krajší a lepší nástroj na podpisovanie.
European Union Public License 1.2
113 stars 20 forks source link

Hromadné podpísanie PDF mandátnym certifikátom nefunguje (asi na Mac OS) #383

Closed celuchmarek closed 7 months ago

celuchmarek commented 10 months ago

Mali sme hlásaené, že hromadný podpis PDF na Macu so Starcos 3.7 kartou nefunguje s error hláškou nižšie. Rovnako to hlásil aj Ahmed.

@alhafoudh písal k release v2.1.2:

macos (m3 mac) hromadny podpis skoncil s chybou, podpisal 0/8 dokumentov

==============

Príloha č. 9.pdf

Error:
digital.slovensko.autogram.core.errors.UnrecognizedException: eu.europa.esig.dss.model.DSSException: Unable to save a document. Reason : Can't write signature, not enough space; adjust it with SignatureOptions.setPreferredSignatureSize
  at digital.slovensko.autogram.core.errors.AutogramException.createFromDSSException(AutogramException.java:66)
  at digital.slovensko.autogram.core.Autogram.signCommonAndThen(Autogram.java:106)
  at digital.slovensko.autogram.core.Autogram.lambda$batchSign$18(Autogram.java:161)
  at digital.slovensko.autogram.ui.gui.GUI.onWorkThreadDo(GUI.java:429)
  at digital.slovensko.autogram.core.Autogram.batchSign(Autogram.java:159)
  at digital.slovensko.autogram.ui.BatchGuiFileResponder.onBatchStartSuccess(BatchGuiFileResponder.java:66)
  at digital.slovensko.autogram.core.AutogramBatchStartCallback.handleSuccess(AutogramBatchStartCallback.java:42)
  at digital.slovensko.autogram.core.AutogramBatchStartCallback.accept(AutogramBatchStartCallback.java:24)
  at digital.slovensko.autogram.core.AutogramBatchStartCallback.accept(AutogramBatchStartCallback.java:9)
  at digital.slovensko.autogram.ui.gui.BatchDialogController.lambda$onMainButtonPressed$0(BatchDialogController.java:81)
  at java.base/java.lang.Thread.run(Unknown Source)
Caused by: eu.europa.esig.dss.model.DSSException: Unable to save a document. Reason : Can't write signature, not enough space; adjust it with SignatureOptions.setPreferredSignatureSize
  at eu.europa.esig.dss.pdf.pdfbox.PdfBoxSignatureService.saveDocumentIncrementally(PdfBoxSignatureService.java:426)
  at eu.europa.esig.dss.pdf.pdfbox.PdfBoxSignatureService.checkEncryptedAndSaveIncrementally(PdfBoxSignatureService.java:410)
  at eu.europa.esig.dss.pdf.pdfbox.PdfBoxSignatureService.signDocumentAndReturnDigest(PdfBoxSignatureService.java:232)
  at eu.europa.esig.dss.pdf.pdfbox.PdfBoxSignatureService.signDocument(PdfBoxSignatureService.java:167)
  at eu.europa.esig.dss.pdf.AbstractPDFSignatureService.sign(AbstractPDFSignatureService.java:287)
  at eu.europa.esig.dss.pades.signature.PAdESService.signDocument(PAdESService.java:212)
  at digital.slovensko.autogram.core.SigningJob.signDocumentAsPAdeS(SigningJob.java:151)
  at digital.slovensko.autogram.core.SigningJob.signWithKeyAndRespond(SigningJob.java:58)
  at digital.slovensko.autogram.core.Autogram.signCommonAndThen(Autogram.java:95)
  ... 9 more
Caused by: java.io.IOException: Can't write signature, not enough space; adjust it with SignatureOptions.setPreferredSignatureSize
  at org.apache.pdfbox.pdfwriter.COSWriter.writeExternalSignature(COSWriter.java:846)
  at org.apache.pdfbox.pdfwriter.COSWriter.doWriteSignature(COSWriter.java:794)
  at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1219)
  at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:452)
  at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1455)
  at org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1421)
  at eu.europa.esig.dss.pdf.pdfbox.PdfBoxSignatureService.saveDocumentIncrementally(PdfBoxSignatureService.java:424)
  ... 17 more

==============

Príloha č. 5.pdf

Error:
digital.slovensko.autogram.core.errors.UnrecognizedException: eu.europa.esig.dss.model.DSSException: Unable to save a document. Reason : Can't write signature, not enough space; adjust it with SignatureOptions.setPreferredSignatureSize

to isté ešte niekoľko krát

image (1)