HTML String to PDF - A4 Document Converter

codemaster devops · @codemasterdevops

Render HTML as a numbered A4 PDF in Chromium.

About

HTML String to PDF - A4 Document Converter

What does HTML String to PDF do?

HTML String to PDF renders supplied HTML in Chromium and saves a downloadable A4 PDF with numbered page footers. Use it to turn templated reports, invoices, and other documents into PDFs from a workflow or API.

What HTML can you convert?

  • Submit one HTML string per run in the required htmlString field.
  • Use inline CSS to style a self-contained document. Chromium applies print styles when rendering the PDF.
  • Use HTML and CSS page breaks for longer documents. The footer shows the current page and total page count.

How to use HTML String to PDF

  1. Open the Actor's Input tab.
  2. Paste your document markup into HTML string and start the run.
  3. Open the run's key-value store and download the OUTPUT record as a PDF.
{
  "htmlString": "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><style>body { font-family: sans-serif; }</style></head><body><h1>Sample report</h1><p>Rendered from HTML.</p></body></html>"
}

Output and export

  • Record key: OUTPUT
  • File format: PDF. ByteWells serves the bytes as application/octet-stream.
  • Example contents: an A4 page with the heading Sample report, the line Rendered from HTML., and the footer Page 1 of 1.
  • For an API download, read defaultKeyValueStoreId from the completed run. Send an authenticated GET request to https://bytewells.com/api/v2/key-value-stores/{storeId}/records/OUTPUT and save the response bytes as a .pdf file.

Limits

  • Each run accepts one HTML string. Send separate runs for separate documents.
  • A URL alone is treated as text. To render a page, supply its HTML.
  • Remote images, fonts, and styles depend on whether Chromium can reach their URLs. Inline styles and embedded assets make documents more portable.
  • The Actor saves a binary PDF record. The run's dataset has zero rows.

FAQ

What does the Actor convert?
It converts one HTML string into an A4 PDF with page numbers.
What input does it require?
Set htmlString to the markup for the document. You can include inline CSS.
Can I submit a webpage URL?
Submit the page's HTML in htmlString. A URL by itself renders as text.
Where do I download the PDF?
Open the completed run's key-value store and download the OUTPUT record. Save the downloaded file with a .pdf extension.
Can I download the PDF through the API?
Yes. Use defaultKeyValueStoreId from the completed run to retrieve the OUTPUT record through the authenticated ByteWells key-value store API.
Why is the dataset empty?
The Actor saves its result as a binary PDF in the key-value store. The default dataset has zero rows.
Can the PDF have multiple pages?
Yes. Chromium paginates longer documents, and each page footer shows the current page and total page count.
Will external images and fonts render?
They can render when Chromium can reach their URLs. Embed assets and styles for a self-contained document.
Can I convert several documents in one run?
Each run renders one HTML string. Run the Actor separately for each document.
What does the rental cost?
The rental costs $19.99 per month after a 3-day free trial. ByteWells bills run compute separately.

More Actors from the same publisher.

View all from @codemasterdevops