These kinds of rendering issues are due to AWT support for fonts, which varies 
based on platform and JDK, which is why you're seeing differences between 
Windows and Linux.

> On 26 Mar 2014, at 02:19, "Hong-Thai Nguyen (JIRA)" <[email protected]> wrote:
> 
> 
>    [ 
> https://issues.apache.org/jira/browse/PDFBOX-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13947708#comment-13947708
>  ] 
> 
> Hong-Thai Nguyen commented on PDFBOX-2000:
> ------------------------------------------
> 
> Thanks,
> I've noticed the PDFBox works fine on same file on Linux.
> 
>> White page when converting first page to image
>> ----------------------------------------------
>> 
>>                Key: PDFBOX-2000
>>                URL: https://issues.apache.org/jira/browse/PDFBOX-2000
>>            Project: PDFBox
>>         Issue Type: Bug
>>         Components: Rendering
>>   Affects Versions: 1.8.4
>>        Environment: windows
>>           Reporter: Hong-Thai Nguyen
>>            Fix For: 2.0.0
>> 
>>        Attachments: wrongpdf.pdf
>> 
>> 
>> When converting first page to image by this code for attached PDF:
>> {code}
>> private static BufferedImage computeImage(PDDocument document) throws 
>> IOException {
>>    int imageType = BufferedImage.TYPE_INT_RGB;
>>    int resolution;
>>    try {
>>      resolution = Toolkit.getDefaultToolkit().getScreenResolution();
>>    } catch (HeadlessException e) {
>>      resolution = 96;
>>    }
>>    PDPage page = (PDPage) document.getDocumentCatalog().getAllPages().get(0);
>>    try {
>>      BufferedImage image = page.convertToImage(imageType, resolution);
>>      return image;
>>    } finally {
>>      page = null;
>>    }
>>  }
>> {code}
>> returned image is the of a white page.
> 
> 
> 
> --
> This message was sent by Atlassian JIRA
> (v6.2#6252)

Reply via email to