Documents

Render CSV or JSON data as a table (PDF or image)

Builds an HTML table from CSV text or a JSON array (of objects or of arrays) and renders it as a PDF or an image. Provide csv or data, not both.

Costs 1 credit per call.

post/data-to-table

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/data-to-table
  • Auth: API key in header x-api-key

Request body

csvstring

The table as CSV text, up to 5 MB. Provide "csv" or "data", not both.

headerboolean

true (default) = the first row is the table header (with "data" as objects, the header shows their keys); false = no header row.

format'pdf' | 'png' | 'jpeg' | 'webp'

Output format: "pdf" (default), or an image as "png", "jpeg" or "webp" (cropped to the table).

pdf_format'A4' | 'A3' | 'A5' | 'Letter' | 'Legal' | 'Tabloid'

Paper size when format is "pdf": "A4" (default), "A3", "A5", "Letter", "Legal" or "Tabloid". Ignored for images.

landscapeboolean

true = landscape page, false (default) = portrait. Only used when format is "pdf".

output'json' | 'binary' | 'url'

How to return the file: "json" (default: base64 in the JSON response), "binary" (the file itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes).

Response

Result.

successboolean
filestring byte
mime_typestring

Changes

No recorded changes to this operation across all 1 revision of this API.