fix(pdf): resolve crash in yoga engine caused by absolute positioning and empty paragraphs

This commit is contained in:
2026-04-21 13:46:38 +02:00
parent 529696ba8e
commit 06dac33ef8
17 changed files with 7214 additions and 48 deletions

19
test-pdf-node.tsx Normal file
View File

@@ -0,0 +1,19 @@
import React from 'react';
import { renderToFile } from '@react-pdf/renderer';
import { PDFPage } from './lib/pdf-page';
import fs from 'fs';
const pageData = JSON.parse(fs.readFileSync('./lexical_avb.json', 'utf8'));
const page = { title: "Test AVB", content: pageData };
async function run() {
try {
await renderToFile(<PDFPage page={page} locale="de" />, 'test-render.pdf');
console.log('PDF rendered successfully offline!');
} catch(e) {
console.error('PDF Generation failed:');
console.error(e);
}
}
run();