• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java PDF testing  RSS feed

 
Dave Wagner
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am looking to get some ideas on the different available methods and tools to test PDF's files. Currently reports are generated using jasper to pdf and the pdf is tested using an arcane method that I don't want to go into. The pdf file contains both text and image. What tools are out there for pdf testing using Java?

Thanks
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would depend on what this testing involved.
 
Dave Wagner
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just trying to test the contents of the PDF. One of the main problems we are having is that when we add more contents to our reports, the pdf tests we have created fail because the contents on the page shifts and we are dependent on the contents being available on an exact coordinate on a page. Is there a way to make the testing more generic while validating the data on the page?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could extract the text of the PDF using a library like PDFBox or JPedal, and then perform whatever validation you can imagine.
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Wagner wrote:we are dependent on the contents being available on an exact coordinate on a page.


This suggests to me that somebody is trying to use the PDF for a purpose it wasn't designed for. (Namely for people to read on their computer screens.) Could they be provided with the raw data in some form, instead of making them scrape the PDF to get data?
 
Dave Wagner
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The data is converted to pdf for reporting reasons.

Instead of telling me not to create PDF's, can you provide me information on Java tools available for testing them if anyone knows?

Thanks
 
Dave Wagner
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way I am trying to prevent the scraping of the data which is what we are using to test the contents.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!