<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-ported-dart-pdf-to-pure-javascript--ypugbs6sa" -->

---
title: I ported dart_pdf to pure JavaScript. | daily.dev
description: A developer has ported dart_pdf — a Flutter-inspired declarative PDF generation library — to pure JavaScript (js_pdf). The motivation was that dart_pdf&#x27;s...
canonical: https://daily.dev/posts/i-ported-dart-pdf-to-pure-javascript--ypugbs6sa
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I ported dart_pdf to pure JavaScript. | daily.dev
og:description: A developer has ported dart_pdf — a Flutter-inspired declarative PDF generation library — to pure JavaScript (js_pdf). The motivation was that dart_pdf&#x27;s...
og:url: https://daily.dev/posts/i-ported-dart-pdf-to-pure-javascript--ypugbs6sa
og:image: https://api.daily.dev/og/posts/YPUgbs6sA.png
og:image:alt: I ported dart_pdf to pure JavaScript.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

[![romulocampos's profile](https://lh3.googleusercontent.com/a/ACg8ocIQB46_LktrQ2UtNorgTT0WYOTsSvIaoUa5X-XkdBy-Ogh68C9e=s64-c)](https://daily.dev/romulocampos)[Romulo Campos@romulocampos•Aug 0810](https://daily.dev/romulocampos)

# I ported dart\_pdf to pure JavaScript.

[![Post cover image](https://media.daily.dev/image/upload/s--lbly68fV--/f_auto/v1786163031/posts/YPUgbs6sA?_a=BAMAMicg0)](https://media.daily.dev/image/upload/s--lbly68fV--/f%5Fauto/v1786163031/posts/YPUgbs6sA?%5Fa=BAMAMicg0)

9 Impressions1 Upvote

Comment

Bookmark

Copy

![Placeholder image for anonymous user](https://media.daily.dev/image/upload/s--qsFuKGv_--/t_logo,f_auto/public/noProfile)Share your thoughtsPost

[![romulocampos's user avatar](https://lh3.googleusercontent.com/a/ACg8ocIQB46_LktrQ2UtNorgTT0WYOTsSvIaoUa5X-XkdBy-Ogh68C9e=s96-c)](https://daily.dev/romulocampos)

[Romulo Campos](https://daily.dev/romulocampos)

[@romulocampos](https://daily.dev/romulocampos)

Joined Sep 25\. 2025

10

#### Would you recommend this post?

Copy link

WhatsApp

Facebook

X

New Squad

Copy linkShare with your friends

1

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/i-ported-dart-pdf-to-pure-javascript--ypugbs6sa","headline":"I ported dart_pdf to pure JavaScript.","text":"A developer has ported dart_pdf — a Flutter-inspired declarative PDF generation library — to pure JavaScript (js_pdf). The motivation was that dart_pdf's widget-based layout model (Column, Row, Container, Table) is far superior to coordinate-based PDF libraries, but was only available in Dart. The port produces a single ES module (~400 KB minified) with no DOM, Canvas, Buffer, or runtime dependencies, running identically in Node, browsers, Deno, and ClearScript. Key engineering challenges included memory management (replacing number[] with Uint8Array to avoid 480 MB heap bloat for large images) and preserving the layout/paint ordering contract from Flutter's render model. LLM agents accelerated the translation of ~37,000 lines, but correctness was validated through 447 tests and a benchmark suite ported from the original dart_pdf examples. The library is released as Apache-2.0 and explicitly credits David PHAM-VAN as the original author of all design decisions.","url":"https://daily.dev/posts/i-ported-dart-pdf-to-pure-javascript--ypugbs6sa","datePublished":"2026-08-08T04:23:50.079Z","dateModified":"2026-08-09T04:01:26.902Z","author":{"@type":"Person","name":"Romulo Campos","url":"https://daily.dev/romulocampos","image":"https://lh3.googleusercontent.com/a/ACg8ocIQB46_LktrQ2UtNorgTT0WYOTsSvIaoUa5X-XkdBy-Ogh68C9e=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":10}},"image":"https://media.daily.dev/image/upload/s--lbly68fV--/f_auto/v1786163031/posts/YPUgbs6sA?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/xxs5xhakflh0lsvocsnf9","name":"Romulo Campos"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Romulo Campos","item":"https://daily.dev/sources/xxs5xhakflh0lsvocsnf9"},{"@type":"ListItem","position":3,"name":"I ported dart_pdf to pure JavaScript."}]}
```

