[FR Engine 11 SDK] Orientation detection for input PDF not working ?

  • 1.4K Views
  • Last Post 31 March 2015
  • Topic Is Solved
maol posted this 31 March 2015

Hello,

We are performing text extraction on jpg images and on pdfs (pdfs are containing a single image).

Some images have an initial rotation of 90° (They are ID cards scanned in portrait mode instead of being scanned in landscape mode).

Text extraction works well for these kind images in the jpg format but it just returns garbage text for images in the pdf format.

I did a little test:

1) I saved one of the jpg images that has no rotation to pdf (through IrfanView).

2) I performed text extraction on this pdf -> The extracted text is OK.

3) I saved one of the jpg images that has 90° rotation to pdf.

4) I performed text extraction on this pdf -> Text extracted is not OK at all.

So it seems something is goind wrong in orientation detection when the input is a pdf file.

Order By: Standard | Newest | Votes
maol posted this 31 March 2015

Answering myself:

I think I resolved the problem by calling setCorrectionOrientation on PagePreprocessingParams:

docProcessingParams.getPageProcessingParams().getPagePreprocessingParams().setCorrectOrientation(true);

Natalia Karaseva posted this 31 March 2015

Yes, the CorrectOrientation property is FALSE by default. In order to process rotated images you should set it to true.

  • Liked by
  • maol
Close