Giter Club home page Giter Club logo

Comments (5)

gmischler avatar gmischler commented on August 17, 2024 1

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.

Lucas-C avatar Lucas-C commented on August 17, 2024

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.

xbln avatar xbln commented on August 17, 2024

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>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dolore magna aliqua. Ut enim ad minim veniam</li>
</ol>
""")
pdf.output("html.pdf")

Output is:image

from fpdf2.

gmischler avatar gmischler commented on August 17, 2024

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.

gmischler avatar gmischler commented on August 17, 2024

Fixed in #1170.

from fpdf2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.