/* eslint-disable */ import * as React from "react"; import { Document, Page, Image, ImageBackground, View, pdf } from "@react-pdf/renderer"; import fs from "fs"; async function main() { const buf = fs.readFileSync("/tmp/debug-logo.png"); console.log("=== Test 1: Image (default) ==="); const inst1 = pdf( ); const out1 = Buffer.from(await inst1.toString(), "binary"); console.log(" size:", out1.length); console.log("=== Test 2: ImageBackground (no debug) ==="); const inst2 = pdf( ); const out2 = Buffer.from(await inst2.toString(), "binary"); console.log(" size:", out2.length); console.log("=== Test 3: SVG with embedded JPEG base64 ==="); const b64 = buf.toString("base64"); const svg = ``; const inst3 = pdf( ); const out3 = Buffer.from(await inst3.toString(), "binary"); console.log(" size:", out3.length); } main().catch(e => { console.error("FAIL:", e); process.exit(1); });