Forum Discussion

kathir_43's avatar
kathir_43
Contributor
3 years ago

How to compare contents of PDF & MSWORD using TestComplete

we are planning to compare the contents of PDF and msword using TestComplete. I am able to read the contents of PDF & Word doc. I have to compare the contents of these files. The Contents in the word is like a template and PDF is the actual value. Can some one share any logic way of performing these comparisons? Pls note we are not using OCR in testcomplete

6 Replies

    • kathir_43's avatar
      kathir_43
      Contributor

      I am able to extract the contents of word & PDF file to text files respectively. Word document is kind of template in which outline will be defined (how pdf should be generated ).Below sample is given.

      Word doc:

      <firstname>,<LastName>

      <ID>,<organisation>

      <salary>,<place>

       

      Dear <firstname>,

      you are working in the department of <organisation> and we are really honored to have you here. Expecting many more successful years of service from you.

      Thanks,

       

      Actual PDF:

      John,Kennedy

      234,google

      USD1245,CA

      Dear John,

      you are working in the department of google and we are really honored to have you here. Expecting many more successful years of service from you.

      Thanks,

      can someone help with the comparison logic to validate both the static and dynamic content are getting generated as expected??

      • mattb's avatar
        mattb
        Staff

        Hi,

        What language are you using for scripting?