Documentation Site to Single PDF (Offline Handbook) avatar

Documentation Site to Single PDF (Offline Handbook)

Pricing

from $4.00 / 1,000 documentation page includeds

Go to Apify Store
Documentation Site to Single PDF (Offline Handbook)

Documentation Site to Single PDF (Offline Handbook)

Crawl any documentation website and convert it into a single, beautifully formatted, bookmarked PDF handbook with cover page and table of contents. Built for Docusaurus, MkDocs, Sphinx, VitePress, and GitBook with clean print styling and pay-per-event pricing.

Pricing

from $4.00 / 1,000 documentation page includeds

Rating

0.0

(0)

Developer

Alexander Daskalov

Alexander Daskalov

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Security

Limited permissions

Share

Convert entire documentation websites into a single, beautifully formatted, publication-grade PDF handbook for offline reading, archiving, or feeding into LLMs.

Crawl documentation pages in their natural navigation sidebar hierarchy across Docusaurus, MkDocs, Sphinx / ReadTheDocs, VitePress, GitBook, Mintlify, Nextra, and Starlight. Each page is rendered with clean print styling (stripping headers, sidebars, search dialogs, and cookie popups) and assembled into a single unified PDF complete with nested bookmarks, an optional cover page, and a visual table of contents.


Why Docs to PDF?

  • ✈️ Read Offline Anywhere: Commuting, traveling, or on a flight without Wi-Fi? Load entire developer docs onto your tablet, laptop, or e-reader (reMarkable, Kindle Scribe, iPad).
  • 📑 Hierarchical Bookmarks & TOC: Every chapter is indexed in the PDF outline. Internal headings (H2, H3) automatically nest beneath chapter titles.
  • 🎨 Distraction-Free Print Styling: Removes sticky navigation bars, responsive sidebars, theme toggles, search modals, and cookie banners.
  • 🤖 LLM Context & RAG Ingestion: Feed unified, cleanly formatted technical handbooks directly into Claude, ChatGPT, or local vector databases without noise.
  • 💰 Pay-Per-Event Pricing: Pay only for pages successfully included in your handbook ($0.004–$0.005 per page). No flat monthly subscriptions or wasted compute fees.

Supported Documentation Frameworks

Docs to PDF features automatic navigation detection tailored to the leading modern documentation engines:

EngineSidebar & Navigation Order DetectionChrome Stripping
Docusaurus (v2, v3).theme-doc-sidebar-menu a.menu__linkNavbar, sidebar, pagination, edit links hidden
MkDocs / Material.md-nav--primary a.md-nav__linkHeader, sidebar drawer, tabs, footer hidden
Sphinx / ReadTheDocs.wy-menu-vertical a, .sidebar-tree aNav side, search box, version flyout hidden
VitePress#VPSidebarNav a, .VPSidebar aVPNav, VPSidebar, VPDocFooter hidden
GitBook[data-testid='table-of-contents'] aHeader, sidebar, search overlay hidden
Mintlify#navigation-items a, #sidebar-content aTop navigation, sidebar, feedback prompt hidden
Nextra.nextra-sidebar aHeader, sidebar, TOC hidden
Starlight / Astro#starlight__sidebar aNavigation sidebar and search button hidden
Generic Documentation<aside>, <nav>, and sitemap.xml fallbackUniversal print layout and page break rules

Key Features

  • Sequential Reading Order: Discovers and renders pages in the exact order intended by the documentation author.
  • Sitemap XML Discovery: Automatically locates /sitemap.xml to ensure zero orphan pages are missed.
  • Publication Cover Page: Automatically formats an elegant dark-gradient cover page with your document title, subtitle, source URL, date, and page count.
  • Visual Table of Contents: Generates a clean, printed TOC with chapter titles, dotted leaders, and exact page numbers.
  • Full PDF Bookmarks: Uses native PDF bookmarks (pypdf outline) so you can jump between chapters with a click in any PDF reader.
  • Flexible Paper Formats: Supports A4, Letter, Legal, A3, and A5 in portrait or landscape orientation with configurable millimetre margins.
  • Custom CSS Injection: Add custom styles to hide specific corporate banners or tweak font families.

Input Configuration

FieldTypeDefaultDescription
startUrlsArray["https://mkdocs.org/"]Starting documentation URL or explicit list of URLs to crawl.
maxPagesInteger30Maximum number of pages to crawl and include in the final PDF (up to 2000).
pathPrefixString""Restrict crawling to URLs starting with this prefix (e.g. /docs or /en/latest/).
includeGlobsArray[]Only crawl URLs matching these patterns (e.g. ["*guide*", "*api*"]).
excludeGlobsArray[]Skip URLs matching these patterns (e.g. ["*changelog*", "*blog*"]).
crawlSitemapBooleantrueAutomatically inspect /sitemap.xml for complete URL coverage.
paperFormatString"A4"Paper size: "A4", "LETTER", "LEGAL", "A3", or "A5".
landscapeBooleanfalseEnable landscape layout for wide tables or code snippets.
marginMmInteger15Page margin in millimetres.
includeCoverBooleantrueInclude publication cover page.
includeTocBooleantrueInclude visual Table of Contents page.
titleString""Document title override (defaults to first page title).
subtitleString"Offline Documentation Handbook"Subtitle shown on cover page.
customCssString""Extra CSS injected before printing.
waitMsInteger0Delay in milliseconds before capture (for dynamic JS rendering).
outputFileNameString""Custom filename for the PDF in the Key-Value Store.

Output

The actor saves the generated PDF directly into the run's default Key-Value Store and outputs a dataset record containing:

{
"status": "success",
"pdfUrl": "https://api.apify.com/v2/key-value-stores/xyz123/records/mkdocs-documentation-handbook.pdf",
"fileName": "mkdocs-documentation-handbook.pdf",
"totalPages": 14,
"pagesIncluded": 6,
"pagesSkipped": 0,
"fileSizeBytes": 1458920,
"sourceUrl": "https://mkdocs.org/",
"title": "MkDocs Documentation Handbook",
"chapters": [
{
"title": "Overview",
"url": "https://mkdocs.org/",
"pages": 2
},
{
"title": "Getting Started",
"url": "https://mkdocs.org/getting-started/",
"pages": 3
}
],
"stoppedReason": null,
"createdAt": "2026-10-29T14:32:00.000Z"
}

Pricing

Docs to PDF uses transparent Pay-Per-Event (PPE) pricing:

EventTierPrice
Actor startAll users$0.00005
Documentation page includedFree & Bronze$0.0050 / page
Silver$0.0045 / page
Gold, Platinum, Diamond$0.0040 / page

A complete 50-page documentation handbook costs just $0.25. If an individual page fails to render, you are not charged for it. You can set a budget limit using Apify's maxTotalChargeUsd to guarantee your run never exceeds your desired spend.


Tips for Best Results

  • Path Prefix: When converting a sub-section (like an API reference), set pathPrefix to /api/ or /v2/ so the crawler does not wander into the main marketing blog.
  • Dynamic Content: If a documentation engine uses heavy client-side syntax highlighting or KaTeX math rendering, pass waitMs: 500 to allow animations to settle.
  • Reading on E-Ink Readers: For devices like the reMarkable or Kindle Scribe, standard A4 portrait format with 10–15mm margins provides the most comfortable font scale.

Ready-Made Tasks

Get started immediately with these pre-configured tasks for common documentation conversions:


Programmatic Usage

Python (apify-client)

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"startUrls": [{"url": "https://www.mkdocs.org/"}],
"maxPages": 10,
"paperFormat": "A4",
"includeCover": True,
"includeToc": True,
"title": "MkDocs Documentation Handbook"
}
run = client.actor("bossless/docs-to-pdf").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print("Download your PDF here:", item["pdfUrl"])

Node.js / TypeScript (apify-client)

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('bossless/docs-to-pdf').call({
startUrls: [{ url: 'https://www.mkdocs.org/' }],
maxPages: 10,
includeCover: true,
includeToc: true
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log('PDF URL:', items[0]?.pdfUrl);

cURL

curl -X POST "https://api.apify.com/v2/acts/bossless~docs-to-pdf/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"startUrls": [{"url": "https://www.mkdocs.org/"}],
"maxPages": 5
}'

Use with AI Agents (Apify MCP)

This Actor integrates seamlessly with the Apify Model Context Protocol (MCP) server for Claude, Cursor, and other agent platforms:

Tool: apify/docs-to-pdf
Arguments: {"startUrls": [{"url": "https://www.mkdocs.org/"}], "maxPages": 6, "title": "MkDocs Reference"}

Frequently Asked Questions (FAQ)

Is this Actor affiliated with Docusaurus, MkDocs, GitBook, or Sphinx?

No. This Actor is an independent software utility developed by bossless. It is not affiliated with, sponsored by, or endorsed by Docusaurus (Meta), MkDocs, GitBook, Sphinx, VitePress, Mintlify, Nextra, or Starlight. It converts publicly accessible documentation web pages using standard browser rendering and PDF compilation.

How does the Actor discover documentation pages?

The Actor inspects the framework-specific navigation sidebar on the initial documentation page. Modern documentation engines structure their sidebars hierarchically, which allows the Actor to crawl pages in their logical reading order rather than random link order. If no sidebar is detected, it falls back to parsing sitemap.xml or discovery through internal page links within the same origin and path prefix.

What print styles are applied?

Standard web documentation contains sticky navigation headers, left sidebars, right "on this page" sidebars, search bars, and cookie consent banners that waste paper or look awkward in a document. Docs to PDF applies custom print CSS rules specifically tuned for major documentation engines to hide these interactive elements and maximize readable content space.

Are PDF bookmarks created?

Yes. The generated PDF handbook includes a multi-level PDF document outline (bookmarks) corresponding to each chapter and major headings within each chapter, making navigation instant in Adobe Acrobat, Apple Preview, and mobile PDF readers.