gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] write documents


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] write documents
Date: Wed, 27 Apr 2011 20:04:46 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38.2-19-default; KDE/4.6.0; i686; ; )

Am Mittwoch, 27. April 2011, 18:31:09 schrieb Karsten Hilbert:
> On Mon, Apr 25, 2011 at 10:14:53PM +0200, Hilbert, Sebastian wrote:
> > > Given that it should be possible to create a small Python
> > > 
> > > application "print.py" like this:
> > >   import os
> > >   import os.path
> > >   
> > >   the_file = os.path.normpath(the_file)
> > >   
> > >   try:
> > >           os.startfile(the_file, 'print')
> > >   
> > >   except AttributeError:
> > >           print "not on Windows"
> > > 
> > > which supposedly would invoke the application Windows is
> > > configured to print a certain file type with.
> > > 
> > > Please test this and report back. If that works I'll include
> > > the above with GNUmed directly.
> > 
> > It does open the associated application and tries to print the file. So
> > this is one way to do it.
> 
> Good to know. I added this method to GNUmed-next. Hence
> we've now got two methods to print files (pipe into
> os.startfile, pipe to gm-print_doc). If no preferred print
> API is configured GNUmed will try both.
> 
> > Still looking into PrintFile since it can watch for files appearing in a
> > directory and print these.
> 
> Tell me when you know the details so I can add it.
> 
Looks like it can only handle txt , eps files and prn files.

This means one would have to convert the pdf to postscript. But even then this 
could only be piped to poscript capable printers.

So I see no way to make use of it.

The alternative would be to write a thin wrapper in QT as QT supports the 
windows printing system. The QT program (either c++ or pyQT) could then be 
compiled into a standalone exe which would be called by gm-print_doc.bat with 
command line arguments.

Sebastian



reply via email to

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