fpdf2 icon indicating copy to clipboard operation
fpdf2 copied to clipboard

Indent HTML lists correctly (Issue 1073)

Open lcgeneralprojects opened this issue 1 year ago • 0 comments

Fixes #1073 Implements paragraph indentation via adjustments of pdf.x instead of using a natural number of whitespaces. Breaks up list items into individual paragraphs.

Checklist:

  • [x] The GitHub pipeline is OK (green), meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.

  • [x] A unit test is covering the code added / modified by this PR

  • [x] This PR is ready to be merged

  • [x] In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • [x] A mention of the change is present in CHANGELOG.md

Not sure how to actually name the HTML2FPDF.list_pseudo_margin attribute. It is used for determining the height of the \n line created when a <ul> or <ol> starting tag is handled.

Should the re-implementation of paragraph indentation be reflected in a doctstring, even though the tag_indents parameter of write_html() has not been touched? If so, where should it be placed?

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

lcgeneralprojects avatar May 17 '24 05:05 lcgeneralprojects