This repository contains code for a PDF generator widget designed to be integrated into the Contentstack Developer Hub as a sidebar widget.
The PDF generator widget allows users to generate PDF documents directly from Contentstack entries within the Developer Hub interface.
To install and use the PDF generator widget:
- Create a sidebar widget in the Contentstack Developer Hub.
- Deploy the provided code to any hosting platform. Ensure to add the URL of the deployed application to the "App URL" field of the sidebar widget configuration.
- Install the app into your Contentstack stack.
- Navigate to the entry in Contentstack and open the sidebar to view the PDF generator widget.
- To add more fields to the dropdown menu, modify the
handlePdfTemplate
function inside theui/src/container/pdfWidget.tsx
file by adding new cases for each field.
Once the PDF generator widget is installed and configured, users can select the desired fields from the dropdown menu within the sidebar widget to generate a PDF document based on the selected template.