Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

87
Vistas
Need to compare contents of word template & actual PDF

I have 2 files (word & pdf) and need to compare them. word doc will be template which defines how pdf should be generated. Below are the samples.

Word doc:

    <firstname>,<LastName>
    <ID>,<organization>
    <salary>,<place>
    
    Dear <firstname>,
    you are working in the department of <organization> 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?? we are using TestComplete with JavaScript for the automation.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you know what is in the template, you could start with some regex splitting first few lines where are all variables. Then read the template, replace every variable with values got from pdf beggining and if the replaced text matches the text in pdf, then you have pdf built from template.

Regex splitting example: read word file, split every line, get the first 3 lines, split them with ",", and set the vars to coresponding indexes. As I said, this works only if you know the content of the template

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda