On Mar 3, 2014, at 1:14 PM, Andreas Holtz <a.ho...@gmx.net> wrote:
> 
> 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 doubt that.  PDFs contain PostScript, but there’s more to it than just 
PostScript.  What printer, exactly are you talking about?


> I played around with
>     win32api.ShellExecute(0, "print", pdf, None, ".", 0)
> but I am missing the possibilities to change layout and paper size.

That function will run whatever program is registered to render PDF files, 
which is usually the Acrobat Reader, and asks that it to print without 
presenting a dialog


> Is there really no way to print PDFs with Python setting whatever print 
> settings I want?
> I thought Python can do anything... :’-(

Python can do anything, but Python is not always the EASIEST way to do 
something.  In this case, you have encountered limitations of the Win32 API, 
not of Python.  The Acrobat Reader can be controlled via COM to set layout and 
paper size, but I want to find out what your printer is before going any deeper.
-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to