Question
How to get the original image on the Verification?
Answer
To revert the changes and get the original page image, the RevertToOriginalImage method of the IPage object is used. This method can only be called if the HasOriginalImage property is set to true.
Note. This method is not available on the Web Verification Station for checking rules locally.
In case of using a rich Verification station, it is possible to implement this method as a Custom Stage Tool to run this code by pressing the corresponding button.
The following code is an example of a script that takes the user back to the original page image on the Verification Station (if the Store original image during processing option in Image Processing settings is selected):
foreach( IPageItem pageItem in MainWindow.Selection.PageItems) {
pageItem.TaskWindow.CloseEditorWindow();
pageItem.TaskWindow.OpenDocument( pageItem.DocumentItem.Document );
IPage page = pageItem.Page;
if ( page.HasOriginalImage )
page.RevertToOriginalImage();
pageItem.TaskWindow.CloseDocument( pageItem.DocumentItem.Document );
}
Please check the following screenshot and steps on how to add this to a specific event.
- Open Project properties > Stage tools. Select the stage and click Edit…
- Click Add Event…
- Select On User Command from the dropdown
- Click Edit script…
- Paste the code provided above and save.
Add the command to the corresponding toolbar under the Edit Skin…button.
After saving the changes, the corresponding button will be shown on the stage specified. This allows to trigger the action once clicking on it.
Additional information
ABBYY FlexiCapture – Adding Custom Toolbar using Stage Tools
Comments
0 comments
Please sign in to leave a comment.