psliwa / PdfBundle

This bundle integrates Symfony2 with PHPPdf library.
http://ohey.pl
MIT License
120 stars 45 forks source link

Error blank space character not defined #71

Open prakashsinghgaur opened 8 years ago

prakashsinghgaur commented 8 years ago

I have a field in which users will enter full html text and a pdf should be generated.

But when I enter a blank space using some text editor which is   the following error comes:-

Xml parsing error "Entity 'nbsp' not defined So, how this   character can be defined in xmlParser.

I guess there might be more html entities like this one which are not identified by the xmlParser.

Thanks

prakashsinghgaur commented 7 years ago

specifying doctype in the pdf twig template resolved the issue:-

<!DOCTYPE pdf SYSTEM "%resources%/dtd/doctype.dtd">