Laravel Sign Pad v2 has been released

David
13 April 2023

We've just released a new version of the Laravel Sign Pad package. While there're no significant changes or big new features, we've needed to create a new major version because of two small breaking changes.

Let's see what's new on version 2.0.

Allow multiple signature positions on a single document

When defining a SignatureDocumentTemplate, you should now use an array to specify the signature position instead of describing a single page and coordinates.

public function getSignatureDocumentTemplate(): SignatureDocumentTemplate
{
    return new SignatureDocumentTemplate(
        outputPdfPrefix: 'document', // optional
        // template: new BladeDocumentTemplate('pdf/my-pdf-blade-template'), // Uncomment for Blade template
        // template: new PdfDocumentTemplate(storage_path('pdf/template.pdf')), // Uncomment for PDF template
        signaturePositions: [
             new SignaturePosition(
                 signaturePage: 1,
                 signatureX: 20,
                 signatureY: 25,
             ),
             new SignaturePosition(
                 signaturePage: 2,
                 signatureX: 25,
                 signatureY: 50,
             ),
        ]               
    );
}

Configurable storage disk and paths

We've added a new option to configure the disk used to store signatures and documents. You can configure it in the config/sign-pad.php file.

Upgrading

You can find the upgrading details in the UPGRADING file if you used the previous version.