I'm currently working on a delivery management application using Postgres, NestJS, and NextJS. I need guidance on implementing a feature for shipping label generation and download. I'm wondering about the best practices and whether it's feasible to create the shipping label using HTML and CSS on the client side and then print it, or if it's better to generate the label as an image on the server.
- Tech Stack:
- Database: Postgres
- Backend: NestJS
- Frontend: NextJS
What I've Considered:
I'm exploring the following options:
- Generating the shipping label on the client side using HTML and CSS.
- Generating the shipping label on the server side as an image.
Questions:
- What are the best practices for implementing shipping label generation and download in a web application?
- Is it advisable to create a shipping label using HTML and CSS on the client side, and then print it? Are there any limitations or potential issues with this approach?
- Alternatively, should I generate the shipping label as an image on the server? What are the advantages and disadvantages of this method?
- Are there any recommended libraries or tools within the NestJS/NextJS ecosystem that can simplify the implementation of shipping label generation?
Additional Notes:
Any insights, code examples, or real-world experiences related to shipping label generation in a similar tech stack would be greatly appreciated. Thanks in advance!