I have problem with displaying Persian text on a PDF file. while rendering the component it works fine but when saving it as a PDF file it shows dummy text.
how it displays on webpage
and when downloaded
My code:
import font from "./IRANsans.ttf";
Font.register({
family: "IRANSans",
format: "truetype",
src: font,
});
const styles = StyleSheet.create({
page: {
fontFamily: "IRANSans",
},
<Document style={{ backgroundColor: "white", padding: "10px" }}>
<Page size="A4" style={styles.page}>
<View >
<Text>متن نوشته شده به فارسی</Text>
</View>
</Page>
</Document>
any solution or suggestion? thanks

