How to convert PDF to PS using Java? - java

Currently, Adobe doesn't offer PostScript drivers for Solaris OS. I need to print a PDF file using Java Program. I use the PDFBox 1.8.0. I think if I convert PDF to PS using java, I can print the file without any problem. Any of you know, How to convert PDF to PS using Java?

Related

How to print a PDF File using native JAVA (or open and print)

I created a invoice billing software using itextpdf 5. Is there any way to print the generated PDF using java?
The easiest way is using Desktop.print(File).

Display pdf documents in java using iText (and not acrobat reader)?

I can get the the file to open and display in an external reader but it is possible to get it to open within java (eg. in a JPanel)? I am using iText would this be possible or would i need something like ICEPdf?

PDF to XPS with java

Could you please help me to find a way to convert the PDF file to XPS file with java programmable? Is it possible to do that as freeware library??
Its not the best solution but according to this thread you can use ghostscript (invoking command line command) to convert the PDF to Images, from those images then create an XPS document:
gswin32c.exe -Z, -sDEVICE=png16m-sOutputFile="%04do.png" "temp.pdf"

Is it possible to read text from a pdf using java FileReader or an alternative for java?

I am wanting to make a simple word counter for my latex documents so that I can double check my word count is accurate. More generally it is useful to discover whether java can interpret text from pdf files anyway. A google on it brought nothing up so I am thinking maybe not? If not, why?
You can't read text from a .pdf without a PDF file reader. Here are a couple of Java .pdf libraries:
Apache PDF Box
iText
See also this link, for an example of Java text extraction with PDF Box:
http://pdfbox.apache.org/userguide/text_extraction.html

Generate PCL from PDF in Java

What is the best way to generate a PCL output file from an existing PDF file in java?
It depends on how much you want to invest, and how robust the solution needs to be. For quick and dirty, you can print from Adobe Acrobat to a file, using a PCL driver (look, mom, no Java ...).
The Java Print Service API can process PDF. Use StreamPrintService and write the stream to a file, using PCL for the output format.
If you need to have more control over the content, maybe modify it or add to it, you can use a PDF parser (this one, for instance) and print the resulting HTML from a browser that your application starts, by adding some Javascript, for example.
The StreamPrintService from JDK 6 does only support PS. I am still searching for a StreamPrintService which supports PCL.
We capture PCL generated from Acrobat printing a PDF to a PCL driver and redirect as input to our Windows console PCLXForm program. With a custom script, we can "stream edit" the PCL. We can extract the address block text for address correction, insert the corrected text, add the Intelligent Mail Barcode, 2-D barcodes, sort the documents, batch them by page count, change tray assignments, merge with other documents, etc. The product required is PCLTool SDK - Option V at www.pagetech.com

Categories