We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PdfExtractor not extracting the attachments with file name in non English character

Using below code to extract the attached PDF from an original PDF. (Using Aspose for JAVA aspose-pdf-11.2.0.jar)

PdfExtractor extractor = new PdfExtractor();
List<String> attachmentName= extractor.getAttachNames();
for(String aattachName:attachmentName){

Issue: The attached file name is in non-English char inside the original PDF then the attached non English file is not extracting to the specified path.

Sample file names not working:

  1. Šanˇák_P18-04996.pdf
  2. Knüppel L, et al. A Novel Antifibrotic Mechanism of Nintedanib and Pirfenidone.pdf

Working file names:

  1. anyenglishname.pdf

Note: The attachment file name with English is extracting to the specified path and working fine.

UTF-8 is already set at server and JVM label.File name also displaying fine when I debug through the code.

Please suggest any solution how to extract non English embedded file names in a PDF.


Thank you for contacting support.

You are using legacy and outdated version of the API whereas we recommend using latest versions which include more features and bug fixes. Please upgrade to Aspose.PDF for Java 19.3 and share sample PDF document with us if you still face the problem.

Moreover, you may visit Working with Attachments for your kind reference.