How to create a

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • Hello, looking for a simple way to export input data from an HTML page, I found that using the #jspdf library is the best way. So, here is a simple sample of how to use it. Enjoy.
    - Web Post: thedigitalmike...
    - jsPDF link: rawgit.com/MrR...
    - library: unpkg.com/jspd...
    source code with different content that instead of saving the file, it's open a new tab and presents the final pdf result
    codepen.io/Mik...
    If you need a good hosting plan, check these plans from A2Hosting:
    www.a2hosting.c...
    LIKE AND FOLLOW:
    Sitio Web: thedigitalmike...
    Fiverr: www.fiverr.com...

КОМЕНТАРІ • 20

  • @fackermaker1
    @fackermaker1 2 роки тому +1

    thank you for this solution. Highly appreciated

  • @antareepdas3325
    @antareepdas3325 8 місяців тому +1

    how can i style the pdf

    • @thedigitalmike
      @thedigitalmike  8 місяців тому

      The easiest way is to use the html2canvas library to export the entire page or the container you want to export. here is a video I made about it: ua-cam.com/video/nZR6UoV1vOA/v-deo.html it's in Spanish but I'm pretty sure I have it translated to English. if you have any questions feel free to ask me. Thanks

  • @AlexKofJsk
    @AlexKofJsk Рік тому +1

    how to insert some like text box with gray background with text inside?

    • @thedigitalmike
      @thedigitalmike  Рік тому +1

      Sorry for the delay, I was making a video about your question, and I will be uploading that video this week. But it can be done by trying to use a doc.rect before the text and trying to center the text to be equal height. I will be adding the video in English and Spanish, stay tuned.

    • @AlexKofJsk
      @AlexKofJsk Рік тому +1

      @@thedigitalmike nice thanks 👍

    • @thedigitalmike
      @thedigitalmike  Рік тому

      check the video, here, ua-cam.com/video/6zvlu3riSUI/v-deo.html

  • @krizimane4451
    @krizimane4451 2 роки тому

    i would like to have the path that ypu added in the file index.html at the end what was it ?

    • @thedigitalmike
      @thedigitalmike  2 роки тому

      that's the path to the jspdf library, I use the 1.5.3 debug version cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js.

  • @jeeperscreepersgameplays8069
    @jeeperscreepersgameplays8069 2 роки тому +1

    hi, how could i add an image by input="File" and show it on the pdf, thanks

    • @thedigitalmike
      @thedigitalmike  2 роки тому +1

      Hello, thanks for the comment, here I send you a video I recently uploaded (ua-cam.com/video/Ym7rMiuAQBc/v-deo.html) about how you can do it. the video is in spanish, but I will be uploading a new one in english in the future.

    • @jeeperscreepersgameplays8069
      @jeeperscreepersgameplays8069 2 роки тому +1

      @@thedigitalmike thank you

  • @onlineghor-ko6wh
    @onlineghor-ko6wh Рік тому +1

    Please give me source file....

    • @thedigitalmike
      @thedigitalmike  Рік тому

      Check the description of the video, I posted a blog entrance in my website and you will find also a link to codepen.io with the same code. You can use it. Hope it helps you with your projects

  • @jikoycopada1718
    @jikoycopada1718 9 місяців тому

    why it doesn't work when I apply css?😭

    • @thedigitalmike
      @thedigitalmike  9 місяців тому +1

      Hi, you have to use another method like the use of html to canvas to do it, see this video Como exportar #html + #css a #pdf usando #jspdf y #html2canvas
      ua-cam.com/video/nZR6UoV1vOA/v-deo.html if you don’t follow because is not n Spanish, just let me make another one in English.

    • @jikoycopada1718
      @jikoycopada1718 9 місяців тому

      how about an image html to pdf? Thank you
      - not an input img

  • @mayureshatole
    @mayureshatole 10 місяців тому

    Doesn't work

    • @thedigitalmike
      @thedigitalmike  10 місяців тому

      follow the post: thedigitalmike.com/como-crear-un-fichero-pdf-usando-javascript-con-jspdf/
      you may need to translate it to english