Printing is duplex by default possible
Submitted by Ben_Charlton on Wed, 11/06/2014 - 12:49
Tim,
Just checking but I assume the java.awt print options are still limited to just num of copies and that tray and duplex options are still not passed to the printer driver
http://stackoverflow.com/questions/14328012/printing-with-attributestray...
Re: Printing is duplex by default possible
Duplex printing isn't supported. It would need to be added to entity.documentTemplate.
The tray is passed if you are printing a jasper report.
See also:
Re: Printing is duplex by default possible
Working through this one.
Couple of things:
Jasperreports printing implementation seemed simple enough, because generally the Printproperties are passed all the way down the line, so we can just set the printproperties and they will be picked up and passed on and then pass them directly to the javax printer in the jasper service.
Openoffice is a different kettle of fish, it seems that currently we only pass the number of copies as an integer, mostly printproperties was ignored. or used to retrieve number of copies and then disposed.
It looks like I need to refactor the process to use a new print interface that passes the properties down.
OOprinting appears to support duplexing
com.sun.star.view.DuplexMode settings they differ from the javax settings slightly.
While its relatively simple to create an method in printservice, nothing will use it, hence the refactoring, to the print class's that can are typically used for template printing.
Just my current thoughts ...
Re: Printing is duplex by default possible
also this todo was in the printservice is it still valid did you want me to look at it or strip it out
/* @todo replaced asynchronous notification of print completion with synchonrous printing due to OpenOffice 2.1 crashes. if (close) { XPrintJobBroadcaster broadcaster = (XPrintJobBroadcaster) UnoRuntime.queryInterface(XPrintJobBroadcaster.class, printable); broadcaster.addPrintJobListener(new XPrintJobListener() { public void printJobEvent(PrintJobEvent event) { PrintableState state = event.State; if (!state.equals(PrintableState.JOB_STARTED) && !state.equals(PrintableState.JOB_SPOOLED)) { document.close(); } } public void disposing(EventObject eventObject) { } }); } */
Re: Printing is duplex by default possible
It can go.
Re: Printing is duplex by default possible
On consideration wouldnt I want to add this to
entityRelationship.documentTemplatePrinter
Given it would be unique based on the printer being able to do duplexing
Re: Printing is duplex by default possible
Yep - good point.
Re: Printing is duplex by default possible
Next Question:
Is the reason we dont show tray options etc on the interactive print dialong because they arent processed by the OOffice printers, where as they are by the JReport printers? Or is it just it would make the interactive print setting more complex than they need to be.
Re: Printing is duplex by default possible
AFAIK, no-ones asked for it before, but the fact we don't support it for OpenOffice would also rule it out.
Re: Printing is duplex by default possible
I am just trying to work out whether displaying duplexing in that dialog would be useful or not...
Typically that option would be retrieved from the templateprinter relationship, but interactively we could override.
Re: Printing is duplex by default possible
https://openvpms.atlassian.net/browse/OVPMS-1489
patch files attached
Re: Printing is duplex by default possible
I would note that I havent asked for user consensus on this.
But I would argue that the patch is small and is completely backward compatible.
The number of users that might benefit from duplex options is probably larger than the users realise IMO