Skip to content

Signature box is invalid when signing PDF #91

Description

@ridgey-dev

Input PDF:
input.pdf

Undesired result:
output.pdf

When signing the document twice (so user can see multiple signature boxes on different pages) the result is that the only the last created signature box is valid. The first one has message "Document has been altered or corrupted since it was signed.".

Note that the input.pdf contains unsigned signature boxes, and it has been made using phpunite.

Code:

$document = PDFDoc::from_string($content);
$document->sign_document($certfile);
$content = $document->to_pdf_file_s();

$document = PDFDoc::from_string($content);
$document->sign_document($certfile);
$content = $document->to_pdf_file_s();

file_put_contents('output.pdf', $content);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions