-
Notifications
You must be signed in to change notification settings - Fork 138
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
How can add style?? #49
Comments
If you are using a template to render your PDF, you have to put your styles in your template after the tag. See the doc here. |
Hello, I did that, but I can't see some styles, for example if I added background, I can't see that background on pdf file |
Hey Brayan, |
sure,
some content here with background
{% endblock %}
{% block extra_style %} <style> #content{ background: red; width: 200px; height: 200px; } </style>{% endblock %} I tried with this beta code, but I never see changes on pdf |
It will be better with |
it's work, but some styles doesn't work for example, margin and padding |
I just have tested on my code with a |
How can call images on my pdf file? That happened when I try to call images from static Invalid block tag on line 106: 'static', expected 'endblock'. Did you forget to register or load this tag? |
Can you paste your code? You can follow my thread about displaying images #48 |
<img src="{% static "images/img.jpg" %}" alt=""> |
Did you try: template.html ...assuming you declared a STATIC_ROOT |
Yeah, I declared, but with static doesn't work, but if I put that on base template, work, but if I put it inside block does't work, so I decided put on base template and worked it. |
You're lucky because I can't display images at all... |
amm I also ran |
Is it possible put image like background? I tried but I got an error when I did it. Ty |
Brayan, how can you put on the base template? I'm trying to put a background-image but I think the url address is wrong |
I added some styles, but I cant' see on pdf
The text was updated successfully, but these errors were encountered: