huxerui.pdf
importPDF document and declarative view component for HuxerUI, powered by PDFium
import huxerui.pdf;
模組名讀自上游 modules/pdf.cppm 裡的 `export module` 宣告。
mcpp add huxerui.pdf@0.2.1
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// Headless C++23 module consumer test for huxerui.pdf.
// Verifies package resolution, transitive huxerui.huxerui & compat.pdfium linking,
// minimal PDF 1.4 loading/rendering/PNG export, and malformed-PDF PdfException
// throwing across the C++23 module boundary.
import std;
import huxerui;
import huxerui.pdf;
namespace {
void Require(bool condition, std::string_view message) {
if (!condition) {
throw std::runtime_error(std::string(message));
}
}
constexpr std::string_view kMinimalPdf =
"%PDF-1.4\n"
"1 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n"
"2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n"
"3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 200 100] >>\nendobj\n"
"xref\n0 4\n"
// …
tests/examples/huxerui-pdf/tests/pdf.cpp · 專案 tests/examples/huxerui-pdf
建置 · 上游資訊清單
- modules
huxerui.pdf- targets
huxerui_pdf (lib), pdf (lib)- language
c++23- manifest version
0.2.1- dependencies
huxerui, compat- 來源
https://raw.githubusercontent.com/HuxerUI/Lib-PDF/v0.2.1/mcpp.toml
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
0.2.1 最新 |
LinuxWindowsmacOS | 來源 | 075cf0a73e51… |