Skip Layout Classification for second page

This example shows how to skip layout classification for the second page. You can restrict the classification of a multi page document to the first page by selecting the Classify first page only setting in the Project Settings. A document classified in this way remains unclassified because the minimum confidence and minimum distance are not reached. When you select Classify each page, the classification is performed for each page of a multi page document until a classification result is ascertained or all pages are processed.

If you want to stop the layout classification after the second page of the document, select the Classify each page setting in the Project Settings. Insert the Document_AfterClassifiy event into the edit area of the project classification script, and insert a condition to check the page number and to exit the loop over all pages.

' Project Script 
Private Sub Document_AfterClassifyImage(pXDoc As CASCADELib.CscXDocument, ByVal PageNr As Long, bExit As Boolean) 
     If PageNr >= 2 Then 
     bExit = True 
   End If 
End Sub