Destroy COM resource

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pilot
Forum Newbie
Posts: 1
Joined: Wed Jun 06, 2007 2:33 pm

Destroy COM resource

Post 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]
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Read the rules.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Moved to PHP - Code. General discussion is not for asking programming related quesitons.
Post Reply