Download View Only PDF files from Google Drive || Two ways to download View Only PDF files |
HTML-код
- Опубликовано: 7 фев 2025
- Code 👇
// Copy all code
let jspdf = document.createElement("script");
jspdf.onload = function () {
let pdf = new jsPDF('p', 'mm', [1000, 625]);
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);
let imgData = can.toDataURL("image/jpeg", 1.0);
pdf.addImage(imgData, 'JPEG', 0, 0);
pdf.addPage();
}
pdf.save("download.pdf");
};
jspdf.src = 'cdnjs.cloudfla...
document.body.appendChild(jspdf);
// End
VM64:29 This document requires 'TrustedScriptURL' assignment.
(anonymous) @ VM64:29
VM64:29 Uncaught TypeError: Failed to execute 'setAttribute' on 'Element': This document requires 'TrustedScriptURL' assignment.
at :29:7
whats that download info app that you have on your windows PC?
VM391:23 This document requires 'TrustedScriptURL' assignment.
(anonymous) @ VM391:23
VM391:23 Uncaught TypeError: Failed to set the 'src' property on 'HTMLScriptElement': This document requires 'TrustedScriptURL' assignment.
at :23:11
i have this error
Thanks a Ton! Will use this methord to download all my study pdfs, print them, and reduce my screen time.
Overload during day problem aa raha hai
Both method are not working. Please give another method
Unlock karne par company ki taraf se koi kase hoga mere uper
Wowwwww thankyouuuuuu so much❤❤❤❤❤❤❤❤❤❤❤
2nd method worked for me , Thanks
How to add images
Error a rha h.. this document trustedscripurl assignment yae error dae rha h
I'm also getting same error
Try second method
2nd method kn sa
Website wala
Watch this video
ruclips.net/video/A_ZPsUYooKI/видео.html
thanks a lotttt
Thanks bro ❤
Spam to get view in website
Love you brother! Love you 3000!
thank you very much very helpful
Thanks a lot😊
Spam
Hlo
Thank u
both methods are not working
pdf.dotool.net/en/
Ye website pe try karo,it is working
@@loksewaplushcoding i tried this method too, it's printing a blank PDF.
maybe google updated its security and now nothing may work.
Can you send your pdf link
@@loksewaplushcoding yes i can, but it wont open at your end because the host has allowed the access to only specific individuals (specific gmail IDs only) :(
here's the link: drive.google.com/file/d/1KtXZSe88b1-QlXUOoPBcbWY2LDjNtAxC/view
ruclips.net/video/A_ZPsUYooKI/видео.html
Watch this video