Skip to content

Argument #1 ($pdf_object) must be of type ddn\sapp\PDFObject, bool given #118

@Guervyl

Description

@Guervyl

I'm getting this error: ddn\sapp\PDFDoc::add_object(): Argument #1 ($pdf_object) must be of type ddn\sapp\PDFObject, bool given, called in \vendor\ddn\sapp\src\PDFDoc.php on line 605 when trying to sign an already signed PDF.

Trace:

\vendor\ddn\sapp\src\PDFDoc.php:709 {▶}
  \vendor\ddn\sapp\src\PDFDoc.php:605 {▶}
  \vendor\ddn\sapp\src\PDFDoc.php:785 {▶}
  \vendor\ddn\sapp\src\PDFDoc.php:918 {▶}

So I check the code, it is returning false for the image that makes visible the signature (the existed one).

I changed this part to:

// Store the objects
        foreach ($updated_objects as &$object) {
            if(!is_bool($object)) { // Don't add if it's a boolean
                $this->add_object($object);
            }
        }

It works fine. The problem is that the PDF does not contain the first visible signature's image.

Image

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