Hi,
I would load the Pdf into a PdfDocument, then loop through the pages and check the MyPdfDocument.Elements.Count property. I dont think its 0 on a blank page, but maybe something like 4 or whatever. If you test with a blank document, you shoud be able to find the magic number and then use that as the condition. If the condition is true, then remove the page:
Code:
int _emptyNum = 4;
int _cnt = MyPdfDocument.PageCount;
for(int i = 0; i < _cnt; i++){
if(MyPdfDocument.Pages[i].Elements.Count == _emptyNum){
MyPdfDocument.Pages.RemoveAt(i);
_cnt--;
}
}
I havnt tested that code, but i think it will work without giving any out of bounds array errors etc.
Hope this helps,
Mike