Latha Sree

+ Follow
since Apr 07, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Latha Sree

Ulf Dittmer wrote:

Ulf Dittmer wrote:Using OpenOffice in server mode through its Java API is one way of doing this.


Thanks for your response..
Could you please help me out with some sample examples.

13 years ago

Ulf Dittmer wrote:I don't think there are *any* printers that support direct printing of MS Office documents. Using OpenOffice in server mode through its Java API is one way of doing this.

You seem to have lots of different questions about printing of documents - maybe if you told us what the overall problem is you're trying to address we can point to solutions that address it in full, instead of piecemeal for each question.


Sorry for late reply..
I found that best solution to print files is by using unix command,lp..It is very simple to do.. too has some limitations.
it doesnt support some formats.
Now..I want MS Office documents to be printed..By any way..
i.e. unix or java program or convert docs to PDF and then print.
Please suggest any way to achieve it.

13 years ago
Hello Friends,

Can anyone please help me how to print MS Office documents using unix commands.
With lp and lpr commands, it is giving the following error
lp: unable to print file: client-error-document-format-not-supported

Please suggest me how to print doc files in unix
13 years ago
Hi Friends,

Can anyone please tell me how to print MS Office documents(doc,docx,xls..) using JAVA API..

I tried with Java Print Service API, DocPrintJob..Please suggest me with alternative solution.

13 years ago
Hi Friends,

Please help me out how to print a series of documents at a time.

Like..using MultiDoc ..

Can anyone give me sample code to print multiple documents..

13 years ago
Sorry..I was mistaken..
It is PDF version only..It will not work for PDF versions greater than 1.4

please check this url:
13 years ago
Hi Friends,

I want to convert PDF file to image file(jpeg,gif,png ..) using Java API..
I tried with PDFRenderer,it dint work in Java 1.5
Please help me with any solution.

13 years ago
Using PDFRenderer, I am getting this exception:

com.sun.pdfview.PDFParseException: Expected 'xref' at start of table
at com.sun.pdfview.PDFFile.readTrailer(
at com.sun.pdfview.PDFFile.parseFile(
at com.sun.pdfview.PDFFile.<init>(
at com.sun.pdfview.PDFFile.<init>(
at view.Pdf2Image.main(

When searched in Google, it says that PDFRenderer works fine Java in 1.4 but not latest versions.
I have java 1.5

Can you suggest any way(Java code) to convert PDF files to image files?
13 years ago
Thanku very much for your quick response.

I have a how can a printer print a PDF file without any Adobe software or anything?

If I open PDF file and print it from there,its printing correctly..
But ..when i try to print using JPS API, it is printing junk data in severeal pages.

Or you have any other suggestion to print PDF file from java code other than JPS

Please help me out in solving this..

13 years ago

Paul Sturrock wrote:Have a look at the Java Print Service API.

Thanks a lot Paul..
Using that documentation, I am able to print text files, jpeg,gif files..But unable to print PDF..Its printing in unreadable format..
Can you please suggest how to print PDF file correctly using DocPrintJob API...
13 years ago
Hi Friends,

Can anyone help me in how to print document using java program.
The file path and name will be given as input.
Program should read the content and print in the specified format.
The file can be of any format.

Please suggest any solution.

13 years ago
Hi Friends.

Can anyone tell me why I am getting this exception..(This is occurring at times only)
The same code is working fine is another instance with same database and war and jar files..

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(
at java.lang.Integer.parseInt(
at java.lang.Integer.parseInt(
at org.apache.jsp.aascAjaxShipMethodInfo_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
13 years ago
Hi friend,

I am facing typical problem.

I am using Tomcat 6.0 and my web application logging is java.util.logging,

When I am running my application, catalina.out is logging both Tomcat serevr logs and application logs also.
But,we dont want our application logs in catalina.out

Please help me what to change inorder to achieve this..

Thanks in advance.
13 years ago
Hi Friends,

I am facing typical situation.

I kept = SEVERE = ${catalina.base}/logs = catalina.

java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

and rest all other logs as OFF in $CATALINA_HOME/conf/

The problem is:

I am getting my Custom Tomcat Application logs also in Catalina.out and Catalina.logs present in tomcat/logs.
I dont want to write those logs in Tomcat logs.
Can anyone please help me?
13 years ago

i am also facing same problem.

I placed alert('<bean:message key="my.message.key" />'); in java script but,
how should i match <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> in javascript as i did in jsp

I am facing script error

Please reply

13 years ago