This commit is contained in:
selcuk committed 2022-07-11 21:02:55 +03:00
1 parent 1c8e04c338
commit 02ff381993
1 file changed
-4
-4
View File
@@ -24,12 +24,8 @@ const signPDF = async (sourceFile, { x = 0, y = 0, sf = 1.0 }) => {
const pngUrl = signDir;
const pngSignBytes = fs.readFileSync(signDir);
const pngStampBytes = fs.readFileSync(stampDir);
try {
const pBytes = fs.readFileSync(rawDir + sourceFile);
const pdfDoc = await PDFDocument.load(pBytes);
} catch (error) {
throw error;
}
// Embed the JPG image bytes and PNG image bytes
const pngSign = await pdfDoc.embedPng(pngSignBytes);