You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2023. It is now read-only.
I want to screen capture a website page on one specified server in the cluster , and the website is not the default website on the server. So I should send the HTTP request with the HOST . I modified the /example/rasterize.js, like this:
/*****************************************************_/
var page = require('webpage').create(),
system = require('system'),
address, output, /_size/host;
It now can screen capture the website page on the specified server. But it only capture the base page of the website. If the meta in the page is not on this server, it can not be captured.
So how can I capture the whole page with the "HOST:www.mywebsite.com" in the request ?
The text was updated successfully, but these errors were encountered:
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
I want to screen capture a website page on one specified server in the cluster , and the website is not the default website on the server. So I should send the HTTP request with the HOST . I modified the /example/rasterize.js, like this:
/*****************************************************_/
var page = require('webpage').create(),
system = require('system'),
address, output, /_size/host;
if (system.args.length < 3 || system.args.length > 5) {
console.log('Usage: rasterize.js URL filename [paperwidth_paperheight|paperformat] [zoom]');
console.log(' paper (pdf output) examples: "5in_7.5in", "10cm_20cm", "A4", "Letter"');
phantom.exit(1);
} else {
address = system.args[1];
output = system.args[2];
host = system.args[3]
page.viewportSize = { width: 600, height: 600 };
/_
if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") {
size = system.args[3].split('');
page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' }
: { format: system.args[3], orientation: 'portrait', margin: '1cm' };
}
if (system.args.length > 4) {
page.zoomFactor = system.args[4];
}
*/
page.customHeader = {
'HOST':host
}
page.open(address, function (status) {
if (status !== 'success') {
console.log('Unable to load the address!');
phantom.exit();
} else {
window.setTimeout(function () {
page.render(output);
phantom.exit();
}, 200);
}
});
}
/******************************************************/
I use “ phantomjs rasterize.js http://192.168.*.*/index.aspx index.jpg www.mywebsite.com " to capture screen.
It now can screen capture the website page on the specified server. But it only capture the base page of the website. If the meta in the page is not on this server, it can not be captured.
So how can I capture the whole page with the "HOST:www.mywebsite.com" in the request ?
The text was updated successfully, but these errors were encountered: