Printing with python
Grzegorz Makarewicz
mak at trisoft.com.pl
Mon Sep 30 17:46:42 EDT 2002
Florian Schulze wrote:
> Hi!
>
> I would like to know what solutions exist for printing (on paper) with
> python. Preferable would be a crossplatform approach, but only for Windows
> would be good enough. I also thought about using the reportlab pdf lib and
> using the free Acrobat Reader for preview and printing. It has a nice API
> and I don't think it will be too hard to send it to Acrobat Reader.
>
> Any suggestions or thoughts about this?
>
> Regards,
> Florian Schulze
>
>
>
try DDE connection to AR:
import os
import win32ui
import dde
fname=os.path.join(os.getcwd(),'demo.pdf')
server = dde.CreateServer()
server.Create("PyAcroview")
conversation = dde.CreateConversation(server)
conversation.ConnectTo("acroview", "control")
conversation.Exec("[DocOpen(%s)]" %fname)
--
You can print, select pages and documents, ...
mak
More information about the Python-list
mailing list