Selector for capture is ignored if output file is PDF #76

leplatrem opened this Issue Mar 26, 2012 · 3 comments

2 participants


Using casperjs 0.6.3 and phantomjs 1.5.0

And this snippet :

var casper = require("casper").create(),
    address = casper.cli.args[0],
    selector = casper.cli.args[1],
    output = casper.cli.args[2];

casper.start(address, function() {
    this.captureSelector(output + '.png', selector);
    this.captureSelector(output + '.pdf', selector);

Since PhantomJS does not have any selector parameter for render(), I thought it was more likely a casperjs bug...

CasperJS member

Looks like a phantomjs bug… Casper.capture() does nothing much else than setting a custom page.clipRect property matching the coordinates of the matching DOM element, then call a plain silly render() on the page…

Could you eventually try to reproduce the bug with a pure phantomjs script? and if so, file an issue on the phantomjs bugtracker?



Yep thanks ! I could reproduce, issue submitted.

CasperJS member

I'm closing this one as it's not related to casperjs :)

@n1k0 n1k0 closed this Mar 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment