Comments (7)
Did you add it?
from node-signpdf.
I can't,
I have a pdf created with another library, this is my code,
let signer = require('node-signpdf').default;
console.log('\n\n\nsigner', signer);
let URL_PDF = "/home/xxx/Desktop/PDF_FIRMA/prueba.pdf";
let TOKEN_P12 = "/home/xx/Desktop/PDF_FIRMA/PLAN VITAL VITALPLAN S.A.P12";
var pdfBuffer = fs.readFileSync(URL_PDF);
console.log('pdfBuffer', pdfBuffer);
const signedPdf = signer.sign(
pdfBuffer,
fs.readFileSync(TOKEN_P12),
{ passphrase: 'pass.31', asn1StrictParsing: true, },
);
// return res.json(signer);
Please help!!
from node-signpdf.
.sign expects the placeholder to be there. read the readme. Also take a look here: #22
from node-signpdf.
use the helper of your plainAddPlaceholder library, as the code is shown
var signer = require('node-signpdf').default;
var placeholder = require('node-signpdf').plainAddPlaceholder.default;
var fs = require('fs');
var PATH_TO_PDF_FILE = "prueba.pdf";
var PATH_TO_P12_CERTIFICATE = "/pc/TOKEN.P12";
console.log('signer UUU ', placeholder);
var pdfBuffer = fs.readFileSync(PATH_TO_PDF_FILE),
pdfBuffer = placeholder({
pdfBuffer,
reason: '',
signatureLength: 1612,
});
var signedPdf = signer.sign(
// fs.readFileSync(PATH_TO_PDF_FILE),
pdfBuffer,
fs.readFileSync(PATH_TO_P12_CERTIFICATE), {
passphrase: 'pas.311',
asn1StrictParsing: true,
}
);
console.log('signedPdf ', signedPdf);
fs.writeFileSync('PC/Firmando[PDF]/21820[RQ000009]FIRMADO.pdf', signedPdf);
and then show the error:
please!!, help,
from node-signpdf.
Well, this is not yet supported as the error says. Your pdf already contains annotations and i have not written code to handle that situation... If someone has the time to do it, a PR would be more than welcome.
from node-signpdf.
I already made it, edited the library and I was successful. only that the pdf when verifying it with adobe the signature is obtained inconsistent.
from node-signpdf.
No activity. Closing.
from node-signpdf.
Related Issues (20)
- Add a signature box to the signed pdf HOT 8
- Signer implementation expected using 3.2.3 HOT 1
- Issue with PFX HOT 2
- Unable to sign using a p12 certificate - Error: Only 8, 16, 24, or 32 bits supported: 320 HOT 1
- Build fails because of missing type HOT 1
- Appending remote PADES signatures HOT 5
- Make Pades sign ETSI compliant HOT 1
- TypeError: pdf.ref is not a function HOT 1
- placeholder-pdfkit stops the pdf stream emitting the "end" event HOT 5
- PKCS#12 MAC could not be verified. Invalid password? HOT 1
- Could not resolve dependency with [email protected] HOT 2
- PDF expected as Buffer. HOT 1
- Run-time compatibility HOT 6
- Error when trying to sign a pdf document when using @signpdf module HOT 1
- error open with adobe reader HOT 1
- Error when using node JS pdf-lib: Expected xref at NaN but found other content
- How can fields of placeholder be visible. HOT 12
- Illegal values in ByteRange array/ Signature has not yet been verified
- Angular 17: Buffer is not defined
- Trouble with Signed PDFs: Valid Signature but No Green Tick in Acrobat HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-signpdf.