[python-win32] Printing PDFs without external tools

Roger Upole rupole at hotmail.com
Wed Mar 5 21:24:37 CET 2014


You may be able to call win32print.SetPrinter to change the paper
orientation and size before calling ShellExecute.

    Roger

"Andreas Holtz" <A.Holtz at gmx.net> wrote in message news:5314F09B.20105 at gmx.net...
> Hi guys,
>
> I need want to print PDF files without the usage of tools like Adobe, Foxit, etc.
> THe printer does understand PDF files, but I have no idea how to do it.
> I played around with
>
> win32api.ShellExecute(0, "print", pdf, None, ".", 0)
>
> but I am missing the possibilities to change layout and paper size.
>
> I already checked out
> http://timgolden.me.uk/python/win32_how_do_i/print.html
>
> Is there really no way to print PDFs with Python setting whatever print settings I want?
> I thought Python can do anything... :'-(
>
> Thanks in advance
>
> Andreas 





More information about the python-win32 mailing list