Thanks for writing this, you've saved me from a lot of hurt. I suspected that PDF generation code would be simple on OS X if someone who knew their way around. I used to, sniff...
I did 3 things:
1) I needed an ability to specify custom pages. I implemented it as a page size custom:WxH
2) I needed 0-width margins. You were using 0 as "do not set margins" flag. I changed it so that :auto means "no margins".
3) Bugfix: margins on singlePagePdf now work. width & height were 2x bigger, x & y were also off.
Looks good! Thanks for the bugfix and the addition of custom paper sizes. I have just merged your pull request and will release an updated version of wkpdf right now.
Thanks for writing this, you've saved me from a lot of hurt. I suspected that PDF generation code would be simple on OS X if someone who knew their way around. I used to, sniff...
I did 3 things: 1) I needed an ability to specify custom pages. I implemented it as a page size custom:WxH 2) I needed 0-width margins. You were using 0 as "do not set margins" flag. I changed it so that :auto means "no margins". 3) Bugfix: margins on singlePagePdf now work. width & height were 2x bigger, x & y were also off.