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

Tilman Hausherr closed PDFBOX-2915.
-----------------------------------
    Resolution: Duplicate

Sadly, this is a known problem that java awt has with the CMR fonts in the 
1.8.* versions, see PDFBOX-1019. It is fixed in the 2.0 version which renders 
fonts without awt, but it is not released yet. See
https://pdfbox.apache.org/2.0/getting-started.html
https://pdfbox.apache.org/download.cgi#scm
You can get more help in the user mailing list if needed :-)

> PDPage.convertToImage special symbols
> -------------------------------------
>
>                 Key: PDFBOX-2915
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2915
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.7
>            Reporter: Gabriel Diaz
>         Attachments: Symbols.pdf, image1.png
>
>
> When converting a PDPage whit special symbols i.e: (Math Integral, Math SUM) 
> the generates image doesn't have the symbol.
> Simple app that reproduces the issue:
> {code:title=App.java|borderStyle=solid}
> import java.io.File;
> import java.io.IOException;
> import java.util.List;
> import java.util.logging.Level;
> import java.util.logging.Logger;
> import javax.imageio.ImageIO;
> import org.apache.pdfbox.pdmodel.PDDocument;
> import org.apache.pdfbox.pdmodel.PDPage;
> public class App {
>       public static void main(String[] args) {
>               File pdfFile = new File("C:\\Testing\\Symbols.pdf");
>               PDDocument inputPDF;
>               try {
>                       inputPDF = PDDocument.load(pdfFile);
>                       List<PDPage> allPages = 
> inputPDF.getDocumentCatalog().getAllPages();
>                       int tmp = 1;
>                       for (PDPage page : allPages) {
>                               File outputfile = new File("C:\\Testing\\image" 
> + tmp + ".png");
>                               ImageIO.write(page.convertToImage(), "png", 
> outputfile);
>                               System.out.println("Image Created -> " + 
> outputfile.getName());
>                               tmp++;
>                       }
>                       
>               } catch (IOException ex) {
>                       Logger.getLogger(App.class.getName()).log(Level.SEVERE, 
> null, ex);
>               }
>       }
> }
> {code}



--
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