RE: Adobe COM with Python

2005-08-19 Thread Tim Golden
[Andy W]
| I wanting to print the PDF to a printer which is set to print 
| to file, 
| so efectively i end up with a ps file.
| 
| so 1 pdf becomes 1 ps file

It't not quite clear to me what you *want* to do as opposed
to what actually happens when you try. If I understand, you
have a PDF file, and you *want* to output it as a Postscript
file. (And you want to automate that arrangement).

If that's the case, I can think of two approaches, neither using
COM -- which may be a valid third approach. The first is to use
the possibly deprecated Acrobat Reader command-line switches to
print a file and pass a file name. There's some information here:

http://www.stillhq.com/ctpfaq/2002/03/c45.html#AEN103

and if you want to get hold of an older version of Acrobat,
try oldversion.com

The second is to use ghostscript from

http://www.cs.wisc.edu/~ghost/

to generate a ps file from a pdf file.

Hope that helps.
TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adobe COM with Python

2005-08-19 Thread Andy W
I wanting to print the PDF to a printer which is set to print to file, 
so efectively i end up with a ps file.

so 1 pdf becomes 1 ps file

Tim Golden wrote:
> [Andy W]
> 
> | What i want to do is use, python COM to fireup Adobe and 
> | print the pdf 
> | file to a printer.
> 
> If that's all you want to do, have a look at this:
> 
> http://timgolden.me.uk/python/win32_how_do_i/print.html
> 
> Or you could try for a Ghostscript solution.
> 
> (Additionally, I seem to remember that the Acrobat COM object is
> really only designed to work in Internet Explorer. That was a version
> or so ago -- of both -- so I may be off beam).
> 
> TJG
> 
> 
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> 
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Adobe COM with Python

2005-08-19 Thread Tim Golden
[Andy W]

| What i want to do is use, python COM to fireup Adobe and 
| print the pdf 
| file to a printer.

If that's all you want to do, have a look at this:

http://timgolden.me.uk/python/win32_how_do_i/print.html

Or you could try for a Ghostscript solution.

(Additionally, I seem to remember that the Acrobat COM object is
really only designed to work in Internet Explorer. That was a version
or so ago -- of both -- so I may be off beam).

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adobe COM with Python

2005-08-19 Thread Andy W
What i want to do is use, python COM to fireup Adobe and print the pdf 
file to a printer.

import win32com.client
import pythoncom

pythoncom.CoInitializeEx(pythoncom.COINIT_APARTMENTTHREADED)
acro = win32com.client.DispatchEx('PDF.PdfCtrl.1')


The above does not work, Do i need to install the SDK as well ?

I'm new to this COM stuff as you can guess.

Benjamin Niemann wrote:
> Andy W wrote:
> 
> 
>>I'm wanting to automate Adove Acrobat Reader using Com thru Python and
>>win32com, but i can't find any documentation for the Adobe stuff? Has
>>anyone done anything with Acrobat COM ?
>>
>>I've searched Google groups and the web but am unable to find anything.
> 
> 
> I have not hacked Acrobat yet, but done a bit with InDesign - Adobe's
> documentation is less than perfect, but still pretty good. You might look
> at
> 
> - in InDesign I could easily map the methods and attributes from the JS
> documentation to COM calls (the JS members start with lowercase - e.g.
> 'properties' -, while COM need uppercase - 'Properties').
> 
> 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Adobe COM with Python

2005-08-19 Thread Benjamin Niemann
Andy W wrote:

> I'm wanting to automate Adove Acrobat Reader using Com thru Python and
> win32com, but i can't find any documentation for the Adobe stuff? Has
> anyone done anything with Acrobat COM ?
> 
> I've searched Google groups and the web but am unable to find anything.

I have not hacked Acrobat yet, but done a bit with InDesign - Adobe's
documentation is less than perfect, but still pretty good. You might look
at

- in InDesign I could easily map the methods and attributes from the JS
documentation to COM calls (the JS members start with lowercase - e.g.
'properties' -, while COM need uppercase - 'Properties').


-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
-- 
http://mail.python.org/mailman/listinfo/python-list