plessl / wkpdf

A command line HTML to PDF converter for Mac OS X
http://plessl.github.com/wkpdf
MIT License
184 stars 24 forks source link

Custom page sizes, and a couple of bug fixes #18

Closed atotic closed 13 years ago

atotic commented 13 years ago

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.

plessl commented 13 years ago

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.