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

Комментарии • 34

  • @amigodaonça-k5o
    @amigodaonça-k5o Год назад +1

    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

  • @СтаніславМельничук-ъ6ь

    whats that download info app that you have on your windows PC?

  • @aryabimaputra8021
    @aryabimaputra8021 Год назад +1

    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

  • @SS-gn3jn
    @SS-gn3jn Год назад

    Thanks a Ton! Will use this methord to download all my study pdfs, print them, and reduce my screen time.

  • @physics4you555
    @physics4you555 7 месяцев назад

    Overload during day problem aa raha hai

  • @Ariyan_Yeamin
    @Ariyan_Yeamin Год назад +1

    Both method are not working. Please give another method

    • @Birendraparida670
      @Birendraparida670 10 месяцев назад

      Unlock karne par company ki taraf se koi kase hoga mere uper

  • @unknown_haters-xo4ci
    @unknown_haters-xo4ci 7 месяцев назад

    Wowwwww thankyouuuuuu so much❤❤❤❤❤❤❤❤❤❤❤

  • @No_Rules_YT_
    @No_Rules_YT_ Год назад

    2nd method worked for me , Thanks

  • @sandhyakumar1770
    @sandhyakumar1770 Год назад

    How to add images

  • @musman7312
    @musman7312 Год назад

    Error a rha h.. this document trustedscripurl assignment yae error dae rha h

  • @antorproshad2175
    @antorproshad2175 Год назад

    thanks a lotttt

  • @Shivam-to3ol
    @Shivam-to3ol 10 месяцев назад

    Thanks bro ❤

  • @ashishgahine
    @ashishgahine Год назад

    Spam to get view in website

  • @SS-gn3jn
    @SS-gn3jn Год назад

    Love you brother! Love you 3000!

  • @sanregosanre2593
    @sanregosanre2593 Год назад

    thank you very much very helpful

  • @kkgopalakrishnan
    @kkgopalakrishnan Год назад +1

    Thanks a lot😊

  • @gpntsk
    @gpntsk Год назад

    Hlo

  • @rashmirash8659
    @rashmirash8659 Год назад

    Thank u

  • @KhawarJahangir-z2j
    @KhawarJahangir-z2j Год назад +1

    both methods are not working

    • @loksewaplushcoding
      @loksewaplushcoding  Год назад

      pdf.dotool.net/en/
      Ye website pe try karo,it is working

    • @KhawarJahangir-z2j
      @KhawarJahangir-z2j Год назад

      ​@@loksewaplushcoding i tried this method too, it's printing a blank PDF.
      maybe google updated its security and now nothing may work.

    • @loksewaplushcoding
      @loksewaplushcoding  Год назад

      Can you send your pdf link

    • @KhawarJahangir-z2j
      @KhawarJahangir-z2j Год назад

      @@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

    • @loksewaplushcoding
      @loksewaplushcoding  Год назад

      ruclips.net/video/A_ZPsUYooKI/видео.html
      Watch this video