xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: bug in PrintTranscoder (and a patch)
Date Wed, 23 Jun 2004 18:40:00 GMT
Hi George,

    Thanks for point this out.  Should be fixed soon.


George Armhold wrote:

> 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){
> 
> 
> 


---------------------------------------------------------------------
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