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

Free Support Forum - aspose.com

Parse error: Startxref not found

Hi Aspose,

I’m using below simple code to parse my pdf:

    String filePath = "D:\\Tuyen\\Document\\Learning Single-page Web Application Development.pdf";
    
    try (InputStream inputStream = new FileInputStream(filePath);) {
        Document pdfDocument = new Document(inputStream);
    }

However I have this below exception:

Exception in thread “main” class com.aspose.pdf.exceptions.InvalidPdfFileFormatException: Startxref not found
com.aspose.pdf.internal.p107.z17.m16(Unknown Source)

The attached document can be viewed normally in in Adobe. Can you please have a look? Thank you.

Regards,
TuyenLearning Single-page Web Application Development.pdf (200.0 KB)

1 Like

@vutuyen2636,

Thanks for contacting support.

I have tested the scenario and have managed to replicate the same problem. Furthermore, I have also observed that an error message is appearing when trying to view the document in Adobe Reader/Acrobat and it appears that document is corrupted. However for the sake of correction, I have logged it as PDFJAVA-36859 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.