Issue Number | 252 |
---|---|
Summary | [Printing] Print Job prints to two different printers |
Created | 2014-09-25 15:39:11 |
Issue Type | Task |
Submitted By | Juthe, Robin (NIH/NCI) [E] |
Assigned To | alan |
Status | Closed |
Resolved | 2014-11-25 16:10:12 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/oceebms/issue.138557 |
When Bonnie runs an EBMS print job, the summary prints to the printer near her desk (single-sided) and the articles and coversheets print to the Cadillac (907) double-sided. I'm not sure if this has to do with the default printers and settings for these programs on her computer or if this is handled by the script. This can wait until Alan gets back. Thanks.
I'll look at this. There may be a simple parameter change that we can put in two alternate startup files, one for printing to the Cadillac and one to the Chevy.
Thanks, Alan. Ideally, everything would print to the Cadillac and be double-sided.
Ah, the description was clear but I managed to misinterpret it. I'm glad I said something before doing the work.
I've added Bonnie to the "watchers" on this JIRA issue.
I think that I can solve the problem by a change to the configuration file on Bonnie's computer. No software should need to change.
The configuration file can store arguments to pass to the Word document printer software using the --docprintargs parameter in the config file.
I'll need to visit Bonnie's office to see what the configuration file now contains, try to get it to direct the output of the .doc files to the "Cadillac" printer, and test it. If all goes well, it will probably take 15-30 minutes.
Bonnie,
Is there a time on Thursday that would be convenient for me to visit? The best times for me to avoid conflicts with other meetings would be sometime between 10:30 am and noon, or after 3 pm.
If one of those times works for you, please respond to this comment in JIRA, or send me email at vrmeyer@comcast.net.
Thanks.
I had a look at Bonnie's workstation today and took copies of the EBMS print configuration and log files.
Both the PDF and .doc files are being directed to the same printer, the Ricoh 907 "Cadillac". The config file shows the definition of the printer and the log file shows that that definition was in fact passed to both the pdf printing and the doc printing software in every case.
The only thing I noticed that should be changed doesn't account for what happened.
Bonnie's config file names the printer as:
nci6116g\3050RIC907
That name was created by CBIIT when it was using the old names from 6116 Executive Blvd.
Nowadays the printer has been renamed. The new name is:
ncips001\2E012RIC907
Apparently both names still work because Bonnie is still able to print to the 907 using the old name. However I think we should switch to the newer name in case CBIIT ever decides to stop supporting the old names. I'll go to Bonnie's office on Thursday, if that's convenient, and make and test the change.
That still doesn't account for why the pdfs went to the right printer but the docs to the wrong one. It's a mystery.
Bonnie just ran a small print job and the summary printed to the small printer near her workstation again. Not sure if the printer name change has been done on her machine yet, but just wanted to let you know.
I have not made the change. I'll come down on Tuesday and do it. Hopefully, that will solve the problem.
Bonnie,
Our department has meetings on Tuesday morning that end at 10:30. Is it okay for me to come at about 10:45? I should only need five minutes to edit your printing configuration file.
While I'm there I'll also look at the printer definitions in the Windows printer configuration. Maybe there's something there that's causing the odd behavior.
While I think the use of the old names shouldn't have caused this problem, I'm perfectly able to tell myself a story about how they might have. 🙂
Anyway, we'll see if changing them helps.
I made the change.
I also checked to see if I could change the default printer for Libre Office Writer, the software we use to print Word documents. There didn't seem to be a way. If no printer is specified it uses the Windows default printer - which is what most software does.
Bonnie and I had both checked the logs and see that we're passing the right printer name to Libre Office, but it's sometimes going to the default printer instead. I'm hoping that it's a timeout problem with the software waiting for a response from the printer, not getting it in the expected time frame, and using the default instead. The pdf printer may have a slightly longer timeout. If so, it's conceivable that using the new, more direct, printer name will shorten the time for getting a response from the printer.
We'll see. If it doesn't work please let me know and I'll see if there is anything else I can do to make it work.
Alan I tried to run a new print job today for Robin J (print job 159) and it started printing the summary at the wrong printer (the 4600) and single sided as before. Then it gave me a "run command failed, error number=2". I also hit the cancel print job at the 4600 printer where the summary was printing. I went ahead and printed it myself from the saved file rather than try to run it again. This was a print job of Oct and Nov docs in case that might make a difference.
Rats.
It looks like the printer naming issue was not the cause of the problem.
Can you tell if it's happening on some documents and not others? Is it, for example, related to the length of the document (shorter ones work and longer ones fail, or vice versa, .doc works and .docx fails, or vice versa), or anything else you can think of? Or is it essentially just failing on every document?
Also, does anyone run these jobs from any other workstation? If so, are they experiencing the same problem?
I'll do some experiments from my own machine and see if I can learn anything. I've got some more ideas for things to try. I'll post more information about what I've found out, if anything, before I go home tonight.
Here's another question. Does it matter whether the misdirected file is printed before or after the pdf documents? (I'd be surprised if it does, but I have to ask just in case.)
No it doesn’t. I’m working on answering your previous email too. Trying out a couple things that as of now aren’t working-still getting the failed message.
Â
From: NCI JIRA Mail (NIH/NCI)
Sent: Thursday, November 20, 2014 3:39 PM
To: Ferguson, Bonnie (NIH/NCI) [C]
Subject: [NCI JIRA Tracker] (OCEEBMS-252) [Printing] Print Job prints to
two different printers
Â
[1]Alan Meyer commented on [2]OCEEBMS-252
[3][Printing] Print Job prints to two different printers
Assignee:
[4]Alan Meyer
Here's another question. Does it matter whether the misdirected file is printed before or after the pdf documents? (I'd be surprised if it does, but I have to ask just in case.)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA
administrators
For more information on JIRA, see: [5]http://www.atlassian.com/software/jira
Â
----------------------------------------------------------------------------------------
[1] https://tracker.nci.nih.gov/secure/ViewProfile.jspa?name=Alan
[2] https://tracker.nci.nih.gov/browse/OCEEBMS-252
[3] https://tracker.nci.nih.gov/browse/OCEEBMS-252
[4] https://tracker.nci.nih.gov/secure/ViewProfile.jspa?name=Alan
[5] http://www.atlassian.com/software/jira
I might have found the problem.
There is a line in the configuration file (RunEbmsPrintJob.cfg) that says:
def_docprintargs=-pt
I now believe that it should say:
def_docprintargs=--pt
The difference is that there should be two hyphens in front of the "pt" instead of 1.
To fix it, you can either try editing RunEbmsPrintJob.cfg yourself with Notepad (not with Word, which puts in its own kind of hyphens), or wait and I'll do it for you on Monday when I am in next.
If that doesn't fix it, I'll keep looking, but I'm optimistic about this one.
That’s great (she said with some trepidation). I have a board meeting all day today so Monday is fine. I won’t be in until about 9 or so I think. I have an orthopedist appt at 8.
See you then.
Â
From: NCI JIRA Mail (NIH/NCI)
Sent: Thursday, November 20, 2014 5:03 PM
To: Ferguson, Bonnie (NIH/NCI) [C]
Subject: [NCI JIRA Tracker] (OCEEBMS-252) [Printing] Print Job prints to
two different printers
Â
[1]Alan Meyer commented on [2]OCEEBMS-252
[3][Printing] Print Job prints to two different printers
Assignee:
[4]Alan Meyer
I might have found the problem.
There is a line in the configuration file (RunEbmsPrintJob.cfg) that says:
def_docprintargs=-pt
I now believe that it should say:
def_docprintargs=--pt
The difference is that there should be two hyphens in front of the "pt" instead of 1.
To fix it, you can either try editing RunEbmsPrintJob.cfg yourself with Notepad (not with Word, which puts in its own kind of hyphens), or wait and I'll do it for you on Monday when I am in next.
If that doesn't fix it, I'll keep looking, but I'm optimistic about this one.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA
administrators
For more information on JIRA, see: [5]http://www.atlassian.com/software/jira
Â
----------------------------------------------------------------------------------------
[1] https://tracker.nci.nih.gov/secure/ViewProfile.jspa?name=Alan
[2] https://tracker.nci.nih.gov/browse/OCEEBMS-252
[3] https://tracker.nci.nih.gov/browse/OCEEBMS-252
[4] https://tracker.nci.nih.gov/secure/ViewProfile.jspa?name=Alan
[5] http://www.atlassian.com/software/jira
I modified the config file.
We'll see if that fixes it.
It didn't fix it. We got a surprising error saying that "--pt" is an unknown parameter, followed by a list of known parameters that includes --pt!
I've tried to install Libre Office, our doc printing software, on my machine without success. I put a ticket in to the Help Desk this morning asking for someone to come help install it (it needs a person with administrative permissions - which I don't have). I haven't heard anything back from them on it yet.
You should be able to install it yourself. Download the installer, open the folder where it landed, right click on the installer, and select "Install with administrative rights."
Yeah, I did that. I installed the latest "Fresh" version, but it crashes. Now I'm stuck because I can't uninstall with admin rights and I can't install the older "Still" version without uninstalling the later one.
So I need the Help Desk.
Interesting. I wonder what you're doing (or what your workstation is doing) which causes the crash, as I just upgraded to the latest (right before posting the previous comment, to make sure I was describing something which still works), and I'm able to use Calc and Writer without any problems.
I'm taking this out of JIRA so as not to bore everyone else.
I don't know what went wrong. It may well have been a broken
install
rather than a broken package. Or maybe when I selected some
installation options other the default, in order to only install what
I
needed, I ran into a dark corner.
If I start Writer it comes up okay. But when I start typing it
crashes
before I finish one line.
Now I wonder how long I'll have to wait for a help desk person come
up
to enter his name and password on my screen.
Writing software for myself at home is more fun.
Alan
I should take back the crack about writing software at home being more fun. What could be more fun than this?
Bob and I have installed two different, later versions of Libre Office writer on our respective machines. Unlike the one on Bonnie's machine, they recognized the --pt parameter, but did not honor it. The documents still came out on the default printer. So this appears to be a bug in Libre Office.
My next approach will be to see if I can script the setting of the default printer doing something like this:
Set default printer = Cadillac
Print the document
Set default printer back to Chevrolet
This ought to be possible but, as usual, early experiments ran into problems.
I may have the solution.
I'm recording the technical details here so that anyone coming after me
will know what I did.
In experimenting with the Windows Management Interface Command-line tool
in order to implement the solution above (change the default printer,
print, then change the default back), I found a command that would list
all of the printers known to my system:
wmic printerconfig get name
Using that, I got the following name for the Cadillac printer:
\\ncips-p001-v.nci.nih.gov\2E012RIC907
This is a more "fully qualified" name than I was using before. When I
plugged that into a script using the --pt parameter, it worked. The
more abbreviated name worked for our PDF printing software but Libre
Office Writer was pickier.
The next steps are as follows:
Plug the new name into Bonnie's configuration file.
Test printing both a PDF and a .doc file.
If there is a problem with the .doc file, or if we just think it's a
good idea to update the software, then update Bonnie's copy of Libre
Office to the version I tested with on my machine.
One thing led to another and a total of five fixes were made:
Fix the incorrect parameter name from "pt" to
"-pt".
Replace Libre Office with a later version that correctly handled --pt. The earlier one said it handled it but didn't.
Modify the name of the printer in the config file to use the fully qualified name, required by Libre Office.
Change the path in the config file to Libre Office writer, which is in a slightly different place in the new version of Libre Office (see fix #2) from the old one.
Change the path in the config file to the pdfprint program. A reorganization of the group drive (L🙂 in the last few days caused the old path to fail.
I made a backup of Bonnie's config and other relevant files to her H: directory in case her C: drive fails sometime in the future.
I believe everything is now working.
JIRA formatting is a hoot. I think I'll go back to using the 'noformat' directive to get the formatting I want.
I'm marking this as resolved, fixed.
All of the changes were made on Bonnie's workstation. No new software need be released anywhere.
[Here's a re-edited version of the list of fixes, to work around the JIRA garbling.]
One thing led to another and a total of five fixes were made:
Fix the incorrect parameter name from "--pt" to "-pt".
Replace Libre Office with a later version that correctly handled --pt. The earlier one said it handled it but didn't.
Modify the name of the printer in the config file to use the fully qualified name, required by Libre Office.
Change the path in the config file to Libre Office writer, which is in a slightly different place in the new version of Libre Office (see fix #2) from the old one.
Change the path in the config file to the pdfprint program. A reorganization of the group drive (L:) in the last few days caused the old path to fail.
Alan made a backup of Bonnie's config and other relevant files to her H: directory in case her C: drive fails sometime in the future.
We believe everything is now working.
Elapsed: 0:00:00.000678