Will cause the document to print when it is opened.
Fix for space or blank text when calling .text
Very cool, but I hesitate to pull in something that won't work on all PDF viewers (e.g. Apple Preview and others don't support embedded JS). I have used OpenAction in the past to automatically print a document when it is opened, but I don't really want to include it in PDFKit itself because, once again, not all PDF viewers support OpenAction. In my case, I just made a separate utility function:
autoprint = (doc) ->
doc.store.root.data.OpenAction = doc.ref
I'll leave this open for others to comment on, but I think it may be better to keep things like this as separate extension libraries. Let me know what you think.
I can see your point -- However, I'm pretty sure that the pdf reader on my kids (old) ereader doesn't have font support and crashes with large images -- but I wouldn't want you to pull the support because some of the pdf readers don't support it. I tend to think it should be included, but I'm not at all opposed to another add-on helper library.