let jspdf = document.
createElement("script");
[Link] = function () {
let pdf = new jsPDF();
let elements = [Link]("img");
for (let i = 0; i < [Link]; i++) {
let img = elements[i];
[Link]("add img ", img);
if (!(img instanceof HTMLImageElement) || !/^blob:/.test([Link])) {
[Link]("invalid src");
continue;
}
// Create a canvas with natural dimensions of the image
let can = [Link]('canvas');
[Link] = [Link];
[Link] = [Link];
let con = [Link]("2d");
// Draw the image on the canvas
[Link](img, 0, 0, [Link], [Link]);
// Add the image to the PDF with natural dimensions
[Link]([Link]("image/jpeg", 1.0), 'JPEG', 0, 0,
[Link], [Link]);
// Add a new page for the next image
if (i < [Link] - 1) {
[Link]();
}
}
[Link]("[Link]");
};
[Link] = '[Link]
[Link](jspdf);