innoveit / play2-pdf

A PDF module for Play Framework 2
MIT License
77 stars 22 forks source link

Does not output colored font / background. #22

Closed playtowork closed 7 years ago

playtowork commented 7 years ago

Something as simple as the below template does not work. It creates the pdf but the text is black and the background color is still white. Am I missing something, or does this really not support colored font / background?

Specifically, I am doing the following from my Controller: return ok(pdfGenerator.toBytes(previewStuff.render(), urlBase)).as("application/pdf");

This is the scala view template file (previewStuff.scala.html): @()

\

hi there \
\div style='background-color: red'> bye there \

marcosinigaglia commented 7 years ago

Hi, have you tried the example project? The font color and backgroud is supported.