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 possibility to set the pdf title via build arguments. #48

Merged
merged 1 commit into from Feb 22, 2017

Conversation

phgross
Copy link
Member

@phgross phgross commented Feb 22, 2017

if not filename:
filename = self.context.id

filename = '{}.{}'.format(filename, extension)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nbeware, you'll run into an UnicodeError here if you supply unicode filename with umlauts for example.

Now i'm not sure how and if and which browsers support non ascii filenames, so i'd investigate that and cleary document what filename should be, and also add (if possible) a test with non-ascii characters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update, there is a filename* filename parameter for the content disposition:

https://tools.ietf.org/html/rfc6266#appendix-D and
https://tools.ietf.org/html/rfc6266#section-4.3

@jone do we have any experience with that?

Copy link
Member

@jone jone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🎉

@phgross
Copy link
Member Author

phgross commented Feb 22, 2017

@deiferni @jone updated ...

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.

None yet

3 participants