pdfkit/pdfkit — pull request #192 by nwiebe (2013-08-21 21:40:16+00:00)
Title: Allow controllers to set PDFKit-save-pdf header to cause rendered pdf to be saved in the filesystem

In addition to returning the rendered .pdf to the client, I want to be able to save the generated pdf for later use.

The example controller code below will save the pdf returned to the client in somefile.pdf.

```ruby
class SomeController < ApplicationController
def create
#now the same pdf returned to client will be saved in somefile.pdf
response.headers['PDFKit-save-pdf'] = "somefile.pdf"
end
end
```

No tests included because I had trouble setting the PDFKit-save-pdf header in the tests. I tried copying / modifying the ```headers``` hash defined in ```def mock_app``` of ```spec/middleware_spec.rb``` but that didn't set the headers in the test requests.