Borisvl / Pdf4Eclipse

A pdf viewer for Eclipse
http://borisvl.github.com/Pdf4Eclipse
35 stars 20 forks source link

Exception on opening pdf #8

Open kokorins opened 12 years ago

kokorins commented 12 years ago

When I try to open pdf file I got the exception. Some times it opens, sometimes the eclipse is shutdown after that. Ubuntu 11.10, eclipse indigo, texlipse 1.5. com.sun.pdfview.PDFParseException: Unsupported shader type: 3 at com.sun.pdfview.pattern.PDFShader.getShader(Unknown Source) at com.sun.pdfview.PDFParser.doShader(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at com.sun.pdfview.BaseWatchable.execute(Unknown Source) at com.sun.pdfview.BaseWatchable.go(Unknown Source) at com.sun.pdfview.PDFParser.doForm(Unknown Source) at com.sun.pdfview.PDFParser.doXObject(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) com.sun.pdfview.PDFParseException: Unsupported shader type: 3 at com.sun.pdfview.pattern.PDFShader.getShader(Unknown Source) at com.sun.pdfview.PDFParser.doShader(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at com.sun.pdfview.BaseWatchable.execute(Unknown Source) at com.sun.pdfview.BaseWatchable.go(Unknown Source) at com.sun.pdfview.PDFParser.doForm(Unknown Source) at com.sun.pdfview.PDFParser.doXObject(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) com.sun.pdfview.PDFParseException: Unsupported function type 3. at com.sun.pdfview.function.FunctionType3.parse(Unknown Source) at com.sun.pdfview.function.PDFFunction.getFunction(Unknown Source) at com.sun.pdfview.pattern.ShaderType2.parse(Unknown Source) at com.sun.pdfview.pattern.PDFShader.getShader(Unknown Source) at com.sun.pdfview.PDFParser.doShader(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at com.sun.pdfview.BaseWatchable.execute(Unknown Source) at com.sun.pdfview.BaseWatchable.go(Unknown Source) at com.sun.pdfview.PDFParser.doForm(Unknown Source) at com.sun.pdfview.PDFParser.doXObject(Unknown Source) at com.sun.pdfview.PDFParser.iterate(Unknown Source) at com.sun.pdfview.BaseWatchable.run(Unknown Source) at java.lang.Thread.run(Thread.java:722)

Borisvl commented 12 years ago

This is a bug in the pdfrenderer library that is used by Pdf4Eclipse. I plan to add an additional, different renderer to the viewer which is slower but supports more pdf types.

steventebrinke commented 12 years ago

It would be very nice if more pdf types can be supported. Pdf4Eclipse looks very nice to me, but is unusable atm because my pdfs are rendered incorrectly. (The issues are different from the one reported above, but I assume they're all related to the pdfrenderer library.)

Borisvl commented 12 years ago

I have added another pdf renderer to pdf4eclipse in version 1.1.0. You can switch the renderer in the preferences, the new one is JPedal's renderer. Can you please try whether this resolves your problem and report your results.

steventebrinke commented 12 years ago

The PDFs that I have work fine when I choose JPedal's renderer (but the auto option does not detect that they should be rendered with JPedal). Thanks for adding the renderer, I'll start using Pdf4Eclipse today ;).

Borisvl commented 12 years ago

@steventebrinke: If you send me an example file, I can try to make the adaptive detection more sensitive.

steventebrinke commented 12 years ago

Boris, thanks for looking into this issue. An example file has been send by e-mail. With SUN's renderer, some text disappears, whereas the other renderer works fine.

Borisvl commented 12 years ago

@steventebrinke: Your file triggered a bug in SUN's renderer, which luckily was very easy to fix. In the next release both renderers will be able to show your documents.

kokorins commented 12 years ago

Yeap, sorry for being late, but now it seems to work properly. Thank you.