Search code examples
javahtmlpdfflying-saucerxhtmlrenderer

Using an ampersand in flying saucer


I get the error below when converting to PDF with flying saucer. I've removed the ampersand charector and it worked, so this seems to be the problem. How do I include ampersand's in my PDF documents? Thanks in advance.

ERROR: 'The entity name must immediately follow the '&' in the entity reference.'


Solution

  • Just replace & with &

    NOTE:That won't work for filenames, just content.