JSON to PDF Invoice icon

JSON to PDF Invoice

Convert JSON data to a structured PDF invoice

Generate Invoice PDF

AI-generated

Summary

Generate a PDF invoice from JSON input data, customizing company, customer, invoice details, and invoice items to produce a structured invoice PDF file.

Inputs

  • Invoice Title — Title displayed at the top of the invoice (default 'INVOICE').
  • Company Name — Your company's name (default 'Your Company Name').
  • Company Address — Your company's address, supports line breaks using '\n' (default '123 Business Street\nCity, State 12345\nCountry').
  • Invoice Number — Invoice number, can use expressions to auto-generate (default uses invoiceNumber field or generates 'INV-yyyyMMdd-runIndex').
  • Invoice Date — Date of the invoice (default is today's date in yyyy-MM-dd format).
  • Customer Name — Name of the customer (default extracts from input JSON or 'Customer Name').
  • Customer Address — Customer's address, supports line breaks (default extracts from input JSON or 'Customer Address').
  • Items Field Name (required) — JSON field name containing the array of invoice items (default 'Items'). Must be an array in the input data.
  • Discount Field Name — JSON field name containing discount value (default 'Discount').
  • Total After Discount Field Name — JSON field name containing total amount after discount (default 'TotalAfterDiscount').
  • Currency Symbol — Currency symbol to display with amounts (default '$').
  • Company Logo Path — Optional full filesystem path to a company logo image (PNG or JPEG) to display on the invoice.
  • Output Format — Choose to output the PDF as a base64-encoded string or as binary data for saving to file (default 'binary').

Output shape

a single record per input item

Returns the generated invoice PDF as either a base64 string or binary data, paired with the input item. The output includes filename 'invoice_.pdf', MIME type 'application/pdf', and the PDF data. Errors during generation return an item with an error message in the JSON.

Discussion