Hi Ryan,
Nils Dannemann
13

Hi Nils!

I’m glad you found the tut useful :)

Yes, a number of people have commented saying that window.open approach is problematic for a number of reasons. It doesn’t have support in Safari which is a pretty big deal. Is that what browser you’re using? There are ways to get around this (checking for the browser and using different code) so I haven’t yet updated the post. I thought I had made a note of that in the post but apparently I forgot to do it haha. I’ll have to add that in there! Thanks for the reminder!

Ya, you should be able to style the pdf however you like. Did you try playing around with the webshot margin? That may be your issue. The tut code has this:

var options = { 
“paperSize”: {
“format”: “Letter”,
“orientation”: “portrait”,
“margin”: “1cm” },
siteType: ‘html’
};

So the 1cm margin may be whats preventing your css from working. Try changing that to 0 and see if it fixes the problem.

You can definitely modify the approach for 1.3 by using 1.3 directly. The only problem with that at the moment is that the new Meteor build system is having issues with npm packages that contain binaries. I’ve had some deployment issues with webshot for this reason (Galaxy and Modulus). That said, if you are using mupx (Digital Ocean) you won’t have any trouble. I’m using webshot in a 1.3 app and am importing it straight from NPM and it works just fine with mupx and Digital Ocean.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.