Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG support #25

Open
ananthrk opened this issue Jun 20, 2012 · 0 comments
Open

SVG support #25

ananthrk opened this issue Jun 20, 2012 · 0 comments

Comments

@ananthrk
Copy link

I am using the play-pdf module with play-1.2.3 to generate PDF from template html files. My approach is to send the html source (using document.documentElement.innerHTML) to the server and temporarily storing the html source to a ".html" file and use renderPDF function to generate the PDF. This works fine for normal pages. However, if my pages contain charts (either Google charts or jqplot), then I get the following exception:

Oops: CConvertException
An unexpected error occured caused by exception CConvertException: ERROR: An unhandled exception occured: null

play.exceptions.UnexpectedException: Unexpected Error
at play.modules.pdf.RenderPDFTemplate.apply(RenderPDFTemplate.java:102)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:244)
at Invocation.HTTP Request(Play!)
Caused by: org.allcolor.yahp.converter.IHtmlToPdfTransformer$CConvertException: ERROR: An unhandled exception occured: null
at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:809)
at play.modules.pdf.RenderPDFTemplate.renderDoc(RenderPDFTemplate.java:142)
at play.modules.pdf.RenderPDFTemplate.renderPDF(RenderPDFTemplate.java:118)
at play.modules.pdf.RenderPDFTemplate.apply(RenderPDFTemplate.java:100)
... 2 more
Caused by: java.lang.NullPointerException
at org.allcolor.yahp.cl.converter.CHtmlToPdfFlyingSaucerTransformer.transform(CHtmlToPdfFlyingSaucerTransformer.java:700)
... 5 more

Is this due to the charts being SVG? If yes, how can I make play-pdf handle SVG content? If not, what could be source of this error? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant