mcpp index

huxerui.pdf

import

PDF 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…