diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.82k stars 1.17k forks source link

starter repos #626

Closed HansUXdev closed 5 years ago

HansUXdev commented 5 years ago

This is honestly one of the coolest react things I've seen. I got a basic demo working and all but I'm trying basically implement React-PDF Repl on my nextjs site.

I found / cloned the site and have it open now trying to load the resume example and I got like half-way there.

Is there a better starter example repo somewhere I missed or someone built where you can view/edit a simple template(like on Repl) and then download the pdf?

diegomura commented 5 years ago

Hey. Thanks for the feedback! Glad you like the project. Unfortunately there's no other starter repo for the REPL. v2.0 which is currently under development will bring some new cool ways of visualizing PDFs (using canvas for example instead of generating the actual PDF), but it's not yet there to be functional. The site project is all I can help now 😄

HansUXdev commented 5 years ago

Yeah its a cool project but its a very rough learning curve like all the html2pdf libs out there largely due to the documentation imo which is a shame because its REALLY amazing project.

To give you some idea of where I'm coming from. A while ago I worked with a company writing medical software on cake php. They used a php plugin and some other stuff to convert smarty templates to pdfs. I was largely responsible for writing those templates (even though php itself is a template lang lol). What sucked most is there was no way to preview the pdf before downloading it so I ended up hacking together some gulp/nightmarejs stuff to watch for changes, pull up a browser and click download (it was faster then reworking the whole app). Yeah it was bad but it worked....

The cool part about this library is being able to view and edit the template in the web and then download it. If there would have been a way to do that back then by simply downloading a starter project, adding to a router on express or something that would have been a godsend...

I think I finally got the hang of rendering things in node and in react(it looks off though) but there isn't really a good, simple boilerplate to render in the web, edit the template and download the pdf.

I understand how hard this project must be given my previous experience with other libs and I'd be happy to contribute to writing the docs and creating some starter projects / boilerplates with cra, cna, and rn if I had some pointers one what to remove/edit etc