Hi Daniel,

as you perhaps have already seen I picked up your suggestions and it works 
fine. We just skip the processing if there isn't any content. This leads of 
course to an empty page, but that's exactly what is expected at this point.

See PDFBOX-446 in JIRA for further details.

Andreas Lehmkühler


----- original Nachricht --------

Betreff: Re: PDF to Image - give me NullPointerException
Gesendet: Do, 26. Mrz 2009
Von: Daniel Wilson<[email protected]>

> Andreas, you're right.  It's that blank 2nd page.
> 
> org.apache.pdfbox.pdfviewer.PageDrawer is finding page.getContents() is
> returning null about line 88.
> 
> We can trap that condition ... and I guess null getContents() would mean a
> blank page.  I wonder what "draw a blank page" looks like in code ...
> 
> Daniel Wilson
> 
> On Wed, Mar 25, 2009 at 9:47 AM, Daniel Wilson <
> [email protected]> wrote:
> 
> > I'm loading the PDF in the Adobe plugin in FireFox and I see some names
> on
> > the lower right-hand corner of page 3.  I'm seeing it as a 211-page
> > document.  I also see page 2 as blank.
> >
> > Out of curiosity, what language is it in?  I can usually identify the
> > language if it uses European characters, but this one stumps me!
> >
> > If you don't get to the bottom of the NPE first, I'll try to have a look
> at
> > it tonight when I'm back to my PDFBox environment.
> >
> > Daniel Wilson
> >
> >
> > On 3/25/09, Andreas Lehmkühler <[email protected]> wrote:
> >>
> >> > When trying to convert PDF to image, where the PDF image is generated
> >> > by latex (dvipdf), it's only convert the 1st page and give me
> >> > NullPointerException after that.
> >>
> >> Which version are you using?
> >> Can you provide us with the whole stack trace to determine the code
> >> throwing the exeption?
> >>
> >>
> >> > Here is the the PDF file i use for testing purpose :
> >> > http://supriyanto.fisika.ui.edu/laci04/komputasi_edisi_3.pdf
> >>
> >> I've a quick look a your document and I saw that page 2 and 3 are empty?
> >> Is that what you expected or is there perhaps a problem with the pdf?
> >>
> >>
> >> Andreas Lehmkühler
> >>
> >
> >
> 

--- original Nachricht Ende ----

Reply via email to