Quote:
Most likely a corrupt PDF file.
You right. After your suggestion I verified it is a corrupt file. I also verified that other PDF readers read the pages number correctly, i.e. 2.
This is a serious problem. I use PDFSharp in an application that create 1 PDF file from *each* page of incoming PDF. In this moment I don't know what the real number of pages number for that file is.
It means I can't take any countermeasure or rely on any workaround, which instead is the case for corrupted PDF file I already met (in this case I open+save that PDF in another reader and after that use PDFSharp).
So missing the correct numer of pages means that I loose documents, and I will never know it existed. This is a serious issue for using PFSharp in an application.
Is there a way to overcome this problem?