dmk99 / react-pdf-table

Storybook Available
https://dmk99.github.io/react-pdf-table
MIT License
153 stars 62 forks source link

getContent How do I support Dom rendering #13

Closed leishihong closed 4 years ago

leishihong commented 4 years ago

image

dmk99 commented 4 years ago

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>
})