Skip to content

[Bug] FPDFException when metadata values exceed available horizontal space in multi_cell #36

@surabhis16

Description

@surabhis16

Description

When using multi_cell() with long text values in metadata dictionaries, the library raises FPDFException: Not enough horizontal space to render a single character instead of gracefully handling or truncating the text.

Expected Behavior

The library should either:

  1. Automatically wrap/truncate text that exceeds available width
  2. Provide a clearer error message indicating the text is too long
  3. Offer a parameter to control overflow behavior (truncate, wrap, raise error)

Actual Behavior

Raises: fpdf.errors.FPDFException: Not enough horizontal space to render a single character

Image Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions