Skip to content
//Markdown & HTML to PDF / Word Converter example\\

Markdown and Word files to PDF and Word

Pasted Markdown, a GitHub README and a .docx file as styled PDFs with a table of contents and a page footer, plus Word copies.

Updated November 13, 2026

What this example returns

The dataset’s “Files” view shows 12 columns: Download, File, Format, Pages, Size (bytes), Title, Source, Source type, Words, Notes, Status, and Error. See every output field.

What each setting does

The input this example runs Markdown & HTML to PDF / Word Converter with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Markdown markdown

--- title: Release Notes 2.4 author: Product Team --- ## Highlights | Area | Change | Impact | |---|---|---:| | Search | Faster ranking | 35% | | Export | Word and PDF | new | - [x] Ship the new export - [ ] Update the help center ```js const total = items.reduce((a, b) => a + b.price, 0); ``` …

Markdown to turn into a document: GitHub-style tables, task lists, code blocks with highlighting, footnotes, math ($...$), emoji and a YAML front matter title. Leave empty to convert only links, uploads or documents.

Links to pages and files urls

https://github.com/microsoft/playwright/blob/v1.49.0/README.md, https://raw.githubusercontent.com/jgm/pandoc/3.9/test/docx/tables.docx

Web pages (opened in a real browser, JavaScript included) and links to Markdown (.md), Word (.docx), HTML or text files. GitHub, GitLab and Gist file pages, Google Docs shared publicly and Google Drive or Dropbox share links are read as files. One document per link.

Output formats outputFormats

pdf, docx

Files to create from each document: PDF, Word (.docx), styled HTML or Markdown. Pick several to get each format; a format the source already has is skipped (a Word file is not turned into Word again).

Default: pdf → this example uses pdf, docx

Page size pageSize

Letter (8.5 × 11 in)

Paper size of the PDF pages.

Default: A4 (210 × 297 mm) → this example uses Letter (8.5 × 11 in)

Margins margins

20mm 15mm

Page margins in mm, cm, in, px or pt, CSS style: one value for all sides ('15mm'), two for top/bottom and left/right ('20mm 15mm') or four for top, right, bottom, left.

Default: 15mm → this example uses 20mm 15mm

Footer footerTemplate

{title} · Page {page} of {pages}

Text or HTML at the bottom of every page, with the same placeholders. Example: Page {page} of {pages}.

Document style theme

Report

GitHub: clean sans-serif like a README. Report: serif body text for reports and papers. Minimal: plain and compact. None: browser defaults.

Default: GitHub → this example uses Report

Table of contents tableOfContents

Yes

Add a linked table of contents from the headings (Markdown, Word and text sources; PDF, HTML and Word output).

Default: No → this example uses Yes

.json
{
  "markdown": "---\ntitle: Release Notes 2.4\nauthor: Product Team\n---\n\n## Highlights\n\n| Area | Change | Impact |\n|---|---|---:|\n| Search | Faster ranking | 35% |\n| Export | Word and PDF | new |\n\n- [x] Ship the new export\n- [ ] Update the help center\n\n```js\nconst total = items.reduce((a, b) => a + b.price, 0);\n```\n\nThe growth rate is $g = \\frac{b-a}{a}$.[^1]\n\n![Markdown logo](https://raw.githubusercontent.com/github/explore/main/topics/markdown/markdown.png)\n\n[^1]: Rounded to whole percent.\n",
  "urls": [
    "https://github.com/microsoft/playwright/blob/v1.49.0/README.md",
    "https://raw.githubusercontent.com/jgm/pandoc/3.9/test/docx/tables.docx"
  ],
  "outputFormats": [
    "pdf",
    "docx"
  ],
  "pageSize": "Letter",
  "margins": "20mm 15mm",
  "theme": "report",
  "tableOfContents": true,
  "footerTemplate": "{title} · Page {page} of {pages}"
}

What it costs

You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.

  • File createdfrom $0.001464One created PDF, Word, HTML or Markdown file with its download link. Each output format of a document is its own file; documents that cannot be converted are free.
  • Actor startfrom $0.001275Charged once per run.

Full pricing

When to use this example

From the Markdown & HTML to PDF / Word Converter readme:

What if an image or a page does not load?

The file is still created; the row's warning says which images were missing. A page that cannot be opened gives an error row and is not charged.

Other ways to run Markdown & HTML to PDF / Word Converter

All examples of Markdown & HTML to PDF / Word Converter

About Markdown & HTML to PDF / Word Converter

Turn Markdown, HTML, web pages and Word files into polished PDF, Word (.docx), HTML or Markdown files. Tables, code highlighting, math, page numbers, headers and footers, table of contents and Word templates. Paste text, add links, upload files or convert a dataset.

Price:
From $1.46 / 1,000 results
Developer:
Toolwright

Markdown & HTML to PDF / Word Converter pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.