Re: COM extension
| From: | Alain Samoun | Date: | Wed, 02 Aug 2000 21:41:29 +0000 |
| Subject: | Re: COM extension | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1497@lists.php.net to get a copy of this message | ||
Hi Urs:
Actually, I found out how to get the OCX list from the registry (Win98
version):
Open the folder: HKEY_CLASSES_ROOT
Scan down until the end of the extensions (.*) list.
Then you will be able to see the COM names to use: Look for folders with
CLSID sub-folder.
For the pdf distiller, this is what I use in my machine
(Win98-Apache-PHP4.02 Dev):
$pdf = new COM ("PdfDistiller.PdfDistiller.1"); # Instantiate the distiller
$pdf->FileToPDF ("$Pathname.ps","$Pathname.pdf","$Config");
This code will produce a pdf file from a ps file, the Pathname.pdf is
optional, (Default is the same name as ps file with the pdf extension), as
well as the $Config: File name of the distiller configuration to use. If you
use the defaults, replace the $Pathname.pdf and $Config with empty strings.
The PHP COM extension is a powerful tool in the windows environment, it's
also very easy to use once you know the COM names, methods and proprieties.
Alain