vignesh
vignesh

Reputation: 21

how to automate data population in pdf based on functionality

My end product is a PDF, the data gets populated in the PDF based on the data which I give in the application. Is there anyways to automate the Data in the PDF part based on the functionality.

Upvotes: 2

Views: 93

Answers (1)

Anton Angelov
Anton Angelov

Reputation: 1713

You can parse the pdf to text first using Ghostscript.

gswin32c.exe -q -dNODISPLAY -dSAFER -dDELAYBIND -dWRITESYSTEMDICT -dSIMPLE -c save -f ps2ascii.ps "test.pdf" -c quit >"test.txt"

After you have the text of the pdf you can write additional validations in your tests. There are also other alternatives of the pdf to text functionality.

You can read the full code in code project - http://www.codeproject.com/Articles/12445/Converting-PDF-to-Text-in-C

Upvotes: 1

Related Questions