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

Free Support Forum - aspose.com

[PDF .Net] Startxref not found


I am trying to extract the Html and the preview of many documents and often,
I get an error saying :
"Startxref not found" comming from the exception "InvalidPdfFileFormatException".

My document is perfectly readable from Acrobat Reader.
I ma using the latest version of the Aspose.Net Pdf (10.5.1)

Thank you in advance,

Hi Lenny,

Thanks for your inquiry. I have converted your PDF document to HTML using Aspose.Pdf for .NET 10.5.0 as following, but unable to notice the any exception. Please share your sample code and environment details, so we will try to replicate the issue for further investigation.

Document doc = new
Document(myDir + “11-FC_Tiwari_CV_Resume.pdf”);<o:p></o:p>

doc.Save(myDir + "temp/11-FC_Tiwari_CV_Resumeout.html", Aspose.Pdf.SaveFormat.Html);

We are sorry for the inconvenience caused.

Best Regards,

I am getting exception as “startxref not found” while using Aspose pdf document class.

byte[] docbytes = null;
using (WebClient webClient = new WebClient())
docBytes = webClient.DownloadData(filePath);
using (MemoryStream stream = new MemoryStream())
stream.Write(docBytes, 0, (int)docBytes.Length);

 Aspose.pdf.Document document = new Aspose.pdf.Document(stream);
//This lines gives error "Startxref not found


How this can be resolved ?


Thank you for contacting support.

Would you please specify if this exception is file specific or if it occurs for every file you are working with. Please create a narrowed down sample application so that we may try to reproduce and investigate it in our environment. Also share the downloaded file in PDF format, for our reference. Before sharing requested data via Google Drive, Dropbox etc, please ensure using Aspose.PDF for .NET 18.10 in your environment.