Create Custom PDF in Lightning Web Component | Salesforce ☁️⚡️

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

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

  • @allinone-telugu5346
    @allinone-telugu5346 ปีที่แล้ว +1

    Hi Can we remove the too bar in the pdf like those options print, download,rotate etc

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

      Hi, sorry that's a standard template. Can't remove it.

  • @rishabhagnihotri6262
    @rishabhagnihotri6262 5 หลายเดือนก่อน +1

    Hi, is it possible to clone full lwc into pdf....like user filled a form not that form is visible to user in read only mode. User can click on download button and get one pdf.

    • @SalesforceBolt
      @SalesforceBolt  5 หลายเดือนก่อน

      I haven’t tried it! Will check and let you know.

  • @JeanCarlos-ig6pw
    @JeanCarlos-ig6pw 2 ปีที่แล้ว

    is it posible to add or map a sign png saved in the attachments of a record in a pdf contract in salesforce?

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

    Any suggestions on how you can test this functionality with jest ? Thanks :)

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

    I have a question that drawText() will convert word file into pdf or not?

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

      It will draw the text over the canvas and then the canvas will convert it to pdf

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

    Hi, can you please also tell what if I want to export the datatable into pdf

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

      Use the VF page renderAs PDF method instead. Try to get data again on VF page and then render it as PDF.

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

      Thanks, but is it possible without creating the VF page?

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

      @@aanchalkhurana4483 I think so. Maybe you can generate it runtime again and use pdf-js

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

      @@aanchalkhurana4483 Are you able to do it without using vf page?

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

    Can we render the HTML class data and display it on Pdf, as here you are adding text learning with Salesforce bolt, but I want to add HTML form data as text in PDF in LWC. Is it possible?

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

      Hi Rajat, you can add html as data as the pdf creations is on a html canvas.

    • @rajatmehta114
      @rajatmehta114 3 ปีที่แล้ว

      @@SalesforceBolt Instead of page.drawtext what should i use?

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

    Thank you Very Much.

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

    Hi @Kapil...thanks for the video. Its helpful. I have a question..pdf is generated based on the static text the Java script. can you enhance it and explain to generate pdf using the content from salesforce.

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

      Hi Chandra, glad you like it!
      Consider it as a canvas where you may put content static/dynamically from salesforce. I will try to create another detailed example of it!

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

      ​@@SalesforceBolt I am trying to use this for one of the requirement that we have to be able to download pdf with salesforce content and ran into a challenge to split the text into multiple lines. Please let us know if there is a way to split the text into multiple lines.

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

    Hi, I think this can be used as an alternative to printView functionality and download a emailMessage Data , beacause printView is not available by salesforce specially for EmailMessage
    Any thoughts..! :)

    • @SalesforceBolt
      @SalesforceBolt  3 ปีที่แล้ว

      Well it could be a good idea 💡

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

      Can you suggest how to pass html body into pdf file that can decode as well.
      I am not finding any solution..!
      Thanks in advance

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

    Hi. I am getting error [window.URL.createObjectUrl is not a function]

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

      Try it like this once
      window.URL.createObjectURL = function() {};

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

    Thank you!

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

    Hi,
    This is a really helpful video. but I want to add a button inside the Pdf File.
    Pls Help me with that
    Thanks

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

      Thanks glad you like it ! I will check for the same and revert back.

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

    Hi ,please upload the lwc pagination concept with inlinedit.

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

    Hi Kapil, Thank you for the demo It's very helpful, my question is with the js file. can we generate pdf in lwc without using the js libraries ?

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

      You won't be able to generate it, but instead you can convert a doc/file to pdf
      th-cam.com/video/UaYVnDgZ0XU/w-d-xo.html

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

      @@SalesforceBolt Referring to this blog (th-cam.com/video/UaYVnDgZ0XU/w-d-xo.html) we are just able to convert the image files but not the doc/docx @SalesforceBolt

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

    Hi Kapil, nice demo. I'm trying to use pdf-lib in my project but can't use fontkit to add a custom font. Maybe you have used fontkit and share your experience?

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

      Hey sorry I don't have much experience of using fontkit.

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

      hey - are you able to use the fontkit?

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

      @@waqarSk no (( some ideas were using the Visualforce page, but there was something wrong with the namespaces due to which I couldn't get the result

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

      @@kamkaliev4400 Thanks. Yeah, but the fonts are limited in Visualforce render as pdf right? Have you been able to use the custom fonts in pdf in any way?

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

      @@waqarSk does it count in the electronic app?) it was a demo project, it didn't work out for me, but I didn't dig too deep

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

    Awesome, thank for sharing! How would I pass data from a record to the PDF? Specifically the page.drawtext piece?

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

      Hi there, to pass it to the the drawText won't be possible as the data could be in any format like image, datatable etc. I would suggest you to pass the data on visualforce page and covert and download it on the load of it. You may check below link as reference : th-cam.com/video/UaYVnDgZ0XU/w-d-xo.html

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

    Hello sir, can you have a tutorial to send the pdf to an email or user? or any idea on how to send the pdf file or an email @ onclicked?

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

      Hello, sorry I am not having any similar tutorial, maybe if you can save it as a file and then attach it to your email somehow!