PDF export preserve styling
PDF export preserve styling
nvtkhanh
Posts: 2Questions: 1Answers: 0
I would like to preserve styling on PDF export but I can't seem to find a solution on the forum, Any help to point to the right direction would be greatly appreciated.
Data as presented in the table
Exported as PDF
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @nvtkhanh ,
pdfmake is flexible, so you can do a fair bit with the configuiration. These examples, here, here and here should help get you started.
Cheers,
Colin
Thank you for your response @colin
I have played a bit with the styling, however, as shown in the screen shot above, the most important feature to make a lengthy text readable is by having them separated as paragraphs - basically adding new line characters.
I've searched many different resources, but I can't seem to find a reference to having new lines (through DataTables that is). The closest I have got to is Issue 205 on pdfmake's github
Is there an easy way to replace
tags with a new line character?
Hi @nvtkhanh ,
Take a look at this example here. I've changed the export so all spaces in the second column are converted to newlines. You could so something similar, either break after a number of words/characters/etc to get what you want.
Cheers,
Colin