xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Armhold <armh...@cs.rutgers.edu>
Subject bug in PrintTranscoder (and a patch)
Date Fri, 11 Jun 2004 08:09:17 GMT
Hi,

There's a bug in the PrintTranscoder- if the user chooses (via the
print dialog) to print a range of pages that does not begin with the
first page, a NPE is generated:

java.lang.NullPointerException
	at 
org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:283)
	at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1487)
	at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1085)
	at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:986)
	at 
org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:264)
	at edu.rutgers.elearning.util.SVGPrintJob.run(SVGPrintJob.java:101)
	at java.lang.Thread.run(Thread.java:534)
java.lang.NullPointerException
	at 
org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:283)
	at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1487)
	at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1085)
	at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:986)
	at 
org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:264)
	at edu.rutgers.elearning.util.SVGPrintJob.run(SVGPrintJob.java:101)
	at java.lang.Thread.run(Thread.java:534)


A trivial patch is included below.  Cheers.

Index: PrintTranscoder.java
===================================================================
RCS file: 
/home/cvspublic/xml-batik/sources/org/apache/batik/transcoder/print/PrintTranscoder.java,v
retrieving revision 1.28
diff -r1.28 PrintTranscoder.java
276c276
<         if(pageIndex == 0){
---
 >         if(printedInputs == null){



-- 
George Armhold
Rutgers University
eLearning Grant, DCIS

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message