I tried to make this class independent of Yii. It is so simple that i don’t think, we need another wrapper around it to use it in Yii. Actually i’m already using it in my Yii projects. In my opinion not every third party library needs to be wrapped up in an extension.
Or let me ask the other way round: What should a wrapper class add what the original class doesn’t already provide?
From what I remember from when I looked at WkHtmlToPdf a few years ago, there was a way to set headers/footers. Maybe we could set that on an app basis in an extension?
Good point on the library stuff. A counter point though is that people who don’t know that much about PDF creation from HTML may look through the extension section and never end up using your gem, because they don’t find it. Wouldn’t it help raise the visibility of your library (and thus help people more often) to make it an extension?
// Then either set it for every page:
// Or only for a specific page:
See wkhtmltopdf -H for more options.
I agree that an extension might help to increase popularity. I’m just not sure if this really makes sense: This class is not related to Yii at all. It’s rather a standalone class which you can easily integrate into Yii. And for now the home is the github page. I don’t want to maintain two downloads for this class. But let me think about it, maybe i change my mind …
What a wrapper class could do: Add getter/setter support through CComponent and wrap up errors in exceptions. Let’s see.