Re: [Retep-PDF] RETEP PDF-II
Status: Beta
Brought to you by:
petermount
|
From: Peter M. <pet...@gm...> - 2005-03-03 08:42:21
|
On Wed, 2 Mar 2005 01:32:47 -0800, Pravir Ramtekkar <pr...@gm...> wrote: > Hi, > I am trying to use PDF class in the following manner. > > PrintJob job = PDF.getPrintJob(fileoutputStream); > > pass this job to whereever I want to use - basically another > thirdparty whihc takes a java.awt.printjob to print itself. > > But I get exception : > NullPointerException : > PDFJob.getPageDimension() (PDFJob.java:114) This would occur if getPageDimension() is called before a page have been created. To me this looks like a bug in the thirdparty app, because the page dimensions wouldn't be known until the page exists, and this is the first instance of this problem in the 7 years retepPDF has been in existence. getPageDimension() may work for normal printers where the media is fixed, but in PDF, the media is only defined once it's created. > I tried using > PrintJob job = new PDFJob(fileoutputStream); > > which I believe is the same thing as above. Yes, PDF.getPrintJob() does exactly that. > I don't want to use PrinterJob as I don't have access to the > Pageable/Printables. > > This is kind of urgent so please reply...Also anytips using are welcome. > btw, I am using Inetsoft Stylesheet where I pass the above printJob. > > thanks in adavance! -- Peter Mount pe...@re..., pet...@gm... http://retep.org |