Hi, How to tell Engine to delete white, blank spaces on scanned page? Or create image for objects located in center of scanned page?

asked 31 May '16, 14:48

BartoszG's gravatar image



There is “CropImage” Method of ImageDocument Object that finds the edges of a document on the image and then crops the image. For more detailed information see “Help → API Reference → Image-Related Objects → ImageDocument”.

Pay attention, that this method works more correct when all four edges of document can be found i.e. the document is completely surrounded by background. In other cases you can crop it manually with “Modify” Method of the ImageDocument Object. This method modifies ImageDocument according to transmitted ImageModification Object. You should add the region that should be clipped into ImageModification through “AddClipRegion” Method.


answered 02 Jun '16, 10:33

Ilya%20Sukhorukov's gravatar image

Ilya Sukhorukov

edited 02 Jun '16, 10:33

Hi, tell me what in what step of processing document, this should be done? I mean, it should be working like this?:

1. frDocument.AddImageFile('page', nil, nil );

2. frDocument.Pages.Item(0).ImageDocument.CropImage;

3. frDocument.Process(processingParams);

4. frDocument.SaveToFolder('page');

If yes, how can i check what goes wrong if my image is not auto-crop?


answered 09 Jun '16, 16:44

BartoszG's gravatar image


edited 09 Jun '16, 17:50

Image cropping is useful when the image has already been loaded but hasn’t been processed. This code is technically correct (except missed brackets at the end of the second line) but it is doing quite a strange thing.

1) It adds an image, for instance ‘test.png’, to existing FRDocument object.

2) Then it crops the image inside of FRDocument object.

3) After that it processes the FRDocument object.

4) And finally it saves FRDocument object with a name of image (in our case ‘test.png’). But the file is saved in the internal format of FineReader Engine, which can’t be read by any image viewer.

As I mentioned before autocrop works better when all 4 edges of document can be clearly seen. If application doesn’t crop your image, try another image with perfectly shaped edges. If the latter image is processed correctly, then the issue is in borders of the first document. Otherwise most probably the cause is in Autocrop function application.


answered 05 Jul '16, 19:19

Ilya%20Sukhorukov's gravatar image

Ilya Sukhorukov

edited 05 Jul '16, 19:19

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 31 May '16, 14:48

Seen: 353 times

Last updated: 05 Jul '16, 19:19

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal