From 02ff381993a8a2cfe6e48b291d404cbfb633e9de Mon Sep 17 00:00:00 2001 From: Selcuk Sari Date: Mon, 11 Jul 2022 21:02:55 +0300 Subject: [PATCH] backup --- Rev1/node/routes/invoice_sign.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Rev1/node/routes/invoice_sign.js b/Rev1/node/routes/invoice_sign.js index e8e7e9f..0131026 100644 --- a/Rev1/node/routes/invoice_sign.js +++ b/Rev1/node/routes/invoice_sign.js @@ -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; - } + const pBytes = fs.readFileSync(rawDir + sourceFile); + const pdfDoc = await PDFDocument.load(pBytes); // Embed the JPG image bytes and PNG image bytes const pngSign = await pdfDoc.embedPng(pngSignBytes);