Overview
Joyfill Export SDK along with a headless browser can be used to generate PDF files. These PDF files can be stored directly in your own system, S3, or any other file storage. The Joyfill Export SDK can be used on page in your React, Angular, Vue, or VanillaJS web applications to render Joyfill Forms. Once you have the Forms rendering in your web application you can use a headless browser to convert that web page into a PDF file.1. Install
Using a package manager
Using a CDN
2. Usage
Add Joyfill PDF SDK to your web application
You will use theJoyDocExporter to render a PDF ready form on a web page. The JoyDocExporter receives one argument, doc, that you pass the Joyfill Supported JSON data. This will render a form that is ready to be used for a PDF file. See examples below for VanillaJS and React examples.
Important: Accurate CSS styles for printing
It’s recommend to apply the following styles to the html file that contains theJoyDocExporter. This ensures proper css styles and color rendering when generating a PDF using the headless browser.