LibreSign / LibreSign/libresign
Failed to merge PDF with footer
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 818
- Forks
- 146
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 326
Description
Describe the bug
Failed to merge PDF with footer when installing libraries manually..
To reproduce
- Manually place JSignPdf.jar in /opt/libresign.
- Set correct ownership and permissions (www-data:www-data, 755)
- Installed java,pdftk from debian repositories
- Set the path manually
- php occ config:app:set libresign jsignpdf_path --value "/opt/libresign/jsignpdf-2.3.0/JSignPdf.jar"
- php occ config:app:set libresign java_path --value "/usr/bin/java"
- php occ config:app:set libresign pdftk_path --value "/usr/bin/pdftk"
Expected behavior
LibreSign should merge the PDF with the footer successfully, even if the libraries were installed manually instead of "occ libresign:install --all"
Screenshots
Environment information
- Nextcloud version: Nextcloud Hub 10(31.0.5)
- LibreSign version: 11.6.0
- PHP version: 8.2.28
- OS: debian 12 (bookworm)
- Java: openjdk 17.0.17
- JSignPdf version: 2.3.0
- pdftk: pdftk port to java 3.3.2 a Handy Tool for Manipulating PDF Documents
root@nextcloud:/var/www/nextcloud# php occ config:app:get libresign java_path
/usr/bin/java
root@nextcloud:/var/www/nextcloud# php occ config:app:get libresign pdftk_path
/usr/bin/pdftk
root@nextcloud:/var/www/nextcloud# php occ config:app:get libresign jsignpdf_path
/opt/libresign/jsignpdf-2.3.0/JSignPdf.jar
root@nextcloud:/var/www/nextcloud#
Additional context
For java, pdftk, and jsignpdf, the “Invalid hash of binary files” error is expected because I manually set the paths instead of using occ libresign:install --all, so the verification fails. However, this should not be a problem since the paths are correctly set. I didn’t want to install these libraries through LibreSign because they are already installed on my system from repositories except jsignpdf and I want to use them.
Does it have to be installed through occ libresign:install --all? If not, what could be the possible issues?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PDF footer merge with the manually configured java_path, pdftk_path, and jsignpdf_path values, then inspect the libresign:install --all flow and the binary hash verification behavior. Compare the manual-install path with the installed-library path and confirm that merging succeeds without requiring LibreSign-managed binaries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100