Page 2 of 2

Re: RevBrowser - snapshots: not good.

Posted: Sun Dec 05, 2010 12:08 pm
by Mark
Hello,

You can use command line utilities to create snapshots of websites.

Kind regards,

Mark

Re: RevBrowser - snapshots: not good.

Posted: Sun Dec 05, 2010 10:29 pm
by dcope
Mark wrote:Hello,

You can use command line utilities to create snapshots of websites.

Kind regards,

Mark
Hi Mark,

Do you have any recommended tools that run on the Mac? The tools would ideally be royalty free and re-distributable with an application.

Thanks, David.

Re: RevBrowser - snapshots: not good.

Posted: Sun Dec 05, 2010 11:15 pm
by Mark

Re: RevBrowser - snapshots: not good.

Posted: Mon Dec 06, 2010 11:04 am
by dcope
Mark wrote:David: http://qurl.tk/lf
Thanks for the link Mark. I wasn't being lazy :wink: - I had searched on this topic and found my results not to be suitable for various reasons (wrong platform, proprietary, GUI etc etc). There were a couple of results from your keywords which led me to two potential tools - webkit2png which uses PyObjC which is just a Python source script and looks interesting in terms of integration into a LiveCode app. The other is wkhtmltopdf which is quite a big (13Mb) download but includes a standalone webkit rendering engine, presumably the reason for the large download.

If anyone is interested here are the links to those tools:

http://www.paulhammond.org/webkit2png/
http://code.google.com/p/wkhtmltopdf/

Kind Regards, David.

Re: RevBrowser - snapshots: not good.

Posted: Thu Dec 16, 2010 8:31 pm
by qberty
For anyone still willing to do this without any 3rd party external applications, you could do it the long way and set your browser window to the formatted width and height of the actually content then import a snapshot of it followed by adjust it's size again. (You can get the full width and height of a site's page or certain content by using a small VBS script or an even simpler PHP script. It's a cumbersome method, but it works and doesn't require any dependencies outside of itself besides revBrowser.dll :D

Re: RevBrowser - snapshots: not good.

Posted: Thu Dec 16, 2010 8:59 pm
by Mark
Hi qberty,

Thanks, do you have any idea what the VBScript might be or how to do this on Mac?

Best regards,

Mark

Re: RevBrowser - snapshots: not good.

Posted: Fri Dec 24, 2010 5:13 am
by qberty
Mark wrote:Hi qberty,

Thanks, do you have any idea what the VBScript might be or how to do this on Mac?

Best regards,

Mark
Hey Mark,

You could do it the long way and resize the whole image frame to get the screenshot, but a better plan would be using a script. Now i'm not too privvy with VBScript but I can give you js that can be converted.

Code: Select all

<script type="text/javascript">
function doClick(){
var x, y, msg='';

// for all except Explorer
if (self.innerHeight) {
x = self.innerWidth;
y = self.innerHeight;
msg += 'self.innerHeight/Width: '
+ y + ', ' + x + 'px';

// Explorer 6 Strict Mode
} else if (document.documentElement
&& document.documentElement.clientHeight) {
x = document.documentElement.clientWidth;
y = document.documentElement.clientHeight;
msg += 'document.documentElement.clientHeight/Width: '
+ y + ', ' + x + 'px';

// other Explorers
} else if (document.body) {
x = document.body.clientWidth;
y = document.body.clientHeight;
msg += 'document.body.clientHeight/Width: '
+ y + ', ' + x + 'px';
}
alert(msg);
}
</script>
And easier one to read would look something simple like:

Code: Select all

	var scnWid,scnHei;
	if (self.innerHeight) // all except Explorer
	{
		scnWid = self.innerWidth;
		scnHei = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		scnWid = document.documentElement.clientWidth;
		scnHei = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		scnWid = document.body.clientWidth;
		scnHei = document.body.clientHeight;
	}