fix(pdf): remove unsupported text borders and gap causing layout crash
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 1m26s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s

This commit is contained in:
2026-04-21 10:07:28 +02:00
parent 5021259d22
commit 7922210ef0
2 changed files with 25 additions and 8 deletions

View File

@@ -52,7 +52,8 @@ const styles = StyleSheet.create({
logo: {
width: 60,
height: 'auto',
height: 30,
objectFit: 'contain',
},
docType: {
@@ -103,10 +104,13 @@ const styles = StyleSheet.create({
fontSize: 14,
fontWeight: 700,
color: C.navyDeep,
marginTop: 24,
marginBottom: 12,
textTransform: 'uppercase',
letterSpacing: 0.8,
},
heading1Wrapper: {
marginTop: 24,
marginBottom: 12,
borderLeftWidth: 3,
borderLeftColor: C.accent,
paddingLeft: 12,
@@ -186,7 +190,6 @@ const styles = StyleSheet.create({
footerInfo: {
flexDirection: 'column',
gap: 2,
},
footerBrand: {
@@ -195,7 +198,7 @@ const styles = StyleSheet.create({
color: C.navyDeep,
textTransform: 'uppercase',
letterSpacing: 1,
marginBottom: 2,
marginBottom: 4,
},
footerText: {
@@ -244,14 +247,28 @@ const renderLexicalNode = (node: any, idx: number): React.ReactNode => {
case 'heading': {
let hStyle = styles.heading3;
if (node.tag === 'h1') hStyle = styles.heading1;
let isH1 = false;
if (node.tag === 'h1') {
hStyle = styles.heading1;
isH1 = true;
}
if (node.tag === 'h2') hStyle = styles.heading2;
return (
const content = (
<Text key={idx} style={hStyle}>
{node.children?.map((child: any, i: number) => renderLexicalNode(child, i))}
</Text>
);
if (isH1) {
return (
<View key={idx} style={styles.heading1Wrapper}>
{content}
</View>
);
}
return content;
}
case 'list': {