Bug 247638 - EPS Ghostcript does not print postscript with Java 1.6
Summary: EPS Ghostcript does not print postscript with Java 1.6
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: 8
Hardware: i386
OS: Linux
low
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-10 16:16 UTC by Keith Roberts
Modified: 2008-06-17 17:00 UTC (History)
0 users

Fixed In Version: F-8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-17 11:16:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Screenshot of trying to print from ArgoUML (233.56 KB, image/png)
2007-07-10 16:16 UTC, Keith Roberts
no flags Details
applicable section of cups error_log (16.32 KB, text/plain)
2007-07-10 16:21 UTC, Keith Roberts
no flags Details
foomatic-rip.log file with debug:1 parameter set in config file (4.41 KB, text/plain)
2007-07-10 17:12 UTC, Keith Roberts
no flags Details
foomatic-rip.ps file as requested (438.09 KB, application/postscript)
2007-07-10 17:44 UTC, Keith Roberts
no flags Details
Latest foomatic-rip.ps generated by ghostscript-8.62-3.fc8 (on 14-06-2008) (90.81 KB, application/octet-stream)
2008-06-14 18:03 UTC, Keith Roberts
no flags Details
Latest foomatic-rip.ps generated by ghostscript-8.62-3.fc8 (on 14-06-2008) sent again as *.ps type (90.81 KB, application/postscript)
2008-06-14 18:09 UTC, Keith Roberts
no flags Details

Description Keith Roberts 2007-07-10 16:16:39 UTC
Description of problem:

Unable to print from Java applications under KDE. The problem appears to be 
with the EPS version 8.15.4 of Ghostscript. It cannot handle the 
[/DeferredMediaSelection true] option line in the postscript file. This causes 
EPS Ghostscript 8.15.4 to abort and Java 1.6 to be unable to print anything. 
Please see the following bug report on SDN:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506286

So the problem is *NOT* Java - but appears to be EPS Ghostscript 8.15.4. 
choking on the [/DeferredMediaSelection true] option.

Version-Release number of selected component (if applicable):

[root@karsites argo-uml]# gs --help
ESP Ghostscript 8.15.4 (2007-03-14)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.

This is the default version of ghostscript that installs with FC6.

How reproducible:
Always

Steps to Reproduce:
1. Try printing from a Java application to a non-postscript printer. I was 
using ArgoUML, JEdit and Visual Paradigm-UML and an HP DeskJet 810C printer.
Nothing seems to work when printing from those java applications.
  
Actual results:

Nothing gets sent to the printer. The print manager accepts the postscript 
file, and the state field says, "processing". It then changes to "Error".

There are two attachments included:

1) part of my cups error_log that refers to the postscript document, in the 
file called cups-log.txt:

2) java101-error.png a screenshot of the KDE print manager que, and the failed 
Java Print job number 101. 


Expected results:

I expect to be able to send documents to the printer when I print from a Java 
application.

Additional info:

ESP Ghostscript 8.15.4 has now been merged into GPL version 8.57 of 
Ghostscript. Please see the following articles:

http://lwn.net/Articles/232459/
http://www.cups.org/articles.php?L463

The latest up to date version of ghostscript is available from:

http://sourceforge.net/project/showfiles.php?group_id=1897&package_id=108733

This is quite a serious problem. Please can you update the EPS 8.15.4 version 
of Ghostscript, with the latest merged version 8.57 from sourceforge?

I assume this will correct the bug?

Comment 1 Keith Roberts 2007-07-10 16:16:39 UTC
Created attachment 158865 [details]
Screenshot of trying to print from ArgoUML

Comment 2 Keith Roberts 2007-07-10 16:21:20 UTC
Created attachment 158866 [details]
applicable section of cups error_log

Comment 3 Tim Waugh 2007-07-10 16:31:02 UTC
8.57 loses the 'cups' output device which is required for print operation on
Fedora, as well as several other device drivers only available in the ESP code,
so it is not as simple as upgrading the package to 8.57.

I am currently in the process of updating our ghostscript package in the Fedora
devel repository to a snapshot of what will become ghostscript-8.60.  I'd like
to verify the new version, and will need to try the same PostScript input as you
are having trouble with.

Please edit /etc/foomatic/filter.conf and add the line 'debug: 1' to the end. 
Now try printing from your Java application as before, and when it fails please
attach the /tmp/foomatic-rip.ps file to this bug report.

Afterwards you can remove the 'debug: 1' line from /etc/foomatic/filter.conf. 
Thanks.

Comment 4 Keith Roberts 2007-07-10 17:12:19 UTC
Created attachment 158870 [details]
foomatic-rip.log file with debug:1 parameter set in config file

Comment 5 Tim Waugh 2007-07-10 17:21:04 UTC
That's the foomatic-rip.log file -- I need the foomatic-rip.ps file.  Thanks.

Comment 6 Keith Roberts 2007-07-10 17:44:48 UTC
Created attachment 158873 [details]
foomatic-rip.ps file as requested

Comment 7 Tim Waugh 2007-07-10 18:18:01 UTC
Thanks.

Comment 8 Keith Roberts 2007-10-05 19:34:13 UTC
Will this be fixed for Fedora 8 release?


Comment 9 Tim Waugh 2007-10-09 12:06:59 UTC
Yes, I've tested that foomatic-rip.ps file with the GPL Ghostscript package
we'll be shipping in Fedora 8 and it works.

Comment 10 Keith Roberts 2007-10-09 19:23:03 UTC
I'm very pleased to hear that Tim. Thankyou for getting it sorted out for Fedora
8 :-)



Comment 11 Keith Roberts 2008-01-24 23:14:24 UTC
I'm on Fedora 8 and Sun's JDK SE 6. I still cannot print from any Java 
applications.

[root@karsites 0.21.1]# java -jar com.horstmann.violet-0.21.1.jar
Exception occurred during event dispatching:
java.lang.NullPointerException: null attribute
        at 
sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1176)
        at 
sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2165)
        at 
sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1281)
        at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:455)
        at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:213)
        at sun.print.ServiceDialog.<init>(ServiceDialog.java:142)
        at javax.print.ServiceUI.printDialog(ServiceUI.java:206)
        at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:881)
        at 
com.horstmann.violet.framework.gui.PrintPanel$5.actionPerformed(PrintPanel.java:155)
        at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2013)
        at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2336)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:260)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:254)
        at java.awt.Component.processMouseEvent(Component.java:6100)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
        at java.awt.Component.processEvent(Component.java:5865)
        at java.awt.Container.processEvent(Container.java:2110)
        at java.awt.Component.dispatchEventImpl(Component.java:4461)
        at java.awt.Container.dispatchEventImpl(Container.java:2168)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4466)
        at 
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4130)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4060)
        at java.awt.Container.dispatchEventImpl(Container.java:2154)
        at java.awt.Window.dispatchEventImpl(Window.java:2555)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$1.run(Dialog.java:1073)
        at java.awt.Dialog$3.run(Dialog.java:1127)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1125)
        at java.awt.Component.show(Component.java:1456)
        at java.awt.Component.setVisible(Component.java:1408)
        at java.awt.Window.setVisible(Window.java:871)
        at java.awt.Dialog.setVisible(Dialog.java:1012)



Comment 12 Tim Waugh 2008-01-25 11:09:16 UTC
(Re-opening this report.)


Comment 13 Keith Roberts 2008-01-25 13:38:28 UTC
Thanks for that Tim :)


Comment 14 Keith Roberts 2008-02-29 16:46:24 UTC
It appears to be working now. I can print from the above violet application 
nicely, and also from ArgoUML and also from NetBeans 5.5.1 - many thanks for 
getting this sorted Tim :)


Comment 15 Tim Waugh 2008-02-29 17:29:53 UTC
No problem.

Comment 16 Tim Waugh 2008-06-13 15:35:20 UTC
You've re-opened this bug report, but have not provided any futher information.
 Please follow the steps in comment #3.  If you find that the bug is actually
different to this one, please open a separate bug report.  Thanks.

Comment 17 Keith Roberts 2008-06-13 16:12:47 UTC
Could you try the attachment in comment #6 again please Tim? It appears to be
the same or very similar bug. If that attached foomatic-rip.ps file works OK,
then I could investigate further, such as generating another one.

I'm still using the same versions og ArgoUML and violet-uml as before when the
bug was previously fixed. So it's not the java applications. I also tried my
laptop that has the same version of java that was working after you fixed
ghostscript. My box is fully patched with the latest F8 updates.

This is the output I get when running violet-uml from the command line:

[keith@karsites 0.21.1]$ java -jar com.horstmann.violet-0.21.1.jar
Exception occurred during event dispatching:
java.lang.NullPointerException: null attribute
        at
sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1176)
        at
sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2165)
        at
sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1281)
        at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:455)
        at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:213)
        at sun.print.ServiceDialog.<init>(ServiceDialog.java:142)
        at javax.print.ServiceUI.printDialog(ServiceUI.java:206)
        at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:881)
        at
com.horstmann.violet.framework.gui.PrintPanel$5.actionPerformed(PrintPanel.java:155)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2013)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2336)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:260)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:254)
        at java.awt.Component.processMouseEvent(Component.java:6100)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
        at java.awt.Component.processEvent(Component.java:5865)
        at java.awt.Container.processEvent(Container.java:2110)
        at java.awt.Component.dispatchEventImpl(Component.java:4461)
        at java.awt.Container.dispatchEventImpl(Container.java:2168)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4466)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4130)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4060)
        at java.awt.Container.dispatchEventImpl(Container.java:2154)
        at java.awt.Window.dispatchEventImpl(Window.java:2555)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$1.run(Dialog.java:1073)
        at java.awt.Dialog$3.run(Dialog.java:1127)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1125)
        at java.awt.Component.show(Component.java:1456)
        at java.awt.Component.setVisible(Component.java:1408)
        at java.awt.Window.setVisible(Window.java:871)
        at java.awt.Dialog.setVisible(Dialog.java:1012)
        at
com.horstmann.violet.framework.gui.DialogFactory.createDialog(DialogFactory.java:198)
        at
com.horstmann.violet.framework.gui.DialogFactory.showDialog(DialogFactory.java:159)
        at
com.horstmann.violet.framework.action.FileAction.print(FileAction.java:418)
        at
com.horstmann.violet.framework.gui.menu.FileMenu.performPrint(FileMenu.java:447)
        at
com.horstmann.violet.framework.gui.menu.FileMenu.access$1000(FileMenu.java:53)
        at
com.horstmann.violet.framework.gui.menu.FileMenu$11.actionPerformed(FileMenu.java:206)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2013)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2336)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:260)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:375)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1689)
        at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1733)
        at java.awt.Component.processMouseEvent(Component.java:6100)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
        at java.awt.Component.processEvent(Component.java:5865)
        at java.awt.Container.processEvent(Container.java:2110)
        at java.awt.Component.dispatchEventImpl(Component.java:4461)
        at java.awt.Container.dispatchEventImpl(Container.java:2168)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4466)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4130)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4060)
        at java.awt.Container.dispatchEventImpl(Container.java:2154)
        at java.awt.Window.dispatchEventImpl(Window.java:2555)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.ja va:276)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java: 201)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja va:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)



Comment 18 Keith Roberts 2008-06-13 16:34:15 UTC
I have followed the instructions in comment #3, and I'm not getting any
foomatic-rip.ps file generated in /tmp/ ??

This is using violet-uml

I could try ArgoUML, see if that generates the *.ps file in /tmp/


Comment 19 Keith Roberts 2008-06-13 16:54:14 UTC
I tried argoUML - still no foomatic-rip.ps file generated in /tmp/ dir.

what next Tim ???




Comment 20 Tim Waugh 2008-06-13 17:13:46 UTC
(In reply to comment #17)
> Could you try the attachment in comment #6 again please Tim? It appears to be
> the same or very similar bug. If that attached foomatic-rip.ps file works OK,
> then I could investigate further, such as generating another one.

Yes, still works.

ghostscript-8.62-3.fc8

Comment 21 Keith Roberts 2008-06-13 18:29:41 UTC
I'm only on ghostscript-8.61-8.fc8, and my system is all up-to-date as you can 
see below.

Where did you get ghostscript-8.62-3.fc8 from. Updates-testing?


[root@karsites keith]# yum update
fedora                    100% |=========================| 2.1 kB    00:00
updates                   100% |=========================| 2.3 kB    00:00
Setting up Update Process
No Packages marked for Update
[root@karsites keith]# rpm -qv ghostscript
ghostscript-8.61-8.fc8
[root@karsites keith]#


Comment 22 Tim Waugh 2008-06-13 21:29:29 UTC
Ah.. yes, updates-testing.

Comment 23 Keith Roberts 2008-06-14 18:03:59 UTC
Created attachment 309363 [details]
Latest foomatic-rip.ps generated by ghostscript-8.62-3.fc8 (on 14-06-2008)

Comment 24 Keith Roberts 2008-06-14 18:09:43 UTC
Created attachment 309364 [details]
Latest foomatic-rip.ps generated by ghostscript-8.62-3.fc8 (on 14-06-2008) sent again as *.ps type

May have sent the previous foomatic-rip.ps as the wrong type!

Comment 25 Keith Roberts 2008-06-14 18:22:18 UTC
I still have the same printing problem with Java apps. I'm using Sun's 
jdk-6u6-linux-i586-rpm.bin and the latest ghostscript-8.62-3.fc8, from 
updates-testing :(

I have uploaded the latest foomatic-rip.ps file, generated by 
ghostscript-8.62-3.fc8.

Comment 26 Keith Roberts 2008-06-17 10:57:11 UTC
Is the latest foomatic-rip.ps file working with your system now Tim?


Comment 27 Tim Waugh 2008-06-17 11:16:02 UTC
Works fine, yes.  Note: it is not generated by ghostscript, but by khtml;
ghostscript interprets it.

Comment 28 Keith Roberts 2008-06-17 16:40:07 UTC
What version of Java are you using to test this against?

Comment 29 Tim Waugh 2008-06-17 17:00:28 UTC
I am not using Java.  The original bug report was that Java-generated PostScript
was not processed correctly by Ghostscript (see comment #0).

This really does seem to be a Java bug:

http://www.cups.org/articles.php?L433+I0+TFAQ+M10+P1+Qjava
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500903

Closing.


Note You need to log in before you can comment on or make changes to this bug.