printing reminders
Submitted by Guest on Thu, 02/07/2015 - 22:45
hi
I have an issue if i go to my reminders and press print or send all, it just sits there is does nothing. I assume its having a problem with open office, im running v4.1.1, the processes show its launching soffice.bin and soffice.exe but nothing happens.
from the command prompt i can launcher swriter and soffice as well and there dont seem to be any errors generating.
any ideas?
Re: printing reminders
OpenOffice is used to print documents that have .doc or .odt templates, and also to generate PDFs from these.
If you create a patient Letter in Patients -> Medical Records -> Documents using a .doc or .odt template (e.g. Desexing Certificate) can you:
1. Print -> Preview it (this generates a PDF)?
2. Print it?
If not, kill existing soffice processes and try again.
Also check the Printers tab of your reminder Templates, to ensure they are being sent where you expect them.
-Tim
Re: printing reminders
if i preview the medical records its instant, click ok to print, just sits there on the please wait...
Re: printing reminders
The connection to OpenOffice is synchronous, so it sounds like it is hanging waiting for the print job to complete.
Try selecting a different printer. If you don't have one, and are on Windows, try printing to XPS Document Writer. If memory serves, this will pop up a dialog to select the file to write to.
If that works, try googling your printer model with OpenOffice. You may need to update drivers or change the driver settings.
-Tim
Re: printing reminders
Ive setup a copy of the vet at home to have a look and i only an xps doc printer and still no good so must be something im configuring. Is openoffice v4 ok? And under the templates and work locations do i need to define printers? Documentaion reads like only have to do that if im using custom or multiple vatiations of a report
Re: printing reminders
You should be able to select a patient Letter or Form, click Print, and then select the target Printer in the print dialog.
If you select XPS Document Writer and it hangs, make sure XPS "Save the file as" popup window isn't hidden behind other windows.
Another thing to check is to ensure that you can start and print from OpenOffice when it is running under the same account that is running Tomcat.
-Tim
Re: printing reminders
No popups to save are appearing, i can print fine in openoffice. I dont think its launching the soffice.exe i think it might have been but doesnt look like it is now. Ive rebooted and still not launching. Might try openoffice v3
i can open soffice and swriter from cmd line too so PATH settings appear to be correct
Re: printing reminders
OpenOffice 4.1.1 works for me on Windows 7 x64.
You'll get an error if OpenVPMS cannot start OpenOffice. There will also be an error logged to <TOMCAT_HOME>/logs/openvpms-full.log.
You can also enable debugging by uncommenting the following from log4j.properties:
These only take effect when you restart Tomcat.
If you do see logs like "OpenOffice not responding", or "Failed to connect after 10 attempts" or "Connection not responding":
Re: printing reminders
you keep coming up with all these hidden built in debug systems i love it lol. I got it working on my data just confirming in the next couple of days on the vets end. Thanks for the help.
Re: printing reminders
still no good. I managed to get the system to print the first time and it took quite a while and only some of them printed when using 'Send All'. Others got the message failed to start OpenOffice. I can print medical history no problems everytime as well.
I ran with the log4 debug and got the following:
08 Jul 2015 18:21:51,054 DEBUG OOBootstrapService,http-nio-8080-exec-10:149 - Attempting to start soffice using: soffice.exe -headless -accept=socket,host=localhost,port=8100;urp;
08 Jul 2015 18:21:51,054 DEBUG OOBootstrapService,http-nio-8080-exec-10:149 - Attempting to start soffice using: soffice.exe -headless -accept=socket,host=localhost,port=8100;urp;
08 Jul 2015 18:21:51,063 DEBUG OOBootstrapService,http-nio-8080-exec-10:177 - Attempting to connect, attempt 1 of 10
08 Jul 2015 18:21:51,063 DEBUG OOBootstrapService,http-nio-8080-exec-10:177 - Attempting to connect, attempt 1 of 10
08 Jul 2015 18:21:53,069 DEBUG OOBootstrapService,http-nio-8080-exec-10:344 - Process terminated with exit code=0
08 Jul 2015 18:21:53,069 DEBUG OOBootstrapService,http-nio-8080-exec-10:344 - Process terminated with exit code=0
08 Jul 2015 18:22:16,164 ERROR ErrorHelper,http-nio-8080-exec-10:147 - Failed to start OpenOffice service: failed to connect after 10 attempts
org.openvpms.report.openoffice.OpenOfficeException: Failed to start OpenOffice service: failed to connect after 10 attempts
at org.openvpms.report.openoffice.OOBootstrapService.start(OOBootstrapService.java:191)
.....
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Re: printing reminders
When you print medical history (i.e. from Patients -> Medical Records -> Summary), it doesn't use OpenOffice, as the template is a JasperReport. These are handled within OpenVPMS.
Any .odt, or .doc template is handed off to OpenOffice for both printing and conversion to PDF.
You don't mention how you are running OpenVPMS up, but soffice.exe needs to be in the path of the user that is running Tomcat. If you can't start it up from the command line as that user, then OpenVPMS won't be able to start it either.
Make sure there are no other processes listening on port 8100, as that will prevent it from servicing requests. E.g.:
> netstat -a |findstr 8100
Re: printing reminders
Ok ill double check. But yes command lines work, it actually prints on and off the reminders sometimes and when there a few it might print 1 out of 10. So openoffice must be working to some degree.
Re: printing reminders
hi
nothing else running on that port, i can login in as the openvpms user and runn soffice and swriter, etc.. from cmd line no problems. Any other ideas?
Re: printing reminders
Re: printing reminders
hi
logged in as openvpms user, can print documents using openoffice from command line no problems. No antivirus installed and using version 1.7.1 no custom builds.
Have dummy computer running their data again and i get same issue, it launches soffice.exe and .bin but doesnt do anything. Can it be data related? Is there a sample dataset i can setup to try that.
I have found that i can preview a reminder to be printed but cannot print, if i preview the soffice.exe and bin launch for the user openvpms so it seems its setup correctly for that user. Now i would be fine with using the preview option but it means printing 1 at a time which is a pain.
Re: printing reminders
[I pushed this back out - the reply size box was getting a bit small.]
Q1. "..as user openvpms" What user are you running Tomcat under - remember it is Tomcat that is functionally invoking open office.
Q2. [I am assuming that you are running on a *nix system] - are the permissions set correctly? - see http://www.openvpms.org/documentation/install-openoffice-headless-servic...
If you are running on a windows system, then again you need to be careful about the user account used by Tomcat. In 1.7 (where the OO launch command in OpenVPMS did not correctly specify headless operation) it was necessary to manually start OO once in the account that Tomcat uses so that you could answer the questions about user name and initials.
I would be tempted to put aside the printing reminders problem for the moment and see what happens printing a patient letter or form that is based on an odt template. This is simpler that the reminders setup.
Regards, Tim G
Re: printing reminders
this is a windows system, the user for the tomcat is openvpms. I have followed these instructions through a few times:
http://www.openvpms.org/documentation/installing-openvpms-windows-7-comp...
ill have a look at printing a patient letter and see what happens.
Re: printing reminders
This may sound a really stupid pair of questions:
a) does the openvpms user have write access to the Tomcat folder (or at least its logs folder)?
b) if so is there anything relevant in the openvpms logs?
[I have been playing in my 1.7.1 system - which runs Tomcat under the openvpms user - and trying to duplicate your problem.]
Regards, Tim G
Re: printing reminders
ok so got closer, i found that open office hasnt always been listening on port 8100, if i run netstat nothing is listening on that port. So if i run the command line
then press print, it prints a report now. yah. Now if i list all the reminders i want on the screen then press print, it is only ever printing one of the reminders is that correct, event if i select them all in the list?
also is there a way to make this more permanent or run openoffice as a service?
Now also if i send all the reminders to the XPS document printer, it completes all fine and says that they have printed but i dont get prompted to save the file and now all the reminder dates have been pushed forward. Any reason why?
Re: printing reminders
OpenVPMS will start OpenOffice on the first request to print or convert to PDF, if it is not already running. It will also periodically restart OpenOffice (every 1000 accesses by default). This is to clean up any memory leak issues in OpenOffice.
The fact that it doesn't work for you out of the box suggests something is amiss with your environment. You could try resetting your OpenOffice profile.
If you want to start OpenOffice at boot, you could add the above soffice command to your Startup menu.
For the behaviour of Print, Send All and Report, see the 1.7 or 1.8 documentation.
The reminder dates will be pushed forward if they are successfully processed. I've just done a small test using Send All with the XPS printer, and for each reminder it popped up a print dialog. If you are not getting this dialog check:
Re: printing reminders
i cant reply