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…