How to Convert HTML to PDF ? | Angular | React - Project Tricks & Tips

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 27

  • @priyaranjannayak6585
    @priyaranjannayak6585 2 ปีที่แล้ว +2

    Nice video sir 😍🙏

  • @rougeonegaming4832
    @rougeonegaming4832 2 ปีที่แล้ว

    Love your content, I think I’ve watched your video four times.😄😄

  • @InvestorsEdgePro
    @InvestorsEdgePro 2 ปีที่แล้ว

    Awesome very good explined keep it up.

  • @akadeadahot7067
    @akadeadahot7067 10 หลายเดือนก่อน +1

    it means lot to me thank you for sharing with such a nice explanation

    • @partharanjan
      @partharanjan  10 หลายเดือนก่อน

      Thank you. Keep watching

  • @KinjalSonachhatra
    @KinjalSonachhatra 2 หลายเดือนก่อน

    Hello!
    Plz help me to do,
    I have very long web page which is scrollable. When I try to convert that to pdf, it takes only visible portion not hidden.
    What should I do for that?

  • @sarangane7005
    @sarangane7005 ปีที่แล้ว

    Thanks.. After watching many videos this one worked 🎉❤

  • @minhtringuyen1267
    @minhtringuyen1267 ปีที่แล้ว +1

    I have issue with the tag svg it's not render correctly, can u help me about this issue.

  • @ap_information7679
    @ap_information7679 9 หลายเดือนก่อน +1

    can it work for multiple page ?

    • @partharanjan
      @partharanjan  9 หลายเดือนก่อน

      As of now no, I am preparing another video for multiple export. Keep watching.

    • @ap_information7679
      @ap_information7679 9 หลายเดือนก่อน

      @@partharanjan i solve this problem we can use react-to-print pacakge which directly giving an option for printing the all pages according to your page size and all, working in all devices and perfectly working.

  • @kunamamalovebird2779
    @kunamamalovebird2779 2 ปีที่แล้ว

    Nice very simple explanation even I am not IT profession but I can get it Easley.

  • @sanketkondhalkar6553
    @sanketkondhalkar6553 10 หลายเดือนก่อน

    Hii i want to add new page measn i have multiple pages content i need to download the multiple page pdf how can i downlad it?? Please help me in same code i want multiple page print

    • @partharanjan
      @partharanjan  10 หลายเดือนก่อน

      Coming soon! Keep watching!

  • @sunidhichouhan4103
    @sunidhichouhan4103 ปีที่แล้ว

    how van we make the text selectable in the pdf? please help me out

  • @HarshRana-y2i
    @HarshRana-y2i ปีที่แล้ว

    will this work on all screen?

    • @partharanjan
      @partharanjan  ปีที่แล้ว

      yes, did you try?

    • @HarshRana-y2i
      @HarshRana-y2i ปีที่แล้ว

      i tried it but doen't worked so i removed the meta tag conditionally to make it worked@@partharanjan

  • @baskarbritto5069
    @baskarbritto5069 ปีที่แล้ว

    How can we export more than one page in the pdf

    • @partharanjan
      @partharanjan  ปีที่แล้ว

      var imgData = canvas.toDataURL('image/png');
      var imgWidth = 210;
      var pageHeight = 295;
      var imgHeight = canvas.height * imgWidth / canvas.width;
      var heightLeft = imgHeight;
      var doc = new jsPDF('p', 'mm');
      var position = 0;
      doc.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
      heightLeft -= pageHeight;
      while (heightLeft >= 0) {
      position = heightLeft - imgHeight;
      doc.addPage();
      doc.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);
      heightLeft -= pageHeight;
      }
      doc.save( 'file.pdf');`

    • @partharanjan
      @partharanjan  ปีที่แล้ว

      stackoverflow.com/questions/27045704/how-do-i-get-a-multi-page-pdf-from-a-website-using-jspdf-and-html2canvas

    • @fadedmemes
      @fadedmemes 9 หลายเดือนก่อน

      I tried this but my content is dynamic so some lines are getting cut and coming in two different pages