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

generate pdf in landscape mode? #52

Open
Santhz77 opened this issue Oct 27, 2017 · 3 comments
Open

generate pdf in landscape mode? #52

Santhz77 opened this issue Oct 27, 2017 · 3 comments

Comments

@Santhz77
Copy link

I tried providing page width in css, however it didn't work.
Is it possible to generate pdf in landscape mode ?

@davidfraga
Copy link

on get_context_data method,

return super(PDFTemplateViewClass, self).get_context_data(pagesize="A4 landscape",**kwargs)

@pmunozroa
Copy link

on your template add this
{% block layout_style %}

<style> @page { size: letter landscape; margin: 2cm; } </style>

{% endblock %}

@Santhz77
Copy link
Author

Thanks for the support 👍🏽

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

No branches or pull requests

3 participants