sartography / spiff-arena

SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
GNU Lesser General Public License v2.1
44 stars 34 forks source link

Generate PDF from JSON data #1462

Open harmeet-status opened 2 weeks ago

harmeet-status commented 2 weeks ago

We need JSON to PDF generation capability built within Spiff. We cannot reply on an external service since we will have private data.

We should construct a HTML CSS page and then convert that to PDF.

Example: https://codepen.io/tjoen/pen/wvgvLX

danfunk commented 2 weeks ago

Create a connector that accepts a template name (will start with one template, for invoices) and a set of json data (that can be used to fill out the template). This means a BPMN Author can't create new templates (unless we create a separate system for them to do that). The complete PDF is returned.

harmeet-status commented 1 week ago

We would want to create a generic invoice template that suits a range of scenarios. It would be great to build the template in a way that we can call it using 2 different methods:

Method 1 (Vendor invoicing) : Used for vendors, including bounties

Method 2 (CC invoicing) : Used for staff

Method 2 can be thought of as a superset and contains all the fields where as method one had some less fields.

See attached PDF with markings on it. template-changes.pdf