You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jonathan Morgan <jm...@premieresys.com> on 2002/09/25 22:48:47 UTC
Having problems getting Java Print Service (JPS/javax.print) and FOP AWTRenderer to work together.
Hello,
I am having some problems with FOP's AWTRenderer functionality when used in conjunction with the new Java Print Service APIs in Java 1.4 (javax.print and child packages). Any attributes I set are ignored when I try to print.
The only way I have found to change paper size and orientation is to change the values for height and width in the XSL-FO that I am rendering so that they reflect the size of the paper and the orientation I want to use (for instance, to print landscape on na-letter paper, height = 21.59cm, width = 27.94cm in the fo:simple-page-master element for the page). Attributes like username, job name, print quality, paper orientation, media, etc. are simply ignored when passed to the javax.print.DocPrintJob.printJob() method.
Has anyone run into this problem, or found a work-around? Is this a problem for all render types, or just AWTRenderer (I had troubles with the postscript renderer, too, but I was rushing through that implementation trying to find any way to change paper size and orientation, so I can't be sure that wasn't user error)?
Using the page height and width attributes, I have met the requirements for the initial round of our implementation of XSL-FO printing, but future requirements are going to require more options to be customizable on a print-job-by-print-job basis.
I am running Win XP SP1, using Java 1.4.1 FCS, and have tried printing to an HP Laserjet 5m, a Lexmark 7000, and a Lexmark Z52, all with the latest printer drivers. I have also had the same problems printing on a Windows NT 4.0 Workstation machine with the same Java 1.4.1 FCS, printing to the HP Laserjet 5m.
Any help would be appreciated.
Thanks,
Jon Morgan
Problem with FOP and JServ
Posted by "Ing. Atilio Ranzuglia Buteler" <ar...@yahoo.com>.
hi, everybody
i'm having a very strange problem. i've developed a servlet
that returns a pdf document.
it works perfectly with tomcat and any browser that (can)
supports pdf documents.
the problem is when i deploy it to an apache/jserv server,
there only works if the browser is
different from ie. but the document is correct. i try with
http explorer to see
what is really coming back and the document is fine.
the version of sdk is the same in tomcat and jserv (both
1.4.0), also with fop and the others libraries.
the only difference is on the headers, here they are:
HTTP/1.1 200 OK XXXXX
Date: ...
Server: Apache/1.3.12 (Win32) ApacheJServ/1.1 mod_ssl/2.6.4
...
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Content-Length: 25179 XXXXX
Connection: close
Content-Type: application/pdf
HTTP/1.0 200 OK XXXXX
Date: ...
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet
2.2; Java 1.4.0_01;...)
Cache-Control: no-cache
Content-Length: 25176 XXXXX
Date: Mon, 23 Sep 02002 14:48:22 GMT
Pragma: no-cache
Status: 200 XXXXX
Expires: Thu, 01 Jan 01970 00:00:00 GMT
Content-Language: en XXXXX
Content-Type: application/pdf
the differences are the ones with XXXXX. i think that maybe
the status line can be the problem.
if someone of you can help me, i would appreciate too much
thanks, atilio
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com