You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/05/20 21:28:38 UTC

[jira] [Closed] (PDFBOX-2085) Monospace font is missing when rendering document

     [ https://issues.apache.org/jira/browse/PDFBOX-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr closed PDFBOX-2085.
-----------------------------------

    Resolution: Duplicate

This works in the 2.0 version, it is most likely a problem with an embedded type1 font.

You can download it here:
https://pdfbox.apache.org/downloads.html#scm
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.0-SNAPSHOT/

How to render (API is different):

{code}
PDDocument doc = PDDocument.loadNonSeq(input + ".pdf", null);
List<PDPage> pages = doc.getDocumentCatalog().getAllPages(); 
for (int i = 0; i < pages.size(); i++) 
{ 
  BufferedImage bim = new PDFRenderer(document).renderImageWithDpi(i, dpi, ImageType.RGB);
  ImageIOUtil.writeImage(bim, input + i + ".png"), dpi);
}
doc.close();
{code}

I'm closing this as duplicate, but feel free to comment and/or reopen if you find a flaw in the rendering. You're also welcome to ask questions on the user list if something is unclear about the 2.0 API. Btw, note that I am using loadNonSeq() instead of load(). Good luck!

> Monospace font is missing when rendering document
> -------------------------------------------------
>
>                 Key: PDFBOX-2085
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2085
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Petro Semeniuk
>         Attachments: font_test_document - first_page.png, font_test_document.pdf
>
>
> Monospace font is completely missing when rendering.
> Code used for rendering is simple: page.convertToImage();
> Attached is what I'm getting on 1.8.5.
> Search for 'monspaced' string in document to see where it's used



--
This message was sent by Atlassian JIRA
(v6.2#6252)