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

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2022
  • #htmltopdf #angular #react ‪@partharanjan‬
    Learn How to convert HTML to PDF in Angular and react.
    Repo: github.com/partharanjan/angul...
    Follow me on
    Buy me a Book: www.buymeacoffee.com/parthara...
    LinkedIn : / partharanjan
    GitHub: github.com/partharanjan
    Twitter: / partha_pw
    Thank you.😆
    Happy Learning & Coding!

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

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

    Nice video sir 😍🙏

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

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

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

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

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

      Thank you. Keep watching

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

    Awesome very good explined keep it up.

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

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

  • @minhtringuyen1267
    @minhtringuyen1267 6 หลายเดือนก่อน +1

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

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

      can you share code?

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

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

  • @sunidhichouhan4103
    @sunidhichouhan4103 11 หลายเดือนก่อน

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

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

    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  4 หลายเดือนก่อน

      Coming soon! Keep watching!

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

    can it work for multiple page ?

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

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

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

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

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

    • @fadeddota4956
      @fadeddota4956 3 หลายเดือนก่อน

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

  • @user-ld4db7ri7s
    @user-ld4db7ri7s 7 หลายเดือนก่อน

    will this work on all screen?

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

      yes, did you try?

    • @user-ld4db7ri7s
      @user-ld4db7ri7s 6 หลายเดือนก่อน

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