Skip to content

Padding Applied on Each Page for Multi-Page Paragraphs #1395

@jasonfevangsafe

Description

@jasonfevangsafe

When a paragraph spans multiple pages, top/bottom padding is applied to the paragraph on each page, rather than just at the start/end of the paragraph. I don't think this should be the case.

Minimal code

from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial")
pad_bottom = 50
pdf.multi_cell(w = 0, text="Hello, this is a sample PDF!" * 300, padding=[0, 0, pad_bottom, 0])
pdf.output("sample.pdf")

Environment
Please provide the following information:

  • Operating System: Windows
    • Python version: 3.12.2
      • fpdf2 version used: 2.8.2

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions