• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Java Print Service question

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey:

Did anybody use java print service before? Is it good one to print a HTML or PDF file programatically using its API? Any sample code?

Thank you in advance.
 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd rather use some more advanced implementations of the printing API like those offered by some open source projects such as Jasper Reports or JFreeReport

Would that help you?
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PrintService is not the same as Jasper (and probably JFreeReport, which i dont know). Jasper is used to generate reports (in various formats as XLS, PDF, HTML, ...) while PrintService is used to get the data to the printer.
There is no direct support in java to print PDF even though there is a PDF doc flavor. (none that i am aware of)! you need a third party library (probably commercial) or go some extra miles (e.g. convert to PS first and then send this to the printer or use apache FOP to generate the PDF then you can also print it).

if you are looking for ways to generate PDF then there are some free solution that can be used like a printer where you print your document to a software printer which outputs PDF (i think iText is a solution for this)


pascal
 
I love a good mentalist. And so does this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic