HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › pdf renders garbled png image
- This topic has 8 replies, 3 voices, and was last updated Nov 06, 2013
14:14:27 byPD4ML.
-
AuthorPosts
-
December 17, 2010 at 00:48#26490
Hi,
I am evaluating pd4ml and have run into a problem where, when my test html file references a png image, the image in the resultant pdf file comes out garbled.
I’ve tested converting the png image to gif, and then the resultant pdf file renders the image correctly, so I’m wondering if there are known bugs regarding png images?
Thanks.
December 21, 2010 at 16:07#28320An HTML document sample and its PDF output, sent to support pd4ml com would help us to analyze the problem reasons.
December 21, 2010 at 18:56#28321Sure, here’s the sample html I’m using (just using wikipedia’s png logo to test):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Test</title> </head> <body> <img src="http://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png" /> </body> </html>
And I’ve attached the pdf output.
December 21, 2010 at 19:04#28322Well, it seems to be .NET specific issue. I’ve just tested with Java version – everything is ok. See attached.
Which version of PD4ML do you use?
December 21, 2010 at 19:25#28323Hi, yes, we are using the .Net version: pd4ml.pro.trial.dotnet20.360b3
December 27, 2010 at 10:33#28324As I see the issue impacts PNG24 images with alpha (translucency) layer only. We’ve been working on a bugfix.
January 4, 2011 at 19:25#28325Thank you. Please let me know when the fix is available.
November 6, 2013 at 13:20#28326Hi,
I am converting google charts to SVG images using bellow article
http://www.battlehorse.net/page/topics/charts/save_google_charts_as_image.html
Here I am getting SVG image path using canvas.toDataURL(), By using this path I can show image in html but not in PD4ML pdf as it is throwing an error
‘ERROR STDERR – Bad Base64 input character at 6644: 59(decimal)’.
can u please tell me how to show svg images in PD4ML files.Sathish
November 6, 2013 at 14:14#28327Unfortunately PD4ML does not support JavaScript and Canvas – so most probably that is the problem reason.
On the other hand if you generate the chart in a regular browser, extract the image as a base64-encoded data URL and pass the image to PD4ML to be converted to PDF – the trick may work.
In the case it would help if you send us a typical data URL, obtained with canvas.toDataURL(). We’ll check what could be done.
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
