mcpp index

huxerui.pdf

import

PDF document and declarative view component for HuxerUI, powered by PDFium

import huxerui.pdf;

Module name read from the upstream `export module` declaration in modules/pdf.cppm.

mcpp add huxerui.pdf@0.2.1

Usage

From this repository's own test project — built and run by CI, not written for the website.

// 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 · project tests/examples/huxerui-pdf

Build · upstream manifest

modules
huxerui.pdf
targets
huxerui_pdf (lib), pdf (lib)
language
c++23
manifest version
0.2.1
dependencies
huxerui, compat
source
https://raw.githubusercontent.com/HuxerUI/Lib-PDF/v0.2.1/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.2.1 latest LinuxWindowsmacOS source 075cf0a73e51…