Open ziheng-dev opened 1 month ago
I am using the PDFsharp 6.2.0 Preview 1 in a .net 8 project.
It shows me this error "Stream cannot be read. Please send us the PDF file so that we can fix this (issues (at) pdfsharp.net)." when I try to import this pdf file.
TS-18_0001.pdf
this is part of my code:
var pdfBytes = File.ReadAllBytes(filePath); using (var readMemoryStream = new MemoryStream(pdfBytes)) { PdfDocument inputDocument = PdfReader.Open(readMemoryStream, PdfDocumentOpenMode.Import); }
please help to check, Thanks.
The file is corrupted. Adobe Reader can fix it (try File / Save as). PDFsharp cannot yet fix it.
I am using the PDFsharp 6.2.0 Preview 1 in a .net 8 project.
It shows me this error "Stream cannot be read. Please send us the PDF file so that we can fix this (issues (at) pdfsharp.net)." when I try to import this pdf file.
TS-18_0001.pdf
this is part of my code:
var pdfBytes = File.ReadAllBytes(filePath); using (var readMemoryStream = new MemoryStream(pdfBytes)) { PdfDocument inputDocument = PdfReader.Open(readMemoryStream, PdfDocumentOpenMode.Import); }
please help to check, Thanks.