While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?
Styling with Markdown is supported
17 April 2014 Reply
Only one issue: the GetPdfPageCount() method does not work with all pdf's - for example encrypted documents or pdf with document level attachments. I used iTextSharp instead:
private int GetPdfPageCount(string fileName)
iTextSharp.text.pdf.PdfReader pdfReader = new iTextSharp.text.pdf.PdfReader(fileName);
Thanks for the comments! As I recall (I haven't touched this code for a great while now), I took that particular code from elsewhere - I have no knowledge of the PDF format myself so wasn't aware of encryption or otherwise. Thanks for pointing this out though! I do use iTextSharp in other projects though, I'll make sure to use that instead should I revisit this code down the line.