• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java PDF testing

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That would depend on what this testing involved.
 
Dave Wagner
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic