strzata wrote:
1. What can I do so that the PDFs delivered by the (new) scanners can be processed? I only need the pagecount function here - no more.
PDFsharp is not really good when it comes to dealing with corrupt files. A workaround described somewhere on this forum is using iTextSharp to open and save the PDF and then finally open it with PDFsharp. iTextSharp does a better job when it comes to fixing corrupt PDF files. Older versions of iTextSharp with a more permissive license can be used for legal/financial reasons.
Re "gfx.DrawImage(image, New Rectangle(0, 0, CInt(page.Width.Point), CInt(page.Height.Point)))"
Maybe try "gfx.DrawImage(image, New XRect(0, 0, CInt(page.Width.Point), CInt(page.Height.Point)))"
Maybe try "gfx.DrawImage(image, 0, 0, page.Width.Point, page.Height.Point)"
Maybe try "gfx.DrawImage(image, 0, 0, CInt(page.Width.Point), CInt(page.Height.Point))"