Community

Recognize fields in multipage

I have a PDF document where every page has the same template. I need to recognize a single field from each page.

Do I need to process the whole page or textfield recognition has the possibility to work with multipage?

Was this article helpful?

0 out of 0 found this helpful

Comments

3 comments

  • Avatar
    Permanently deleted user

    For your scenario you can use the processFields method. It allows to specify the coordinates of each field in an XML file for each page, for example:

    <?xml version="1.0" encoding="utf-8"?>
    <document xmlns="http://ocrsdk.com/schema/taskDescription-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ocrsdk.com/schema/taskDescription-1.0.xsd http://ocrsdk.com/schema/taskDescription-1.0.xsd">
      <fieldTemplates />
      <page applyTo="0,1">
        <text id="Field1" left="395" top="105" right="1047" bottom="157">
          <language>English</language>
          <textType>normal</textType>
          <oneTextLine>true</oneTextLine>
        </text>
      </page>
      <page applyTo="2">
        ...
      </page>
      ...
      <page applyTo="N">
        ...
      </page>
    </document>
    
    1
  • Avatar
    Permanently deleted user

    I considered it but I don't know how many pages the document has. Do I need to dinamically generate configuration XML file reading total page numbre from pdf document?

    0
  • Avatar
    Permanently deleted user

    Yes, you should do so because the "applyTo" attribute is mandatory for the "page" element name.

    0

Please sign in to leave a comment.