Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getContent How do I support Dom rendering #13

Closed
leishihong opened this issue Feb 26, 2020 · 1 comment
Closed

getContent How do I support Dom rendering #13

leishihong opened this issue Feb 26, 2020 · 1 comment

Comments

@leishihong
Copy link

leishihong commented Feb 26, 2020

image

@dmk99
Copy link
Owner

dmk99 commented Mar 14, 2020

Hi, unfortunately you can't use DOM components. If you want a custom display you need to utilise the react-pdf components e.g. View, Text, Image etc. You would then apply a custom style to these elements to get the required look and feel.

More information on the components here: https://react-pdf.org/components

Regarding your example above you could use:

getContent={r => {
   return <View><Text>{r.lastName}</Text></View>
})

@dmk99 dmk99 closed this as completed Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants