Formatting wordpress text-editor line breaks for fpdf
I'm currently working on a script that essentially takes a wordpress post
entry and pastes it into a pdf along with a bunch of other info.
When I look at how wordpress saves text from its editor to the database,
it stores linebreaks as simply new lines, without an html tag. (There must
be better way to say this but I don't know what it is.) The library that
I'm referencing, FPDF, seems to need an explicit <br/> or equivalent to do
a line break.
So my question is:
How do I tell my script to replace these wordpress linebreaks with a <br/>?
Or if you're familiar with FPDF and have a better suggestion, please feel
free to share.
I'm also looking for the intelligent way to refer to these sans-html-tag
"wordpress-created line breaks"
Help with any of these three issues would be much appreciated.
No comments:
Post a Comment