Тёмный

How to create a PDF file using React.js 

Vicode Media
Подписаться 7 тыс.
Просмотров 67 тыс.
50% 1

In this video we will create a React.js app which will generate a PDF file. We will create a form and when submitting the form all the date will be outputted to the screen on a separate page from where we will be able to generate a PDF file with the content from the form.
React to PDF:
www.npmjs.com/...
Source Code:
github.com/ruv...
Buy Me a Coffee ;)
paypal.me/Vict...
Hosting I use:
m.do.co/c/e924... (Get $100 in credit over 60 days)

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@sahanweerakoon8544
@sahanweerakoon8544 3 года назад
Watch from 35:00. Stuff before that are unnecessary .
@luiza4142
@luiza4142 3 года назад
thx
@faisalakram6825
@faisalakram6825 3 года назад
Thankyou!
@lmd4881
@lmd4881 3 года назад
this is SO awesome, have bought you coffee as a thank you :)
@VicodeMedia
@VicodeMedia 3 года назад
Thanks a lot, Linda! I'm glad it helped you! :)
@sabyasachisahu6730
@sabyasachisahu6730 3 года назад
Thank you so much. I have been looking for this for a very long time.
@mariacarrero8701
@mariacarrero8701 2 года назад
Thank you so much!! it works fine in my own project
@VicodeMedia
@VicodeMedia 2 года назад
You're welcome
@kdgyimah
@kdgyimah 4 года назад
Great tutorial, works just as expected. My problem using this package was the generated PDF page was looking pixelated and not so clear than it really was and I couldn't print the full screen like you showed if the page had a lot more content...
@vijayverma-ho4hk
@vijayverma-ho4hk 3 года назад
Did u get the solution of your problem. please share
@kdgyimah
@kdgyimah 2 года назад
@@vijayverma-ho4hk Yes I did. Totally sorry about responding late , I just got a reply to one of my comments and I’m only seeing this in addition. I used the package “react-to-print”
@hasinpramodya9652
@hasinpramodya9652 2 года назад
@@vijayverma-ho4hk I also had same problem but I solved it very simply update my app.css with the given app.css file. So remember to apply CSS given in the code
@chandanilama7959
@chandanilama7959 2 года назад
did you solve and how plz response as soon as possible
@chandanilama7959
@chandanilama7959 2 года назад
how to solve PDF page was looking pixelated and not so clear than it really was and I couldn't print the full screen like you showed if the page had a lot more content...
@kdgyimah
@kdgyimah 4 года назад
This is my solution for getting a page as PDF using vanilla JavaScript and no package. window.print();}> Capture as PDF // This will print the whole page as a PDF To prevent the button itself from showing in the PDF file, Add this style to your css: @media print { .dontPrint { display: none !important;} }
@LeHoangNhatLam
@LeHoangNhatLam 2 года назад
This is very useful. Thank you !!!
@kdgyimah
@kdgyimah 2 года назад
@@LeHoangNhatLam You are welcome!!
@sdkosm
@sdkosm Год назад
Amazing bro you did it
@anmol8193
@anmol8193 2 года назад
I tried using this, works fine for a single page, but if the content is more than 1 page, a new page isn't getting added automatically, unable to find a solution, could you please help?
@johnsonare6452
@johnsonare6452 4 года назад
Thanks, Well done
@bilalabubaker1009
@bilalabubaker1009 3 года назад
what if the content is for 3 to 5 pages ? will it give pdf of 3 to 5 pages ?
@costafabio7072
@costafabio7072 3 года назад
Thanks 👏
@shunottarasarade6229
@shunottarasarade6229 3 года назад
hello , npm install react-to-pdf is not installing in node modules . How to solve it . please help
@faisalakram6825
@faisalakram6825 3 года назад
Thankyou so much.
@christianmagnus1003
@christianmagnus1003 3 года назад
What happens if i want to send this pdf file to backend to save it, how i should send this pdf if i not press pdf create button?
@galtechenterprises
@galtechenterprises 2 года назад
Sir, How to add multiple pages in react-to-pdf and also make a page break.
@kshitizshah6685
@kshitizshah6685 4 года назад
thanks a lot
@khan_dev
@khan_dev 2 года назад
I dont understand how to apply styles for the PDF file.
@NguyenNgocThuong-2001
@NguyenNgocThuong-2001 Год назад
how to change size print pdf when using react-to-pdf library? I need to print words in A4 size page
@AnitaR-q5l
@AnitaR-q5l 4 месяца назад
I am getting this error while submitting the form.. ------------------------------------------------------------------------------ Uncaught runtime errors: ERROR Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
@kristinajoycegob5555
@kristinajoycegob5555 3 года назад
Can this be send as an attachment? Can you make a tutorial pls.
@VicodeMedia
@VicodeMedia 3 года назад
Thanks for the feedback. Will do my best to make one.
@kamilpedziach361
@kamilpedziach361 3 года назад
why i see only half of file, first half is behind the screen :d
@SonAyoD
@SonAyoD 2 года назад
i cant figure out how to add dynamic data i can map through via react pdf components. e.g. {item.data} doesn't work.
@salemouail627
@salemouail627 3 года назад
Thanks ! :D
@VicodeMedia
@VicodeMedia 3 года назад
You are welcome
@duvanaponte8590
@duvanaponte8590 2 года назад
esta libreria ya no la soporta react---- :(
@priyan6380
@priyan6380 2 года назад
Hey! Thanks for sharing this! Do you have any idea about how I could capture scrollable content into pdf?
@ghilesabchiche7342
@ghilesabchiche7342 3 года назад
Hi, does it also work on components? I would like to print only a designed area not all the page Great video btw!
@SULAIMAN83536
@SULAIMAN83536 2 года назад
Did you solve this? I really need the solution please
@ashrutpanchal
@ashrutpanchal Год назад
Can we send this pdf in the URL in the API for the back-end side to use/ save? If yes, how?
@yulianaquintana9361
@yulianaquintana9361 2 года назад
Why are you still using classes?
@davidkramer6286
@davidkramer6286 2 года назад
I'm trying to find a way to send genereted pdf to backend so i can save it. If you know how to make that can you plase make tutorial or just tell me how to do it.
@meoonlyjb9109
@meoonlyjb9109 3 года назад
Help!!!! I lost information, it does not automatically paging
@dji713
@dji713 3 года назад
Hello, thanks for this tutorial. I have a problem: my pdf is generated as an image non pdf type. Is it possible that the pdf contains several pages? Thank you
@kacperkepinski4990
@kacperkepinski4990 2 года назад
1 big page?
@Electrocode_gk
@Electrocode_gk 2 года назад
Is it static or dynamic
@utopian5920
@utopian5920 3 года назад
how can i add a datepicker to the PDF?
@deepikasrinivasasharma7481
@deepikasrinivasasharma7481 4 года назад
How to do this in react,jsx file sir?
@kacperkepinski4990
@kacperkepinski4990 8 месяцев назад
40 min? sth is wrong
@achinmandotia9837
@achinmandotia9837 4 года назад
This doesn't seem to be working for me, my pdf is coming to be blank
@VicodeMedia
@VicodeMedia 4 года назад
Did you try the source code?
@achinmandotia9837
@achinmandotia9837 4 года назад
@@VicodeMedia Yes, I cloned your repo and tried running it. No luck
@VicodeMedia
@VicodeMedia 4 года назад
And you also installed the packages, right?
@achinmandotia9837
@achinmandotia9837 4 года назад
@@VicodeMedia yep, I did yarn install
@emys_
@emys_ 3 года назад
@@achinmandotia9837 I added in App.css -> .Post -> color: black;
@Niamat-w9s
@Niamat-w9s 4 года назад
thanks
Далее
Generate a PDF in React
23:38
Просмотров 14 тыс.
Vite Crash Course | Faster Alternative To CRA
16:24
Просмотров 204 тыс.
КОТЯТА НАУЧИЛИСЬ ГОВОРИТЬ#cat
00:13
Why Signals Are Better Than React Hooks
16:30
Просмотров 479 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 684 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
Create, View and Download PDFs in React
20:34
Просмотров 44 тыс.
WordPress Custom Fields for Custom Post Type
42:12
Просмотров 15 тыс.
The Problem With Microservices
17:47
Просмотров 434 тыс.
ReactPDF Basic Setup
11:12
Просмотров 103 тыс.
How to Create PDFs With Node JS and React
25:57
Просмотров 147 тыс.