Skip to content

Fix deprecated fpdf2 parameters in report renderers#332

Open
aligalipcamli wants to merge 1 commit into
arrobalytics:masterfrom
aligalipcamli:fix/fpdf2-deprecated-report-params
Open

Fix deprecated fpdf2 parameters in report renderers#332
aligalipcamli wants to merge 1 commit into
arrobalytics:masterfrom
aligalipcamli:fix/fpdf2-deprecated-report-params

Conversation

@aligalipcamli
Copy link
Copy Markdown

Update Django Ledger PDF report renderers to avoid deprecated fpdf2 cell parameter usage.

  • Replace txt= with text=

  • Replace ln= with new_x=XPos.LMARGIN and new_y=YPos.NEXT

  • Preserve existing PDF rendering behavior

  • Verify PDF generation locally with parseable output using pypdf

Note on target branch

I noticed the contribution guide mentions opening PRs against develop. However, develop currently appears to be behind master, while the latest release tags seem to be on the master line. For that reason, I opened this small maintenance PR against master.

If you prefer this contribution to target develop, I’m happy to retarget or rebase accordingly.

Local validation

I validated the change in a small Django Ledger integration spike by generating financial statement PDFs and parsing the generated files with pypdf.

The smoke test checks that:

  • generated files start with %PDF
  • generated PDFs can be opened by pypdf.PdfReader
  • each generated PDF has at least one page
  • no fpdf2 DeprecationWarning is emitted during PDF report generation

I also ran the local integration test suite successfully.

Update Django Ledger PDF report renderers to avoid deprecated fpdf2 cell parameter usage.

- Replace txt= with text=

- Replace ln= with new_x=XPos.LMARGIN and new_y=YPos.NEXT

- Preserve existing PDF rendering behavior

- Verify PDF generation locally with parseable output using pypdf
@aligalipcamli aligalipcamli force-pushed the fix/fpdf2-deprecated-report-params branch from 9aabb76 to 43d2212 Compare May 23, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant