You may need to provide users of your web application with a PDF document for various reasons, such as financial statements, account information, or just any important information that has to be shared in a single file.

In this article, I describe why you should consider PDF generation on the client-side and how you can add this functionality to your web, or more specifically, React app.

Because I like to have a good overview of what’s going on from the beginning, you can see the live demo of the app and its source code before moving on:

Live demo:https://pixochi.github.io/pdf-from-images-react-app/

Source code:https://github.com/pixochi/pdf-from-images-react-app

1. Why on the client-side/frontend

  • You don’t need to set up and maintain any server if your app doesn’t use one yet.
  • Your server(s) will use fewer resources because the browser does all the work.
  • Although this depends on your tooling, you can take advantage of all your existing frontend styling framework.

#web-development #react #javascript #typescript

How to Generate PDF from Images on the Client-side with React
12.85 GEEK