This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 124079 - unable to print
Summary: unable to print
Status: RESOLVED WONTFIX
Alias: None
Product: utilities
Classification: Unclassified
Component: Print (show other bugs)
Version: 6.x
Hardware: Other All
: P3 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-15 15:32 UTC by colemanc
Modified: 2007-12-19 09:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Print application (12.98 KB, text/plain)
2007-12-17 09:38 UTC, Vladimir Yaroslavskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description colemanc 2007-12-15 15:32:38 UTC
I am runing Netbeans 6.0 in the Ubuntu/Gutsy operating system.  When I attempt to print a code file in the editor, it
give s me a nice print preview page but when I click on Print in the bottom right corner of the preview page, it doesn't
work.    I do not get any dialog for the printer as I do with all other applications.  The preview window also
disappears.  I initiate the print using the Print option under the File menu.  I am fairly new to Ubuntu and linux so
its possible I am missing something.  I have tried to print both ruby and java files with no luck.
Comment 1 Vladimir Yaroslavskiy 2007-12-17 09:37:43 UTC
Please provide details:

1. Version of NetBeans: File > Help > About
2. Can you print from another applications?
3. Please run attach java program and try to print
   from it. What is the result?
Comment 2 Vladimir Yaroslavskiy 2007-12-17 09:38:32 UTC
Created attachment 54314 [details]
Print application
Comment 3 Vladimir Yaroslavskiy 2007-12-19 09:16:54 UTC
From email thread:

1. netbeans ide 6.0 build 200711261600  also I am using java jdk 1.6.0_03.

2.   Yes, I can print from several other applications including  Firefox and  Abiword.  (My husband also cannot print
and he has the netbeans 6.0 installed under Fedora.  I am using Ubuntu.)

3.  It appears to be having  an exception at the following code line:
       dialog = new ServiceDialog(gc,
                      x + gcBounds.x,
                      y + gcBounds.y,
                      services, defaultIndex,
                      flavor, attributes,
                      (Dialog)owner);
   }

here is the error dump when I run it:

init:
deps-jar:
compile:
run:
Exception in thread "Thread-1" java.lang.NullPointerException: null attribute
       at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)
       at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2121)
       at sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1263)
       at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:437)
       at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:195)
       at sun.print.ServiceDialog.<init>(ServiceDialog.java:124)
       at javax.print.ServiceUI.printDialog(ServiceUI.java:188)
       at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:855)
       at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:421)
       at printtest2.Print.printData(Print.java:68)
       at printtest2.Print$2$1.run(Print.java:40)
Comment 4 Vladimir Yaroslavskiy 2007-12-19 09:21:15 UTC
Looks like the problem is in jdk 6.0 under unix, see stack trace, it can't print AttributedCharacters.
Fix should be in next patch/release of jdk.