Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configuring a front and back cover page for PDFs #4

Merged
merged 6 commits into from
Sep 15, 2018

Conversation

abrom
Copy link
Contributor

@abrom abrom commented Sep 15, 2018

Because Puppeteer doesn't allow for the header/footer to be configured 'per page' on a programatic basis, instead we'll try overcome this by allowing the response PDF to have a specified page (or pages) added to the front and back.

The specified path will be requested via the middleware (to the downstream app) using the same request method/body as the original request, but will override the path/params with those specified in the front_cover_path and back_cover_path parameters.

These parameters can be configured in the global options or via meta tags in the original downstream response.

Simplify utils deep_merge! (not using block form)
Add middleware specs to test cover page request/merging
Add utils specs for new helper methods
Add accessor specs for grover cover page configs
Updated README with info on how to use cover pages
@abrom abrom merged commit 1a93a68 into master Sep 15, 2018
@abrom abrom deleted the add-front-back-cover-support branch September 15, 2018 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant