01
Dev.to Kotlin
作者:Nurmuhammad
發布:05-16 10:33
PdfKmp 1.0: A Kotlin Multiplatform PDF Library for Android and iOS
You write the document once and ship it to both stores.
重點摘要
KMP-first design with DSL, layout engine, and document model in commonMain
Vector-only output for text and graphics, with native PDF rendering on each platform
Stable 1.0 release with SemVer, Apache 2.0, and no third-party PDF engine
PdfKmp 1.0 is a Kotlin Multiplatform PDF library built to let developers define documents once and render them natively on Android and iOS. Its DSL, layout engine, and document model all live in commonMain, while output is dispatched to each platform’s native PDF stack. The library includes page layout tools, rich text, tables, decorations, headers and footers, hyperlinks, font handling, images, vector graphics, and storage options. It emphasizes vector output for crisp, searchable, and compact PDFs, and it keeps Android/iOS parity by pinning the bundled Inter font and making fallbacks explicit. The project is stable, SemVer-based, Apache 2.0 licensed, and free of third-party PDF engines.
PdfKmp 1.0:面向 Android 和 iOS 的 Kotlin Multiplatform PDF 库
你只需写一次文档,就能同时发布到两个平台商店。
重點摘要
以 KMP 为核心,DSL、布局引擎和文档模型都位于 commonMain
采用向量输出并调用各平台原生 PDF 栈,保证清晰度与可搜索性
1.0 稳定版,遵循 SemVer、Apache 2.0,且不依赖第三方 PDF 引擎
PdfKmp 1.0 是一个以 Kotlin Multiplatform 为核心的 PDF 库,目标是让开发者只需编写一次文档,就能在 Android 和 iOS 上通过各自的原生 PDF 栈生成输出。它的 DSL、布局引擎和文档模型都放在 commonMain,功能覆盖页面结构、富文本、表格、装饰、页眉页脚、超链接、字体、图片、矢量图形和存储等。PdfKmp 强调向量化输出,除真实照片外不做栅格化,因此文件更小、缩放更清晰,也更利于搜索与无障碍访问。项目已稳定到 1.0,遵循 SemVer,采用 Apache 2.0 许可,并且不使用第三方 PDF 引擎。
PdfKmp 1.0:適用於 Android 與 iOS 的 Kotlin Multiplatform PDF 函式庫
你只需撰寫一次文件,就能同時發佈到兩個平台商店。
重點摘要
以 KMP 為核心,DSL、排版引擎與文件模型皆在 commonMain
採向量輸出與各平台原生 PDF 堆疊,兼顧清晰度與可搜尋性
1.0 穩定版,遵循 SemVer、Apache 2.0,且不依賴第三方 PDF 引擎
PdfKmp 1.0 是一套以 Kotlin Multiplatform 為核心的 PDF 函式庫,讓開發者只需撰寫一次文件,就能在 Android 與 iOS 以原生 PDF 堆疊輸出。其 DSL、排版引擎與文件模型都放在 commonMain,並提供頁面結構、富文字、表格、裝飾、頁首頁尾、超連結、字型、圖片、向量圖形與儲存等能力。PdfKmp 強調向量化輸出,除真實照片外皆不轉成點陣圖,因此檔案更小、縮放更銳利,也更容易搜尋與無障礙存取。專案已達 1.0 穩定版,採 SemVer、Apache 2.0 授權,且不使用第三方 PDF 引擎。