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

Frederik Bertling commented on PDFBOX-2757:
-------------------------------------------

I'm using the following code:
Not at all means, the code after pdfRenderer.renderImageWithDPI(i, 200f, 
ImageType.RGB); is never executed, but I don't get an exception.
I'll try to use fontbox additionally. Thanks!

PDDocument pdf;
PDFRenderer pdfRenderer;

try {
    // read pdf
    pdf = PDDocument.load(file);
    System.out.println("Loaded File");
    pdfRenderer = new PDFRenderer(pdf);
    System.out.println("Created Renderer");
    for (int i = 0; i < pdf.getNumberOfPages(); i++) {
        pdfRenderer.renderImageWithDPI(i, 200f, ImageType.RGB);
        System.out.println("Rendered Image #" + i);
    }
    pdf.close();
} catch (IOException e) {
    e.printStackTrace();
}

> PDF to image is not converted correctly (1.8.9) or not at all 
> (pdfbox-2.0.0-20150414.202717-1243)
> -------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2757
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2757
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.9, 2.0.0
>         Environment: Debian Jessie, IntelliJ IDEA 14.1
>            Reporter: Frederik Bertling
>         Attachments: 000 Anheizer Laudato Si.pdf, pdfbox-2.0.0-SNAPSHOT.jar
>
>
> Hi,
> I'm using pdfbox to convert pdf musical sheets to images. However, I have 
> some problems converting some pdfs correctly.
> When using 1.8.9. I get the following warning and the pdf is not rendered 
> correctly:
> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont getawtFont
> INFO: Using font SansSerif.plain instead
> When using pdfbox-2.0.0-20150414.202717-1243 snapshot, I don't get any 
> warning, but pdfRenderer.renderImageWithDPI does not give any result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to