Forum Discussion

jasmeenkaur27's avatar
jasmeenkaur27
Contributor
7 years ago
Solved

PDF Validation

Hi,   My pdf contains details of 4 clients but I have to validate the data of only one client whose data is in 3rd page. I know the account number of the required client. How can I jump to that pag...
  • AlexKaras's avatar
    AlexKaras
    7 years ago

    Hi,

     

    Basically, the approach remains the same as mentioned by shankar_r: find the needed page by searching for account number (search either page by page or get the whole content of the document and search there - this depends on the structure of the given document and on how it was created) and do more detailed analysis for the found account. Exact implementation steps depend on the target document.

    However, the usual question that is asked in the situations like yours: do you really need to bother with PDF parsing? Isn't it acceptable, for example, to split this test into three smaller ones: first will get the raw data used to generate the document and verify that the data are as expected. This is easily automated usually. The second test will check that the generated document has correct layout: headers, logos, text columns, etc. This can be more or less easily automated using either image comparison or visual testing tools. And finally the third test, that may be executed manually and less often, will verify that the document contains correct data and has correct layout from the human point of view.

    Thoughts?