I was provided with a pdf file containing placeholder texts: https://drive.google.com/file/d/1jdfde-enJ5_MksYm2CmakNQyLbDNExgE/view?usp=sharing
In that I want using php to replace the text ${NAME}
Into a specified value.
But as long as I searched I found no example on how to do that. Do you have any idea on how to do…
Top comments (3)
It's simple thing. Use domPDF to parse the file. Store content in some variable and then apply str_replace()
Can you provide me an example? Also DOMPdf generates Pdf from html files.
This is easy with JavaScript + ReactJS + react-pdf. But sadly you are in the PHP world.