This the error i am getting in c# PDFsharp version 1.50.5147
It was worked last year now i am getting the error
Invalid entry in XRef table, ID=3, Generation=0, Position=15, ID of referenced object=5, Generation of referenced object=0
public static int GetNumberOfPdfPages(Stream stream)
{
int PageCount = 0;
stream.Position = 0;
PdfDocument document = PdfReader.Open(stream);
PageCount = document.PageCount;
return PageCount;
}
Kindly suggest