Comments (5)
Welcome to fpdf2, @xbln !
As requested in the bug report template (that you summarily deleted instead of using it), please show us a minimal code example that produces the described result.
The explanation you gave us does not make it possible to reproduce the effect you're seeing.
And if we can't reproduce an error, then we can't fix it.
from fpdf2.
I agree with @gmischler, we need some SHORT code snippet to be able to help you 🙂
As mentioned in the bug report template that you must have seen, this page provides good explanation on how to craft a good minimal, reproducible example: https://stackoverflow.com/help/minimal-reproducible-example
from fpdf2.
Sorry, here is the code:
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.write_html("""
<p>Is:</p>
<ul>
<li>Unordered list</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li>
</ul>
<ol>
<li>Ordered list</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li>
</ol>
Should be:
<ul>
<li>Ordered list</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et<br>
dolore magna aliqua. Ut enim ad minim veniam</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et<br>
dolore magna aliqua. Ut enim ad minim veniam</li>
</ul>
<ol>
<li>Ordered list</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et<br>
dolore magna aliqua. Ut enim ad minim veniam</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et<br>
dolore magna aliqua. Ut enim ad minim veniam</li>
</ol>
""")
pdf.output("html.pdf")
from fpdf2.
A few days ago #1170 has been merged, which fixes this (already reported in #1073).
Most likely your test with 2.7.10 (current HEAD) was just before that.
Can you try that again please?
from fpdf2.
Fixed in #1170.
from fpdf2.
Related Issues (20)
- OSS-Fuzz Integration HOT 8
- multipage table using fpdf HOT 2
- Get rid of FPDF class/instance attributes getting passed to HTML2PDF. HOT 5
- Proposal for Generic Robust Substitution Mechanism HOT 1
- `local_context()` blocks appear to "leak" into one another HOT 6
- Line spacing for a long line that is displayed in several lines. HOT 5
- Text columns issue with top margin HOT 1
- Markdown not escaping MD special characters HOT 3
- Solution needed: Typographical Margins, Line Height, Leading HOT 1
- write_html() ignores font changes HOT 4
- call .write_html in footer cause RecursionError HOT 1
- pdf.font_style = "B" and pdf.emphasis = "BOLD" should behave the same way as pdf.set_font(style="B") HOT 1
- Lowercase hex (e.g. #fff) do not convert properly HOT 5
- Stampapdf HOT 3
- FPDF.unbreakable() drops table instead of adding page break beforehand HOT 1
- Determine string width before detecting the language of the string and applying this setting to the font shape engine leads to wrong get_string_width() HOT 2
- Escape character escaping multiple consecutive markdown characters HOT 3
- FlexTemplate multiline: It looks like that it puts space/newline between lines. Expected behavior? HOT 3
- Problem setting fallback font HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fpdf2.