mcpp index

compat.pdfium

PDFium — Chromium PDF rendering and manipulation C library (prebuilt binaries from pdfium-binaries, Chromium 160.0.8165.0)

mcpp add compat.pdfium@8165

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Runtime roundtrip test — verify compat.pdfium 8165 creates, saves, reloads, and renders a PDF
#include <fpdfview.h>
#include <fpdf_edit.h>
#include <fpdf_save.h>
#include <cpp/fpdf_scopers.h>
import std;

namespace {

struct MemWriter {
    FPDF_FILEWRITE base;
    std::vector<unsigned char> bytes;
};

int write_block(FPDF_FILEWRITE* self, const void* data, unsigned long size) {
    auto* writer = reinterpret_cast<MemWriter*>(self);
    const auto* ptr = static_cast<const unsigned char*>(data);
    writer->bytes.insert(writer->bytes.end(), ptr, ptr + size);
    return 1;
}

} // namespace
// …

tests/examples/pdfium/tests/test_pdfium.cpp · 项目 tests/examples/pdfium

构建

targets
pdfium (lib)
language
c++23
C standard
c11
import std
no
include dirs
include, include/cpp

源文件 (1)

  • mcpp_generated/pdfium_anchor.c

生成的文件

  • mcpp_generated/pdfium_anchor.c

版本

版本平台 镜像sha256
8165 最新 LinuxWindowsmacOS CN GLOBAL ba7865e16c02…