Skip to content

Visible signature coordinates saved as (0,0,0,0) → results in invisible signature (jsignpdf engine). #7328

@EtherGhost

Description

@EtherGhost

Describe the bug

When placing a visible signature box in LibreSign and saving the document, the signature element is stored in the database with zero coordinates: llx = 0 lly = 0 urx = 0 ury = 0.

To reproduce

  1. Upload a PDF (tested with: LibreOffice-exported PDF or scanned PDF)
  2. Open the document in LibreSign
  3. Add a signer
  4. Place a visible signature box on the page
  5. Click Save
  6. (Optional) Re-open the document → signature box is not visible
  7. Send and sign the document
  8. Download the signed PDF
  9. SELECT * FROM oc_libresign_file_element WHERE file_id = ; =>
    type: signature
    page: 1
    llx: 0
    lly: 0
    urx: 0
    ury: 0

Expected behavior

  • Signature box coordinates should be saved correctly in DB and visible signature should appear in the signed PDF

Screenshots

No response

Environment information

Nextcloud version: 33.0.0
Installation type: HanssonIT prebuilt Nextcloud server
LibreSign version: 13.2.0
PHP version: 8.3.6
Browser: Firefox 148.0.2 (64-bit)
Signature engine: jsignpdf
JSignPdf version: 2.3.0 (bundled)

Additional context

Workaround:
Manually updating coordinates in DB fixes the issue:

UPDATE oc_libresign_file_element
SET llx = 100, lly = 100, urx = 250, ury = 180
WHERE id = <element_id>;

Additional Notes:
QR code rendering works correctly → PDF modification pipeline is functional
Signature is cryptographically valid
Issue occurs consistently (100% reproducible)
Happens with different PDF types
Appears to be related to UI → backend coordinate persistence

Related Behavior (Native Engine)
When switching to native signature engine:

Could not sign PDF using native v1 engine.
Root cause: Failed to inflate FlateDecode stream.

Additional detail:

The signature box is placed using the mouse in the UI (drag and resize),
and appears correctly positioned before saving.

After clicking "Save":

  • UI reports success
  • but coordinates are stored as 0,0,0,0 in database

This happens consistently regardless of:

  • PDF type (LibreOffice export, scanned PDF)
  • user

This suggests the issue occurs during the UI → backend save step,
not during PDF processing or signing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    0. Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions