import React from 'react'; import { Document, Page, Text, View, StyleSheet, Font, Image } from '@react-pdf/renderer'; export interface PersonData { name: string; role: string; phone: string; email: string; } interface PDFBusinessCardProps { person: PersonData; logoWhitePath: string; logoBluePath: string; logoFullPath: string; truckImagePath: string; qrCodeDataUrl: string; } const styles = StyleSheet.create({ page: { width: '85mm', height: '55mm', backgroundColor: '#ffffff', position: 'relative', fontFamily: 'Helvetica', }, pageBleed: { // 85x55mm + 3mm bleed on each side = 91x61mm width: '91mm', height: '61mm', backgroundColor: '#ffffff', position: 'relative', fontFamily: 'Helvetica', overflow: 'hidden', }, // FRONT PAGE frontContainer: { flex: 1, position: 'relative', padding: '8mm', }, frontLogo: { position: 'absolute', top: '5mm', right: '5mm', width: '25mm', }, truckImage: { position: 'absolute', bottom: '-2mm', left: '-5mm', width: '100mm', // cover bleed width height: '50mm', objectFit: 'contain', }, // BACK PAGE backContainer: { flex: 1, position: 'relative', padding: '6mm 6mm', }, backLogo: { width: '20mm', marginBottom: '8mm', }, backMiddle: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8mm', }, nameSection: { flexDirection: 'column', width: '35%', }, nameText: { fontSize: 16, fontWeight: 700, color: '#000000', marginBottom: 2, }, roleText: { fontSize: 8, fontWeight: 400, color: '#333333', }, contactSection: { flexDirection: 'column', width: '45%', paddingLeft: '2mm', }, contactRow: { flexDirection: 'row', alignItems: 'center', marginBottom: 3, }, iconCircle: { width: 12, height: 12, borderRadius: 6, backgroundColor: '#82ed20', justifyContent: 'center', alignItems: 'center', marginRight: 4, }, contactText: { fontSize: 6.5, fontWeight: 500, color: '#000000', }, qrSection: { width: '20%', alignItems: 'flex-end', }, qrCode: { width: '18mm', height: '18mm', }, footer: { position: 'absolute', bottom: '5mm', left: '6mm', right: '6mm', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', }, footerText: { fontSize: 6.5, fontWeight: 500, color: '#000000', }, pipe: { fontSize: 6.5, fontWeight: 500, color: '#82ed20', marginHorizontal: 3, }, }); export const PDFBusinessCard: React.FC = ({ person, logoFullPath, truckImagePath, qrCodeDataUrl, }) => { return ( {/* FRONT - 91x61mm with Bleed */} {/* BACK - 91x61mm with Bleed */} {person.name} {person.role} {person.phone} {person.email} klz-cables.com KLZ Vertriebs GmbH | Raiffeisenstraße 22 | 73630 Remshalden ); };