GetDocumentPageCount Method
Gets the number of pages in the specified document. See
IsValidDocumentForOCR for information about the file extensions supported. This method must be called on the MCT. Use QueuedTask.Run.
public int GetDocumentPageCount(
string
)
Public Function GetDocumentPageCount( _
ByVal As String _
) As Integer
Parameters
- documentFileName
- The document file.
Return Value
The number of pages in the document. If the file cannot be read then 0 is returned.
Get number of pages in a document
{
string docFileName = "c:\\MyData\\MyDocument.pdf";
var pageCount = OCRManager.Instance.GetDocumentPageCount(docFileName);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.8 or higher.