Jin Gang created PDFBOX-1776:
--------------------------------

             Summary: Print pdf with font embedded(SimSun TrueType(CID) 
Identity-H)
                 Key: PDFBOX-1776
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1776
             Project: PDFBox
          Issue Type: Bug
          Components: FontBox
    Affects Versions: 1.8.2
         Environment: Windows 7, tomcat 6, java 6 
            Reporter: Jin Gang


Hello,
Can you please help me on the issue as below?
[Issue]
print PDF file witch has font embedded subset.

I am trying to use PDFBOX 1.8.2 to print PDF file.
When I use printJob.print() to print PDF file, I got the error like this:

  <2013/11/08 11:14:53 org.apache.pdfbox.filter.FlateFilter decode
   fatal: FlateFilter: stop reading corrupt stream due to a DataFormatException>

And I checked the property of the PDF file and it's like below:
[Font]
  SimSun(embedded subset)
   type: TrueType(CID)
   enconding: Identity-H

Here is my java Code:
[Code]
    PDDocument document = PDDocument.load( pdfFileName );
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setJobName(new File(pdfFileName).getName());
    if(printerName != null )
    {
        PrintService[] printService = PrinterJob.lookupPrintServices();
        boolean printerFound = false;
        for(int i = 0; !printerFound && i < printService.length; i++)
        {
            if(printService[i].getName().indexOf(printerName) != -1)
            {
                printJob.setPrintService(printService[i]);
                printerFound = true;
            }
        }
    }
    printJob.setPageable(new PDPageable(document, printJob));
    if( silentPrint || printJob.printDialog())
    {
        printJob.print();
    }

I'm sorry, i can't find the way to attatch the pdf file.

Is it possible for PDFBOX 1.8.2 to print pdf properly?
what about PDFBOX 2.0?

Thanks in advance.
Regards



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to