var height = data['imageheight'] * 0.264583333333334; // Convert pixel into mm.
// }
// Reduce height and witdh if its size more than a4height.
while ( height > (a4height-(2*contentTopBottomMargin) )) {
height = height - (height*0.1);
...
...
@@ -880,6 +875,10 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
}
doc.addImage(image, data['format'], contentRightMargin, count, width, height); // image data, format, offset to the left, offset to the top, width, height
count += (5 + height);
} else {
let item = `<p>${data['message']}</p>`;
printTextblock(null, null, item);
}
}
/**
* Take an image, calculate its height in millimeters and print it on the pdf