import { Font, Document, Page, View, Text } from '@formepdf/react';
import { renderDocument } from '@formepdf/core';
Font.register({ family: 'Inter', src: './fonts/Inter-Regular.ttf' });
Font.register({ family: 'Inter', src: './fonts/Inter-Medium.ttf', fontWeight: 500 });
Font.register({ family: 'Inter', src: './fonts/Inter-SemiBold.ttf', fontWeight: 600 });
Font.register({ family: 'Inter', src: './fonts/Inter-Bold.ttf', fontWeight: 700 });
const pdf = await renderDocument(
<Document>
<Page size="A4" margin={54}>
<Text style={{ fontFamily: 'Inter', fontWeight: 400 }}>Regular (400)</Text>
<Text style={{ fontFamily: 'Inter', fontWeight: 500 }}>Medium (500)</Text>
<Text style={{ fontFamily: 'Inter', fontWeight: 600 }}>SemiBold (600)</Text>
<Text style={{ fontFamily: 'Inter', fontWeight: 700 }}>Bold (700)</Text>
</Page>
</Document>
);