[ 
https://issues.apache.org/jira/browse/PDFBOX-5335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451616#comment-17451616
 ] 

Tilman Hausherr commented on PDFBOX-5335:
-----------------------------------------

Did you get a log message? Are your logs enabled? Is the JBIG2 decoder in your 
classpath?
https://pdfbox.apache.org/2.0/dependencies.html

> Rendering of PDDocument failed
> ------------------------------
>
>                 Key: PDFBOX-5335
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5335
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.24
>            Reporter: Daniel
>            Priority: Major
>         Attachments: Traverse Type QC, Nr. 1.1.pdf
>
>
> I want to render the attached PDF-Document with the help of the following 
> method. The target component gets an empty Image.
> {code}
>             private Component createPDFVorschau(byte[] dateiinhalt) {
>                 PDDocument doc = null;
>                 try {
>                     doc = PDDocument.load(dateiinhalt, "");
>                     if (doc!=null && doc.getNumberOfPages()>0) {
>                         BufferedImage image = new 
> PDFRenderer(doc).renderImage(0);
>                         YImage imgVorschau = new YImage();
>                         imgVorschau.setImage(image);
>                         imgVorschau.setToolTipPicture(true);
>                         return imgVorschau;
>                     }
>                 } catch (Throwable e1) {
>                     if (!(e1 instanceof OutOfMemoryError)) {
>                         ErrorLog.warn(""+traverse, e1);
>                     }
>                 } finally {
>                     try {
>                         if (doc!=null)
>                             doc.close();
>                     } catch (IOException e) {
>                         Context.displayErrorToEndUser(e);
>                     }
>                 }
>                 return null;
>             }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to