PdfBox0.7.3 转换中文pdf时候 出现'UniGB-UCS2-H' 字符集不支持,
不知道要怎么处理
谁能给个解决的方法呢===========================================================================
附 代码
===========================================================================import   java.io.InputStream; 
import   java.io.IOException; 
import   org.apache.lucene.document.Document; import   org.pdfbox.cos.COSDocument; 
import   org.pdfbox.pdfparser.PDFParser; 
import   org.pdfbox.pdmodel.PDDocument; 
import   org.pdfbox.pdmodel.PDDocumentInformation; 
import   org.pdfbox.util.PDFTextStripper; import   com.search.code.Index; 
public   Document   getDocument(Index   index,   String   url,   String   title,   InputStream   is)throws   DocCenterException   { 
    
    COSDocument   cosDoc   =   null; 
    try   { 
      cosDoc   =   parseDocument(is); 
    }   catch   (IOException   e)   { 
      closeCOSDocument(cosDoc); 
      throw   new   DocCenterException( "无法处理该PDF文档 ",   e); 
    } 
    if   (cosDoc.isEncrypted())   { 
      if   (cosDoc   !=   null) 
        closeCOSDocument(cosDoc); 
      throw   new   DocCenterException( "该PDF文档是加密文档,无法处理 "); 
    } 
    String   docText   =   null; 
    try   { 
      PDFTextStripper   stripper   =   new   PDFTextStripper(); 
      docText   =   stripper.getText(new   PDDocument(cosDoc)); 
    }   catch   (IOException   e)   { 
      closeCOSDocument(cosDoc); 
      throw   new   DocCenterException( "无法处理该PDF文档 ",   e); 
    }     PDDocument   pdDoc   =   null; 
    try   { 
      pdDoc   =   new   PDDocument(cosDoc); 
      PDDocumentInformation   docInfo   =   pdDoc.getDocumentInformation(); 
      if(docInfo.getTitle()!=null   &&   !docInfo.getTitle().equals( " ")){ 
        title   =   docInfo.getTitle(); 
      }     }   catch   (Exception   e)   { 
      closeCOSDocument(cosDoc); 
      closePDDocument(pdDoc); 
      System.err.println( "无法取得该PDF文档的元数据 "   +   e.getMessage()); 
    }   finally   { 
      closeCOSDocument(cosDoc); 
      closePDDocument(pdDoc); 
    } 
    
    return   null; 
} private   static   COSDocument   parseDocument(InputStream   is)   throws   IOException   { 
    PDFParser   parser   =   new   PDFParser(is); 
    parser.parse(); 
    return   parser.getDocument(); 
} private   void   closeCOSDocument(COSDocument   cosDoc)   { 
    if   (cosDoc   !=   null)   { 
      try   { 
        cosDoc.close(); 
      }   catch   (IOException   e)   { 
      } 
    } 
} private   void   closePDDocument(PDDocument   pdDoc)   { 
    if   (pdDoc   !=   null)   { 
      try   { 
        pdDoc.close(); 
      }   catch   (IOException   e)   { 
      } 
    }