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

Web pages to PDF, Markdown and HTML

Prints web pages as landscape PDFs with the address in the header and saves Markdown and static HTML 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.

Links to pages and files urls

https://example.com/, https://en.wikipedia.org/wiki/Markdown

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, markdown, html

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, markdown, html

Landscape landscape

Yes

Turn the pages sideways.

Default: No → this example uses Yes

Header headerTemplate

{url}

Text or HTML at the top of every page. Placeholders: {page}, {pages}, {title}, {date}, {url}. Example: {title} — {date}. Keep the top margin at least 15mm so it fits.

Page readiness waitUntil

HTML ready

When a web page counts as loaded: after the load event, as soon as the HTML is ready, or once the network is quiet (slower).

Default: Load event → this example uses HTML ready

Wait for element waitForSelector

p

CSS selector to wait for before printing, for pages that load content late, e.g. #content or .chart.

.json
{
  "urls": [
    "https://example.com/",
    "https://en.wikipedia.org/wiki/Markdown"
  ],
  "outputFormats": [
    "pdf",
    "markdown",
    "html"
  ],
  "landscape": true,
  "headerTemplate": "{url}",
  "waitUntil": "domcontentloaded",
  "waitForSelector": "p"
}

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.