HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › NullPointerException in command line convert
- This topic has 3 replies, 2 voices, and was last updated Nov 15, 2010
02:03:58 byAnonymous.
-
AuthorPosts
-
June 17, 2009 at 12:28#26205
HI I’m trying to convert an HTML file to PDF using pd4ml 3.5 on MacOSX 10.4.11
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-275)We’re getting an exception and the file is not readable.
The exception is:
Exception in thread "main" java.lang.NullPointerException at org.zefer.html.doc.b.i.String(Unknown Source) at org.zefer.html.doc.x.o00000(Unknown Source) at org.zefer.html.doc.b.d.o00000(Unknown Source) at org.zefer.html.doc.x.o00000(Unknown Source) at org.zefer.html.doc.b.d.o00000(Unknown Source) at org.zefer.html.doc.x.o00000(Unknown Source) at org.zefer.html.doc.b.d.o00000(Unknown Source) at org.zefer.html.doc.x.o00000(Unknown Source) at org.zefer.html.doc.Document.paint(Unknown Source) at org.zefer.pd4ml.PD4ML.o00000(Unknown Source) at org.zefer.pd4ml.PD4ML.render(Unknown Source) at org.zefer.pd4ml.PD4ML.render(Unknown Source) at org.zefer.pd4ml.tools.PD4Browser$PD4Converter.o00000(Unknown Source) at org.zefer.pd4ml.tools.PD4Browser$PD4Converter.access$800(Unknown Source) at org.zefer.pd4ml.tools.PD4Browser.main(Unknown Source)
We’ve checked the CSS and HTML but not sure what to look for.
Any suggestions appreciated
June 17, 2009 at 13:17#27329OK, more information…
The problem is an img tag with style information.

The website docs say img style, left and top are all supported (e.g. since v350)
The trial 3.50 version I have has docs that say that left and top are not supported at all.Which is it?
Is the trial download not the 3.5 version?
If not, can we get a trial version which is?
If it is, why isn’t this working?thanks!
mJune 17, 2009 at 16:10#27330It is a bug in v350 code and it seems the actual development build v351 fixes the problem. I’ve just sent it to you by email to test on your side.
A temporal v350 workaroung for the problem is to absolutely position not the image, but its enclosing DIV:
<div style="position:absolute;left:395pt;top:37pt"> <img alt="Image from the forum topic: NullPointerException in command line convert" src="TSTB_images/img-gen6.png"/> </div>
November 15, 2010 at 02:03#27331Thanks, when I try this div style it works for 3.5 and 3.51
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
