Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Java Print Service question

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
bacon. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!