Page 1 of 1

Destroy COM resource

Posted: Wed Jun 06, 2007 3:08 pm
by pilot
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I purchased a program that converts html files to pdf on a Win2000 server. It works great, but the page hangs. I think the object isn't relinquishing control. The code is:

Code: Select all

$filename = "C:\\inetpub\wwwroot\TestSite\test.html;
$objPDF = new COM("HTMLConverter.HTMLConverterX");
$strPDFFile = "C:\\inetpub\wwwroot\TestSite\FirstPDF.pdf";
$strHTMLFile=$filename;
$stroptions = "-cpdf";
$objPDF->Convert($strHTMLFile,$strPDFFile,$stroptions);
Nothing after this last line executes, but it does create a new pdf file called "FirstPDF.pdf" just fine. Any idea how to wrestle control back from $objPDF? I've tried unset(), but I don't believe it's being executed.

TIA


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Jun 06, 2007 4:31 pm
by Jenk
Read the rules.

Posted: Wed Jun 06, 2007 5:40 pm
by RobertGonzalez
Moved to PHP - Code. General discussion is not for asking programming related quesitons.