fix(pdf): make KLZ paths solid to prevent see-through, add dimensions to viaprinto filename
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Failing after 1m20s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s

This commit is contained in:
2026-06-11 19:17:37 +02:00
parent 5e8a175a53
commit 175cb10e01
8 changed files with 17 additions and 2 deletions

View File

@@ -366,17 +366,29 @@ const VectorLogo = ({
overrideColor, overrideColor,
overrideWhiteColor, overrideWhiteColor,
pathOverrides, pathOverrides,
solidPaths,
}: { }: {
paths: { d: string; fill: string }[]; paths: { d: string; fill: string }[];
style: any; style: any;
overrideColor?: string; overrideColor?: string;
overrideWhiteColor?: string; overrideWhiteColor?: string;
pathOverrides?: Record<number, string>; pathOverrides?: Record<number, string>;
solidPaths?: number[];
}) => ( }) => (
<Svg viewBox="0 0 295 99" style={style}> <Svg viewBox="0 0 295 99" style={style}>
<G {...({ fillRule: 'evenodd', clipRule: 'evenodd' } as any)}> <G {...({ fillRule: 'evenodd', clipRule: 'evenodd' } as any)}>
{paths.map((p, i) => { {paths.map((p, i) => {
let fill = overrideColor || p.fill; let fill = overrideColor || p.fill;
let d = p.d;
if (solidPaths && solidPaths.includes(i)) {
// Keep only the first subpath to make the shape solid (remove holes)
const zIndex = d.toUpperCase().indexOf('Z');
if (zIndex !== -1) {
d = d.substring(0, zIndex + 1);
}
}
if (pathOverrides && pathOverrides[i]) { if (pathOverrides && pathOverrides[i]) {
fill = pathOverrides[i]; fill = pathOverrides[i];
} else if ( } else if (
@@ -385,7 +397,7 @@ const VectorLogo = ({
) { ) {
fill = overrideWhiteColor; fill = overrideWhiteColor;
} }
return <Path key={i} d={p.d} fill={fill} />; return <Path key={i} d={d} fill={fill} />;
})} })}
</G> </G>
</Svg> </Svg>
@@ -786,6 +798,7 @@ export const PDFBusinessCard: React.FC<PDFBusinessCardProps> = ({
paths={getFrontLogoPaths()} paths={getFrontLogoPaths()}
style={styles.frontLogo} style={styles.frontLogo}
pathOverrides={KLZ_PATHS.reduce((acc, idx) => ({ ...acc, [idx]: COLORS.blue }), {})} pathOverrides={KLZ_PATHS.reduce((acc, idx) => ({ ...acc, [idx]: COLORS.blue }), {})}
solidPaths={KLZ_PATHS}
/> />
{/* Letterpress Mask Layer: We use #ff00fe as a marker color. Only the "KLZ" letters! */} {/* Letterpress Mask Layer: We use #ff00fe as a marker color. Only the "KLZ" letters! */}
@@ -793,6 +806,7 @@ export const PDFBusinessCard: React.FC<PDFBusinessCardProps> = ({
paths={getFrontLogoPaths().filter((_, i) => KLZ_PATHS.includes(i))} paths={getFrontLogoPaths().filter((_, i) => KLZ_PATHS.includes(i))}
style={[styles.frontLogo, { position: 'absolute' }]} style={[styles.frontLogo, { position: 'absolute' }]}
overrideColor="#ff00fe" overrideColor="#ff00fe"
solidPaths={KLZ_PATHS.map((_, i) => i)}
/> />
</View> </View>
</Page> </Page>
@@ -805,6 +819,7 @@ export const PDFBusinessCard: React.FC<PDFBusinessCardProps> = ({
paths={getBackLogoPaths()} paths={getBackLogoPaths()}
style={styles.backLogo} style={styles.backLogo}
overrideWhiteColor={COLORS.primary} overrideWhiteColor={COLORS.primary}
solidPaths={KLZ_PATHS}
/> />
<View style={styles.accentLineHorizontal} /> <View style={styles.accentLineHorizontal} />
</View> </View>

View File

@@ -95,7 +95,7 @@ END:VCARD`;
console.log(`✓ Final Print File generated (Fonts to Paths, RGB preserved): ${finalFileName}`); console.log(`✓ Final Print File generated (Fonts to Paths, RGB preserved): ${finalFileName}`);
// Convert to CMYK for Viaprinto // Convert to CMYK for Viaprinto
const finalFileNameCMYK = `KLZ_Visitenkarte_${safeName}_Viaprinto_CMYK.pdf`; const finalFileNameCMYK = `KLZ_Visitenkarte_${safeName}_Viaprinto_CMYK_91x61mm_3mmBleed.pdf`;
const finalPathCMYK = path.join(CONFIG.outputDir, finalFileNameCMYK); const finalPathCMYK = path.join(CONFIG.outputDir, finalFileNameCMYK);
console.log(`- Converting to CMYK for Viaprinto...`); console.log(`- Converting to CMYK for Viaprinto...`);