Skip to content

AIIPWorld as an html2pdf.js alternative

A short, factual comparison for people who use html2pdf.js, html2canvas or jsPDF in the browser and run into page breaks, blurry text or layout differences. Everything we say about those libraries comes from their own repositories, with the address and the date we checked next to each fact.

In one sentence

A short, sourced comparison of the browser-side libraries html2pdf.js, html2canvas and jsPDF with AIIPWorld's server-side PDF API, which prints HTML with headless Chromium.

Key facts

  • Library facts come only from the three GitHub repositories, checked 2026-10-11; nothing else about them is claimed.
  • The html2pdf.js README says it renders content into an image and places it in a PDF, so text is not selectable, and that it will not run in Node.js.
  • AIIPWorld takes HTML or a public URL and returns a PDF from headless Chromium; a simple render costs 1 credit and the free plan has 100 credits a month.
  • The libraries run in the visitor's browser and cost nothing per document; this page says when they suit you better, and does not rank output quality or speed.

html2pdf.js: what we checked

Every row is read from html2pdf.js's own public pages, with the address next to it. Checked 2026-10-11. Plans change; confirm on their site.

TopicWhat html2pdf.js listsSource, date
What it isIts README says it converts any webpage or element into a printable PDF entirely client-side.github.com/eKoopmans/html2pdf.js, checked 2026-10-11
How it builds the PDFIt uses html2canvas and jsPDF. The README says it renders the content into an image and then places that image into a PDF, and that it will not run in Node.js.github.com/eKoopmans/html2pdf.js, checked 2026-10-11
Limits it listshtml2canvas is not perfect; the root element is resized to fit the PDF page; because the output is an image, text is not selectable or searchable and files can be large; very large content can fail or give blank PDFs.github.com/eKoopmans/html2pdf.js, checked 2026-10-11
Page breaksIt respects most CSS break-before, break-after and break-inside rules, has an avoid-all mode and keeps an older html2pdf__page-break class that may be removed in future.github.com/eKoopmans/html2pdf.js, checked 2026-10-11
html2canvasIts README says it does not make an actual screenshot but builds one from the information on the page, that it is not suitable for Node.js, and that some CSS properties are not supported yet. It calls the library very experimental.github.com/niklasvh/html2canvas, checked 2026-10-11
jsPDFDescribed as client-side JavaScript PDF generation. Its html() method depends on html2canvas, and on dompurify for HTML strings. The 14 standard fonts cover only ASCII; other characters need an embedded .ttf font.github.com/parallax/jsPDF, checked 2026-10-11
LicenceThe repositories of html2pdf.js, html2canvas and jsPDF are each listed under the MIT licence.github.com/eKoopmans/html2pdf.js, checked 2026-10-11
PriceAll three are libraries you install; their repositories list no paid plan.github.com/eKoopmans/html2pdf.js, checked 2026-10-11

AIIPWorld: what we offer

From our own price list and configuration. See pricing for the current version.

  • Free plan: 100 credits per month, no card needed. A simple render costs 1 credit. The free web tools also work without an account.
  • Paid plans (monthly price / credits per month): $19 / 2,750, $59 / 10,000, $149 / 30,000. Yearly billing is 10 times the monthly price. A credit pack is $10 for 1,400 credits that do not expire.
  • A screenshot costs 1 credit; a full page screenshot costs 2 credits for an image up to 5,000 px tall, plus more for taller ones. PDFs over 10 pages and results over 5 MB cost extra credits. Credits for failed jobs are returned. These costs are provisional until launch.
  • API: PDF from HTML or a public web address, and PNG or JPEG screenshots, all with headless Chromium. Jobs are asynchronous (submit, then poll). Results are kept for a limited time and then deleted. Webhooks, templates and a batch endpoint are not available yet.

Reading the two lists side by side

  • html2pdf.js, html2canvas and jsPDF run in the visitor's browser and cost nothing per document. We run on a server and use credits, and a simple render is 1 credit.
  • Their PDFs come from an image of the page, so text is not selectable. Ours are printed by headless Chromium, which keeps text as text.
  • They keep your HTML on the visitor's device. With us the HTML goes to our servers, and results are deleted after a limited time.
  • We have not compared rendering speed or file size. Run a few of your own pages through both.

You can try ours without an account in the HTML to PDF tool or the website screenshot tool. The PDF API and screenshot API pages list every option.

html2pdf.js is a name of its respective owner. AIIPWorld is not affiliated with it.

html2pdf.js, html2canvas and jsPDF: what each one does

This part is for people who are searching for an html2pdf alternative, an alternative to html2canvas, or a jsPDF alternative. The three libraries work together. html2pdf.js is the top layer. According to its README it converts a web page or element into a PDF entirely on the client, and it does that with html2canvas and jsPDF.

html2canvas reads the page's DOM and styles and draws them onto a canvas. Its README says it does not take a real screenshot but builds one from the information on the page. jsPDF is the library that writes the PDF file. Its html() method depends on html2canvas, which it loads when needed. People who search for jsPDF HTML are usually looking at that method.

All three run in the visitor's browser, so your server does nothing and the HTML never leaves the page. That is their main strength. Each fact below comes from the project's own repository, checked on 2026-10-11.

Why the PDF can differ from the page

Because html2canvas draws its own picture of the page, the result can differ from what the browser shows. Its README lists CSS properties that are not supported yet and calls the library very experimental. The html2pdf.js README says html2canvas is not perfect, that html2pdf.js resizes the root element to fit the PDF page, and that the output is an image, so text is not selectable or searchable and files can be large.

Headless Chromium works differently. The server prints the page with the browser's own print function, so the CSS engine is the same one that draws the page, and text in the PDF stays text. A PDF made from our HTML to PDF tool, for example, can be searched and copied. This is the main reason people look for a server-side html2pdf alternative.

Page breaks are another reason. The html2pdf.js README says it respects most CSS break-before, break-after and break-inside rules, so check that on your own pages. In Chromium the same rules are part of printing, as the print CSS guide on this site shows.

When html2pdf.js is the better choice

html2pdf.js may suit you better in several cases. You may want the download to happen in the visitor's browser with no server, no API key and no cost per document. Your content may be short and simple, such as a ticket or a small receipt. Or the HTML may be private enough that you do not want to send it anywhere. All three libraries are listed under the MIT licence in their repositories.

When a server-side PDF makes sense

A server-side PDF makes sense when the document is made by your backend and not by a visitor, for example a nightly report or an invoice sent by email. The html2pdf.js README says it will not run in Node.js, and the html2canvas README says it is not suitable for Node.js, so a job on your server needs another tool.

It also helps when you need the same fonts on every document, headers and footers with page numbers, or a page size you set exactly. Our render server has the Noto fonts, including CJK and emoji, and Liberation 2. The jsPDF README notes that its 14 standard fonts cover only ASCII and that other characters need an embedded font file.

Moving from html2pdf.js to the AIIPWorld API

The API takes a string of HTML, not a DOM element. Build the HTML on your server, or read the outerHTML of the element you used to pass to html2pdf.js, and send it with output set to pdf. Keep the API key on your server, because a key in browser code can be read by every visitor. A download button in your page should therefore call your own backend, which calls the API.

curl -X POST https://api.aiipworld.com/v1/render \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Invoice 1042</h1><p>Total due: $480.00</p>","output":"pdf","options":{"format":"A4","margin":{"top":"15mm","bottom":"15mm","left":"15mm","right":"15mm"},"print_background":true}}'

# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"

Map your settings like this. The page format and orientation you gave jsPDF become format and landscape. Page margins become margin. Page break handling moves to CSS rules such as break-inside: avoid. Images need public addresses, or data URLs, because the server cannot see files on the visitor's computer. The job is asynchronous: you poll until it succeeds and then download the file from a short-lived link.

How to test with your own pages

Run your real pages through both and check the points below.

  • Text: open the PDF and try to select a word, search for it and copy it.
  • Page breaks: check where tables, cards and headings fall at the end of each page.
  • Fonts: confirm that every font you use is on the render server or loads from a public URL.
  • Size: compare the file size of a long document.
  • Cost: the library is free to run. The API uses 1 credit for a simple render, and larger outputs use more. Credit costs are provisional until launch.

Questions

Is AIIPWorld a replacement for html2pdf.js?

For some uses. html2pdf.js runs in the visitor's browser. We run on a server, so we replace it only where your code can send HTML to an API and wait for a job to finish. If you want the PDF to be made on the visitor's device without a server, keep using a browser library.

Does html2pdf.js work in Node.js?

Its README says it will not run in Node.js and must run in a browser. For a PDF in Node.js, call the API with fetch, or run a browser such as Puppeteer. The Node.js guide on this site shows both.

What is a good html2canvas alternative?

It depends on what you need. html2canvas draws a picture of the page in the visitor's browser. If you need an image of a page made on a server, the screenshot API renders a URL or HTML in headless Chromium and returns a PNG or JPEG.

What is a jsPDF alternative for HTML?

jsPDF writes PDF files in the browser, and its html() method depends on html2canvas. If your starting point is HTML and you want selectable text, send the HTML to a server that prints it with Chromium, such as this API.

Why is the text in my html2pdf.js PDF not selectable?

The html2pdf.js README says it renders the content into an image and then places that image into the PDF, so the text is not selectable or searchable. A PDF printed by Chromium keeps text as text.

Can I call the API from browser JavaScript?

You can, but you should not put the API key in code that visitors can read. Call your own backend from the browser, and let the backend call the API.

Which libraries are licensed under MIT?

The repositories of html2pdf.js, html2canvas and jsPDF each show the MIT licence. Check the licence again in the repository before you rely on it.

How current is the information about the libraries?

It was checked on 2026-10-11 against github.com/eKoopmans/html2pdf.js, github.com/niklasvh/html2canvas and github.com/parallax/jsPDF. READMEs change, so confirm on the repositories before you decide.

Related tools