-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Checking with Adobe Pro > Use Print Production > Preflight i always get error message that Helvetica is not embedded even tho i have it registered
Here is example code
import { Document, Font, Page, PDFViewer, StyleSheet, Text } from '@react-pdf/renderer'
const PAGE_WIDTH = 6.25 * 72
const PAGE_HEIGHT = 9.25 * 72
const PAGE_PADDING = 40
Font.register({
family: 'Helvetica',
src: '/fonts/Helvetica.ttf',
})
export const BookPdfV3 = () => {
return (
<div style={{ width: '100vw', height: '100vh' }}>
<PDFViewer style={{ width: '100%', height: '100%' }}>
<Document>
<Page size={[PAGE_WIDTH, PAGE_HEIGHT]} style={CSS.page}>
<Text style={{ fontFamily: 'Helvetica' }}>Test</Text>
</Page>
</Document>
</PDFViewer>
</div>
)
}
const CSS = StyleSheet.create({
page: {
padding: PAGE_PADDING,
fontSize: 12,
fontFamily: 'Helvetica',
},
})
Metadata
Metadata
Assignees
Labels
No labels