System: jedit4.3pre7, jdk1.5.0_07, RedHat kernel 2.6.9-34.0.1.ELsmp
Printer: HP LaserJet 4600dtn
Bug:
In the "Print..." dialog, under the "Appearance" tab, there are radio buttons for "One side", "Tumble", or "Duplex" printing.
When I select duplex printing, the printer properly "prints" both sides of the paper, but the back side is blank. In other words, the front side prints, the printer retracts the page, and the back side prints; but all the text is on the front side only.
Other applications (e.g. acroread) print duplex properly using the lpr flag "-o Duplex=DuplexNoTumble").
How can I find (and fix?) the command jedit uses to print?
Thanks,
Daniel
Logged In: YES
user_id=631957
Originator: NO
jEdit uses the java printing api - it doesn't run a command that can be fixed like you suggest.
The problem could well be with java rather than jEdit.
The Java Printing API it uses is from Java 1.2,
and there is a newer api, javax.print introduced in Java 1.4
Perhaps the newer API works better/accesses more printer capabilities?
http://java.sun.com/javase/technologies/desktop/printing/
This should be fixed in the latest code, but I don't have access to a duplex printer. Would someone who has access to such a printer give the latest code (revision 24486 or later) test this is fixed?
Just checked with Epson XP-700: jEdit 5.4.0 doesn't prints duplex, though I've chosen this in jEtdit's print dialog.
In contrast, jEdit 5.3.0 does print duplex without problems. Therefore I checked duplex=Auto in system printer properties (Epson driver). Other options are: duplex=Off / manual.
java.version=1.8.0_121
java.vm.version=25.121-b13
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.runtime.version=1.8.0_121-b13
java.runtime.name=Java(TM) SE Runtime Environment
java.vendor=Oracle Corporation
java.compiler=null
os.name=Windows 10
os.version=10.0
os.arch=amd64
user.home=C:\Users\sc
java.home=C:\Program Files\Java\jre1.8.0_121
java.class.path=G:\Tools\jEdit_54_Test\jedit.jar
Robert, would you be able to try again with the latest code? I think the fix for this bug is the same fix as for 4035, the print attributes were not being set correctly.
Dale, I'd like to do it. But I need a ready-to-use jedit.jar and the latest daily build is of may 31 - will wait.
Just installed daily build from 2017-06-03 and started it without existing settings directory. After invoking the print dialog, a click on preview or print button did nothing. Then quit jedit and attached activity.log.
Beside this, after changing margins in jedit print dialog I won one trial for preview and print ;-) : Now I'am able to print duplex, but it seems that only Windows printer settings (at least for duplex) are recognized.
Thanks, the activity log is useful. When you say "only Windows printer settings are recognized", do you mean you're setting duplex from somewhere other than within jEdit?
Yes, Windows provides a link to a print settings dialog for each printer. This dialog is part of the driver - in my case from Epson (see attached screen shot). As a user I see this behavior: The settings You've made this way are kind of global defaults. An application could override some of these settings whithout effecting other applications. Don't ask me about Java's part...
The activity log was useful in pointing out that I had bad values set for the default metric margins.
As for the duplex issue, I've checked the code carefully and can see that the proper printing attributes are being sent from jEdit to the printing system. I also discovered that my color printer will print duplex, but I also can only seem to make that happen by going to the operating system printer set up and setting duplex there. The process is jEdit sets up the printing parameters, sends those to the JVM printing system, which passes them on to the operating system printing system, which loads the proper driver, which translates the printing parameters so the printer can understand, then sends it to the printer. Somewhere along the way, the duplex setting is being ignored.
I can't help but think this is a bug in either the java printing system or the printer driver.
Hmm, it's really weird: I tested again and again (last the daily build 2017-06-06) and duplex printing now seems to work for me as intended - independent of Windows system print settings.
Regarding the margins issue, the changed defaults for me lead to only minimal changed behavior, but no solution (see attached activity_Margins.log):
1. Invoke jEdit with empty settings dir
2. Invoke print dialog first time: margin values are displayed as integers (25), print/preview buttons do work
3. Close print dialog
4. Invoke print dialog next time: margin values are displayed as real numbers (25.0), print/preview buttons don't work
5. Don't close print dialog but change all four margin values: margin values are displayed as integers (25), print/preview buttons do work
6. Repeat as of point 3 ...
Thanks, I've obviously missed something somewhere. The metric values should only ever be integer numbers. I'll look into that further.
For the duplex issue, I have a feeling it's a combination of operating system, printer driver, and java version. You might be one of the lucky people that has the right combination.
The metric margin values should be fixed now, however, the next time you get a new version of jEdit, you'll probably still be seeing the decimal point the first time, so you'll need to change those. Another option is to delete the 'printspec' file in your jEdit settings directory before restarting jEdit, however, that will also delete all your other saved printer settings.
Yes, using daily build 2017-06-12 the margins issue has gone - thank You!
Marking this as fixed since there hasn't been any more discussion of problems.