just testing aspose.pdf.10.4.1.jar for converting pdf. to images.
I always get null pointer error in the xxxDevice.process() function.
(using the same code as on your tutorial: http://www.aspose.com/docs/display/pdfjava/Convert+PDF+Pages+to+JPEG+Image)
The same does happen with all ImageDevices.
I see stackTrace is referenced from those:
I am successfully using aspose.slides to put together images to a ppt and i wanted also to use aspose to generate those images from pdf…
You were just minutes quicker than me.
I was doing this over the weekend. Standalone it’s working.
It was supposed to run inside a tomcat environment. I guess it has some conflict with another library…
do you have any reports on that? or how to nail down the source of the problem?
Would be great if we can find out something.
Here’s part of the error stacktrace:
class com.aspose.pdf.internal.p348.z72: java.lang.NullPointerException —> java.lang.NullPointerException
— End of inner exception stack trace —
just happens in the last line of this code part:
// Create Resolution object
com.aspose.pdf.devices.Resolution resolution = new com.aspose.pdf.devices.Resolution(300);
// Create JpegDevice object where second argument indicates the quality of resultant image
com.aspose.pdf.devices.JpegDevice jpegDevice = new com.aspose.pdf.devices.JpegDevice(resolution, 100);
// Convert a particular page and save the image to stream
Does that help to narrow the search?
Now that’s interesting.
I deployed it on the testserver with tomcat 6.0.44 and there it works.
On the machine i developed first, was still tomcat 5.5.25, so seems to be a problem with that version. All the external jars are the same on both machines.
And also java 1.7.0_79 the same.
My machine has Win7-64, on the testserver win2008.
So for me, it’s ok, i can continue my tests with aspose.pdf within tomcat.
Thanks a lot!
(But would still be interesting to know the reason…)