[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] Problem in 0.9.4 printing medication list on Mac

From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] Problem in 0.9.4 printing medication list on Mac
Date: Tue, 10 May 2011 14:40:48 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, May 09, 2011 at 04:11:35PM -0700, Jim Busser wrote:

> For reasons I am not sure of (which included a reboot of my laptop and trying 
> Kirk) the LaTex to PDF now seems to work.
> What I notice is that the .pdf which supposedly written
>       Output written on gm-L-Template-DIsc_p-instance.pdf (1 page, 167323 
> bytes). 

That's a message put out by pdflatex.

> cannot be found,

Likely because shortly after pdflatex sez the above GNUmed
moves that PDF up a level in the directory hierarchy.

> except that it is only testable after a PDF named
> "Untitled" and containing the output has opened within the
> Mac "Preview" application.

I'm not sure I understand this fully.

Are you saying that the Mac "Preview" does open but shows -
in the title - the document name "Untitled" but - in the
viewport area does display the PDF you expect to see ?

This is printing the medication list from 0.9.4, right ?

You may want to rig the gm-print_doc section:

if [ "${TYPE}" = "medication_list" ]; then
        rm -f ${FILES}
        exit ${EXIT_CODE}

to read:

if [ "${TYPE}" = "medication_list" ]; then
        echo ${CALL_PRINTER_MANAGER}
        #rm -f ${FILES}
        exit ${EXIT_CODE}

and observe what's echoed to the shell.

Also, this disables removing the PDF after printing - which
would explain the behaviour if the "Preview" app is
non-modal, that is, returns control to GNUmed immediately
while still displaying the file rather than blocking GNUmed
until you exit "Preview".

The drawback is that now GNUmed will probably try to import
the PDF after printing which is thought undesirable for
medication list printouts. But this would be something we'd
deal with at the GNUmed level should that be the stumbling
block for printing on Mac.

> Therefore I wonder if the following explanation is correct:
> - the script writes the PDF
> - the PDF is passed to [printer or application] --> which accounts for an 
> untitled PDF "Untitled" opening in my Preview app
> - the written-to-disk PDF is immediately deleted (which is why I cannot find 
> it)

Yep, but that sequence only explains what happens if
"Preview" *immediately* "returns" even while still
displaying the PDF.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

[Prev in Thread] Current Thread [Next in Thread]