I'm trying to get screenshot one of me page site in pdf file. I'm using expressjs on a server side:
var phantomProxy = require('phantom-proxy');
app.get('/print', function (req, res, next) {
phantomProxy.create({}, function (proxy) {
var page = proxy.page;
page.open('http://127.0.0.1:3128/testpageforprint', function (result) {
setTimeout(function () {
proxy.page.render('testpageforprint.pdf', function (result) {
proxy.end(function () {
res.json(200);
});
});
}, 1000);
});
});
});
But unfortunatelly the pdf file creates partially, and I'm getting not all content and also I'm getting the following error message:
Error: cannot call function of deleted QObject; url::/modules/webpage.js; line:377
Can you help what's my problem?
P.S: Page that I want to convert to pdf has many css and js files (if it does sense for resolving the issue)
I'm trying to get screenshot one of me page site in pdf file. I'm using expressjs on a server side:
var phantomProxy = require('phantom-proxy');
But unfortunatelly the pdf file creates partially, and I'm getting not all content and also I'm getting the following error message:
Can you help what's my problem?
P.S: Page that I want to convert to pdf has many css and js files (if it does sense for resolving the issue)