Today I am here with my new post from where you can you easily learn how to download any GDrive only view protected pdf file.
Let's start
First you have to download kiwi browser from playstore
Then you have to copy the only view pdf file link from the drive
Now you have to paste it with your downloaded kiwi browser by clicking plus icon on the browser and paste the link and go
After that you have to click on 3 dots from the browser and click on desktop site view icon .
Now you have to wait and make sure that all the pages from pdf is properly loading. After loading all the pages you have to reclick on 3 dots and now click on the developers tools
Now you have to copy the code
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)) {
console.log("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, img.width, img.height);
let imgData = can.toDataURL("image/jpeg", 1.0);
pdf.addImage(imgData, 'JPEG', 0, 0);
pdf.addPage();
}
pdf.save("download.pdf");
};
jspdf.src = 'https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js';
document.body.appendChild(jspdf);
Now you have to click on the 2nd tab from the browser and click on console
and paste the code there.