Skip to content
Snippets Groups Projects
Commit e266467d authored by Zdravko Iliev's avatar Zdravko Iliev
Browse files

more logs

parent 5620d5b3
No related branches found
No related tags found
1 merge request!1Draft: Resolve "[Document Sealing] Implement PDF parser"
Pipeline #50149 failed with stages
in 21 seconds
......@@ -50,13 +50,15 @@ class PDFparser {
const img = yield pdfDoc.embedPng(imgBytes);
const scaled = img.scale(scaleFactor);
const pages = pdfDoc.getPages();
console.log(coords);
for (let index = 0; index < pages.length; index++) {
const page = pages[index];
console.log(coords[index + 1]);
const x = typeof coords[index + 1] !== "undefined"
? parseFloat(coords[index + 1].x)
? parseFloat(coords[index + 1]["x"])
: null;
const y = typeof typeof coords[index + 1] !== "undefined"
? parseFloat(coords[index + 1].y)
? parseFloat(coords[index + 1]["y"])
: null;
if (x && y) {
page.drawImage(img, {
......
......@@ -65,16 +65,21 @@ class PDFparser {
const pages = pdfDoc.getPages();
console.log(coords);
for (let index = 0; index < pages.length; index++) {
const page = pages[index];
console.log(coords[index + 1]);
const x =
typeof coords[index + 1] !== "undefined"
? parseFloat(coords[index + 1].x)
? parseFloat(coords[index + 1]["x"])
: null;
const y =
typeof typeof coords[index + 1] !== "undefined"
? parseFloat(coords[index + 1].y)
? parseFloat(coords[index + 1]["y"])
: null;
if (x && y) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment