0% found this document useful (0 votes)
18 views1 page

Code To Download Editable PDFs in Chrome

The document provides instructions for downloading a PDF document that contains all the images from a webpage. First, you need to press F12 and then paste the provided JavaScript code into the console to generate the PDF, which will download automatically. It also includes a link to an action plan from a faculty.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Code To Download Editable PDFs in Chrome

The document provides instructions for downloading a PDF document that contains all the images from a webpage. First, you need to press F12 and then paste the provided JavaScript code into the console to generate the PDF, which will download automatically. It also includes a link to an action plan from a faculty.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Press F12 and then go to the CONSOLE tab

We paste the following code and hit enter and it downloads.

let jspdf = document.createElement("script");

jspdf.onload = function () {

let pdf = new jsPDF();


let elements = document.getElementsByTagName("img");
for (let i in elements) {
let img = elements[i];
console.log("add img ", img);
if (!/^blob:/.test(img.src)) {
invalid src
continue;
}
let can = document.createElement('canvas');
let con = can.getContext('2d');
can.width = img.width;
can.height = img.height;
con.drawImage(img, 0, 0);
let imgData = can.toDataURL("image/jpeg", 1.0);
pdf.addImage(imgData, 'JPEG', 0, 0);
pdf.addPage();
}

pdf.save("download.pdf");
};

https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js
document.body.appendChild(jspdf);

The provided URL does not contain any text for translation. Please provide the text you would like to have translated.
action plan link

You might also like