Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||printing from command line doesn't renumerate printers|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Target Milestone:||AOO PleaseHelp|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description stephendegabriele 2009-03-13 17:35:20 UTC
example: add new printer oowriter -pt NEWPRINTERNAME document.odt prints to default printer instead of to the new printer. Fix: open oowriter, go file->print.. then cancel. then oowriter -pt NEWPRINTERNAME document.odt works this might only happen if open office is already open before you add the new printer and then issue the oowriter -pt command.
Comment 1 philipp.lohmann 2009-03-16 11:19:16 UTC
The list of available printers is read only once during OOo's life time, that is true. The reason is that reading that list can - unfortunately - take from a few 10 milliseconds over multiple seconds on networked systems to indefinetly on misconfigured systems (actually printer discovery is run an own thread because it can take so arduously long). Even more unfortunate there is no method of getting informed when the printer list has changed. Printing on Unix still is a rather sub par affair still. That being said we could of course get the printer list every time we need a new printer object, however I'm not sure I want to do that for the time penalties involved.
Comment 2 stephendegabriele 2009-03-16 16:18:35 UTC
I'm not sure how the printer discovery is done in OO. but running lpstat -p never takes long. But what if it is changed so if printing from the command line, and a printer that is not recognized yet is selected that it will then scan for new printers. If the printer is still not found, rather than print to the default it should return an error # and message. Also, it does appear to be checking on the printers whenever I go to file->print.
Comment 3 philipp.lohmann 2009-03-16 16:54:33 UTC
Again; currently the list of available printers on unix systems is read only once during OOo's life time, however often you print, select File->Print or whatever. That lpstat -p runs fast for you is nice, but there have been many people for whom it didn't. However I think the idea of printing an error message if the printer given on the command line does not exist is a splendid idea. @cd: the latter would be a framework issue ?
Comment 4 stephendegabriele 2009-03-16 17:02:21 UTC
After some testing I have come to the conclusion that the printer scan is *NOT* only done once. If i have oowriter open. Add a printer, Go file->print. The new printer shows up. If i then delete it. and go back. The printer is gone. I think the assumption that the printer list is only read once needs to be re-assessed.
Comment 5 philipp.lohmann 2009-03-16 17:35:56 UTC
That means you did either not test on Linux as described or you "added" a printer by using the spadmin tool (basically an OOo internal "printer"). The latter would indeed be updated occasionally on Unix systems. System printers on Unix however are read only once.