Jump to content

How do i make entire browser output to image?


penguine

Recommended Posts

You'll need to buy some software to do that, or write your own HTML rendering engine. You need to render the page and output the rendered code as an image. There's not a PHP command to render a page, PHP does not need an HTML rendering engine.

Link to comment
Share on other sites

If you want to automate this process by including it in a PHP script (no JavaScript way, sorry), you'll need to find an application that has either a PHP API, or at least a COM server.One application I know of that has a COM server is SnagIt, but I just tried using it, and failed miserably. I'm not sure if there's a bug in the COM server, or with PHP's handling of it (the code I have was just "$snagit = new COM('SnagIt.ImageCapture');" and the output - some werid text).If you can find any other screen capturing program that has a working COM API, please let us (or at least me) know.

Link to comment
Share on other sites

If you're seeing text it's probably a mime type issue, make sure the correct headers are being sent.
I'm only creating the COM component. Nothing more, and nothing less. The entire code I have is:
<?php$snagit = new COM('SnagIt.ImageCapture');?>

As you see, I never even echo anything. In addition, I tryed turning it into

<?php$snagit = new COM('SnagIt.ImageCapture');echo 'Yeah!';?>

Only to get a slightly longer werid text. Never in the source (especially never at the end) I saw "Yeah!". If it was a MIME type issue, I think I should have at least saw THAT. Besides, this is a COM constructor, not an image. It is supposed to return an object I can then set properties on, and initiate methods from.(My setup is Windows XP SP2 with all required and optional updates to date, Apache 2.2.8, PHP 5.2.4 and SnagIt 8.2.0)

Link to comment
Share on other sites

Yeah I'm not sure, I've never used SnagIt before. Surely something like this would be a FAQ or something.
Not in SnagIt's one, that's for certain. They never mention PHP at all. They show how to do things in C++/ATL, C#, VB, VB.NET and VBScript. Haven't tried using the COM API in those languages yet, but I have used PHP's COM class before (for other COM components), so I know that part should be OK.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...