添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
聪明伶俐的馒头  ·  Displaying Multiple ...·  1 月前    · 
温暖的水煮鱼  ·  C# ...·  1 周前    · 
销魂的棒棒糖  ·  How to set font size ...·  1 周前    · 
追风的麻辣香锅  ·  BaseFont (openpdf ...·  1 周前    · 
谦和的打火机  ·  SQLite Encryption ...·  5 月前    · 
长情的大脸猫  ·  Amazon.com·  5 月前    · 
私奔的山楂  ·  @echo off echo ...·  9 月前    · 
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

Attachments

  1. GSP_PRFACT.pdf
    309 kB
    Jin Gang
  2. PDFBOX-1776.pdf-1.png
    296 kB
    Tilman Hausherr

Activity

People