How to automatically rotate Annex pages

The auto-rotation takes place during recognition/document definition matching in the FlexiCapture. Annex pages don't get matched and the recognition doesn't take place for annex pages. As a result, they remain in the original (possibly incorrect) orientation by default.

In case there is a need to correct the orientation for annex pages, it can be done by customizing your project via the custom script stage in the workflow right after recognition:​

Use the script below in this script stage. It iterates through non-matched pages (including annex pages), detects the appropriate page orientation, and rotates the page accordingly. For the used script methods specification see https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/scripts.


foreach( IPage page in Document.Pages )
{
if( page.MatchedSection == null )
{
var angle = page.Picture.DetectPageOrientation( "English" );
if( angle != 0 )
{
var picture = page.Picture.CreateEditableCopy();
picture.Rotate( -angle );

page.ReplaceImage( picture );
}
}
}

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.