From 350fef267b0fcd107e51406ae9eadd809e4c397f781dfe5de643ac44f634c9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Feb 2025 13:55:30 +0000 Subject: [PATCH] Accepting request 1243026 from home:glaubitz:branches:devel:languages:python - Update to 2.8.2 * Added - new optional parameter `border` for table cells: users can define specific borders (left, right, top, bottom) for individual cells - `FPDF.write_html()`: now parses `` tags to set the document title. By default, it is added as PDF metadata, but not rendered in the document body. However, this can be enabled by passing `render_title_tag=True` to `FPDF.write_html()`. - support for LZWDecode compression - Python 3.13 is now officially supported - support for page labels and created a reference table of contents implementation - documentation on how to: render spreadsheets as PDF tables - support for passing `Align` values (along with string values like `'C'`, `'L'`, `'R'`) in `l_margin` of `TextStyle` to horizontally align text * Fixed - support for `align=` in `FPDF.table()`. Due to this correction, tables are now properly horizontally aligned on the page by default. This was always specified in the documentation, but was not in effect until now. You can revert to have left-aligned tables by passing `align="LEFT"` to `FPDF.table()`. - `FPDF.set_text_shaping(False)` was broken since version 2.7.8 and is now working properly - fixed bug where cells with `rowspan`, `colspan` > 1 and null text were not displayed properly - `CreationDate` metadata used a wrong timezone offset for UTC - `insert_toc_placeholder()`] did not properly set the page orientation, which caused a bug when the last page of the document was in a different orientation * Changed - improved logic for handling text substitution of the total number of pages, ensuring compatibility with text shaping - all `AnnotationDict` properties can now be passed to `FPDF.text_annotation()`, `FPDF.free_text_annotation()`, `FPDF.add_action()`, `FPDF.add_text_markup_annotation()` & `FPDF.ink_annotation()`. This includes `title`, `color`, `border_width`... OBS-URL: https://build.opensuse.org/request/show/1243026 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fpdf2?expand=0&rev=5 --- _service | 4 +- fpdf2-2.7.9.obscpio | 3 -- fpdf2-2.8.2.obscpio | 3 ++ fpdf2-2.8.2.tar.xz | 3 ++ fpdf2.obsinfo | 6 +-- python-fpdf2.changes | 106 +++++++++++++++++++++++++++++++++++++++++++ python-fpdf2.spec | 4 +- 7 files changed, 119 insertions(+), 10 deletions(-) delete mode 100644 fpdf2-2.7.9.obscpio create mode 100644 fpdf2-2.8.2.obscpio create mode 100644 fpdf2-2.8.2.tar.xz diff --git a/_service b/_service index a5194f3..4718e6e 100644 --- a/_service +++ b/_service @@ -3,8 +3,8 @@ <param name="url">https://github.com/py-pdf/fpdf2</param> <param name="scm">git</param> <param name="exclude">test/text_shaping/SBL_Hbrw.ttf</param> - <param name="version">2.7.9</param> - <param name="revision">2.7.9</param> + <param name="version">2.8.2</param> + <param name="revision">2.8.2</param> </service> <service mode="manual" name="set_version" /> <service mode="buildtime" name="tar" /> diff --git a/fpdf2-2.7.9.obscpio b/fpdf2-2.7.9.obscpio deleted file mode 100644 index 51fd21a..0000000 --- a/fpdf2-2.7.9.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56f8b8b19ee04ae894e8ea5736dcca0210a42fadc88371f05cb18f4ee738ed90 -size 46494733 diff --git a/fpdf2-2.8.2.obscpio b/fpdf2-2.8.2.obscpio new file mode 100644 index 0000000..1407e30 --- /dev/null +++ b/fpdf2-2.8.2.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c8fab05804236b800ca16755909acd038ce9bc6aa1f04573cd1d53f2218882b +size 50548749 diff --git a/fpdf2-2.8.2.tar.xz b/fpdf2-2.8.2.tar.xz new file mode 100644 index 0000000..4db6774 --- /dev/null +++ b/fpdf2-2.8.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82f590db3c4f3086f30dd8478583ce1e3dc29502701e3becd409256ef57d4348 +size 23309964 diff --git a/fpdf2.obsinfo b/fpdf2.obsinfo index 8d5fa9b..7a54f57 100644 --- a/fpdf2.obsinfo +++ b/fpdf2.obsinfo @@ -1,4 +1,4 @@ name: fpdf2 -version: 2.7.9 -mtime: 1715961501 -commit: 1e366a4455a44c806819867ea188859727699cdc +version: 2.8.2 +mtime: 1734342745 +commit: b9cfbb6d8ca1eb034e826fd358194e899a1daf28 diff --git a/python-fpdf2.changes b/python-fpdf2.changes index 2786312..a0fdbd1 100644 --- a/python-fpdf2.changes +++ b/python-fpdf2.changes @@ -1,3 +1,109 @@ +------------------------------------------------------------------- +Tue Feb 4 09:48:58 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to 2.8.2 + * Added + - new optional parameter `border` for table cells: users can define + specific borders (left, right, top, bottom) for individual cells + - `FPDF.write_html()`: now parses `<title>` tags to set the document title. + By default, it is added as PDF metadata, but not rendered in the document + body. However, this can be enabled by passing `render_title_tag=True` to + `FPDF.write_html()`. + - support for LZWDecode compression + - Python 3.13 is now officially supported + - support for page labels and created a reference table of contents implementation + - documentation on how to: render spreadsheets as PDF tables + - support for passing `Align` values (along with string values like `'C'`, + `'L'`, `'R'`) in `l_margin` of `TextStyle` to horizontally align text + * Fixed + - support for `align=` in `FPDF.table()`. Due to this correction, tables are now + properly horizontally aligned on the page by default. This was always specified + in the documentation, but was not in effect until now. You can revert to have + left-aligned tables by passing `align="LEFT"` to `FPDF.table()`. + - `FPDF.set_text_shaping(False)` was broken since version 2.7.8 and is now working properly + - fixed bug where cells with `rowspan`, `colspan` > 1 and null text were not displayed properly + - `CreationDate` metadata used a wrong timezone offset for UTC + - `insert_toc_placeholder()`] did not properly set the page orientation, which + caused a bug when the last page of the document was in a different orientation + * Changed + - improved logic for handling text substitution of the total number of pages, + ensuring compatibility with text shaping + - all `AnnotationDict` properties can now be passed to `FPDF.text_annotation()`, + `FPDF.free_text_annotation()`, `FPDF.add_action()`, `FPDF.add_text_markup_annotation()` + & `FPDF.ink_annotation()`. This includes `title`, `color`, `border_width`... + * Removed + - reminder : since release `2.8.1`, `fpdf2` does not support Python 3.7, + that reached end-of-life in 2023 +- from version 2.8.1 + * Added + - support for quadratic and cubic Bézier curves with `FPDF.bezier()` + - support for escape character for markers in markdown text + - Wrapping words on spaces now considers all common space symbols in + addition to regular spaces (' '), addressing issues with word-wrapping + for languages like Thai, as per (#1190) and (#1191) + - `Templates` can now be also defined in JSON files. + - support to optionally set `wrapmode` in templates (default `"WORD"` can + optionally be set to `"CHAR"` to support wrapping on characters for scripts + like Chinese or Japanese) - _cf._ (#1159) + - documentation on how to use `fpdf2` with Rough.js + - documentation on how to use `fpdf2` with gunicorn + - new translation of the tutorial in Türkçe + - feature to identify the Unicode script of the input text and break it into + fragments when different scripts are used, improving text shaping results + - `FPDF.image()`: now handles `keep_aspect_ratio` in combination with an + enum value provided to `x` + - `FPDF.write_html()`: now supports CSS page breaks properties : documentation + - `FPDF.write_html()`: new optional `font_family` parameter to set the default font family + - `FPDF.write_html()`: spacing before lists can now be adjusted via the `tag_styles` attribute + - file names are mentioned in errors when `fpdf2` fails to parse a SVG image + * Fixed + - `FPDF.local_context()` used to leak styling during page breaks, when rendering + `footer()` & `header()` + - `fpdf.drawing.DeviceCMYK` objects can now be passed to `FPDF.set_draw_color()`, + `FPDF.set_fill_color()` and `FPDF.set_text_color()` without raising a `ValueError` + - `FPDF.write_html()`: fixing rendering of `<hr>` tags, that do not trigger a page + break anymore + - `FPDF.write_html()`: fixed automatic page break when an image does not have enough + vertical space to be rendered on a page + - individual `/Resources` directories are now properly created for each document page. + This change ensures better compliance with the PDF specification but results in a + slight increase in the size of PDF documents. You can still use the old behavior + by setting `FPDF().single_resources_object = True` + - line size calculation for fragments when text shaping is used + - `FPDF.write_html()`: fixed incoherent indentation of long `<ul>` list entries + - default values for `top_margin` and `bottom_margin` in `HTML2FPDF._new_paragraph()` + calls are now correctly converted into chosen document units. + - In text_columns(), paragraph top/bottom margins didn't correctly trigger column breaks + - `fpdf.drawing.color_from_hex_string` did not test or mention accepting lowercase hex values. + - handling of bidirectional text on `FPDF.get_string_width()` + - new translation of the tutorial in Indonesian + - `RecursionError` in some cases when calling `FPDF.write_html()` inside `FPDF.footer()` + * Removed + - support for Python 3.7, that reached end-of-life in 2023 + - an obscure and undocumented feature of `FPDF.write_html()`, which used to magically + pass instance attributes as arguments. + * Deprecated + - `fpdf.TitleStyle` has been renamed into `fpdf.TextStyle` + - `FPDF.write_html()`: `tag_indents` introduced in the last version - Now the indentation + can be provided through the `tag_styles` parameter, using the `.l_margin` of `TextStyle` + instances + * Changed + - `FPDF.local_context()` used to treat `font_size` as a value in points. Now this is the + role of `font_size_pt`, whereas `font_size` allows to set the font size into chosen + document units (specified with `FPDF(unit=)`) + - `FPDF.circle()`: the previous `r` parameter, that in fact defined the diameter, has + been replaced by a new `radius` paremeter. The `x` & `y` parameters now define the + circle **center**, instead of its top-left corner as it used to be + - `FPDF.table()` now raises an error when a single row is too high to be rendered on + a single page + - `FPDF.write_html()`: indentation of HTML elements can now be non-integer (float), + and is now independent of font size and bullet strings. + - improved performance of font glyph selection by using functools cache + - Clarified usage of the `style` attribute in `FPDF.add_font()` +- from version 2.8.0 + * This version was only uploaded a few minutes on Pypi and then deleted manually by a + maintainer, erroneously fearing a regression. + ------------------------------------------------------------------- Tue Oct 29 06:47:30 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com> diff --git a/python-fpdf2.spec b/python-fpdf2.spec index b7eb0e2..e82f8e8 100644 --- a/python-fpdf2.spec +++ b/python-fpdf2.spec @@ -1,7 +1,7 @@ # # spec file for package python-fpdf2 # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-fpdf2 -Version: 2.7.9 +Version: 2.8.2 Release: 0 Summary: Simple & fast PDF generation for Python License: LGPL-3.0-or-later