Borb

Latest version: v2.1.25

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 12

2.0.9.1

This release features:

- A small fix to remove the `curses` dependency

2.0.9

This release features:

- A small fix in `ChunksOfText` ensuring the `LayoutElement` does make unneeded copies
- I also added a few tests for the new behaviour

- More documentation in the `Page` class (some minor work on annotations)

- A new annotation type (or rather a convenience method for an existing annotation type): remote-go-to
- This enables you to embed links to websites in your PDF's.
- I also added a few tests for this new method.

- Fixed a fair amount of MyPy warnings

- Added TextRank keyword-extraction algorithm
- Implemented `BigramPartOfSpeechTagger`
- Added test(s)

2.0.8

This release features:

- Small bugfix in `Page.pop_page` function; `/Count` was not being updated properly

- Convenient method to rotate `Page` clockwise and counterclockwise 90 degrees

- Refactor of all `EventListener` implementations

- All methods that **get** something after an `EventListener` processes a `Document` now follow the naming convention `get_xxx_for_page`
- e.g: `get_text_for_page`, `get_images_for_page`, `get_colors_for_page` etc

- Refactor of the `Color` API

- All `Color` instances are now constructed with values `0..1`

- Except `HexColor`, `Pantone` and `X11Color` (which are constructed with `str` objects)

- Extra utility methods in `HSVColor`:

- `complementary` : produces the complementary `Color` of the given `Color`
- `analogous` : produces 2 `Color` objects that are similar to the given `Color`
- `split_complementary`: produces 2 `Color` objects that are similar to the complementary of the given `Color`, thus forming a split complementary color group
- `triadic` : produces 2 `Color` objects that form a triad with a given `Color`
- `tetradic_rectangle`: produces 3 `Color` objects; a `Color` that is analogous to the given `Color` and the complementary pair of this pair
- `tetradic_square`: produces 3 `Color` objects that form a tetradic square with the given `Color`

- More tests (for aforementioned functionality)

- Improved testing

- Tests can now visually compare their output to a ground truth PNG

- Output PDF of the test is converted to PNG (using GhostScript)
- If a ground_truth.png file is present, its pixels are compared to the test output.png
- Almost full automation of the entire test-suite

- (the start of) Forms

- FormField class represents a common base class for anything you might find on a form (checkbox, textfield, dropdown, etc)

- Implementation of TextField
- Implementation of DropDownList
- Convenience implementation of CountryDropDownList
- Implementation of CheckBox

- Further releases will improve the way the layout algorithm handles these LayoutElement implementations

- margin
- padding
- font_color
- font
- background_color
- font_size

- Once FormField objects can be added:

- Retrieve fields (and in particular their values) from Page
- Set value for each field (using Page)
- "Flatten" (remove field, keep value) FormField

2.0.7

This release features:

- `Table` detection
- fix quite a few `mypy` warnings
- rebranding of all examples
- rename `BaseTable` to `Table`
- `Chart` objects now have `horizontal_alignment` and `vertical_alignment`
- Update `README.md`

Table Detection

This feature enables you to scan a `Page` (using the `TableDetectionByLines` implementation of `EventListener`) for content that is likely to be a `Table`.
You can then retrieve:

- the coordinates of the bounding box of the `Table`
- the coordinates of each cell (including those cells that may have `row_span` and/or `column_span`)

Rename `BaseTable` to `Table`

I saw this inconsistency when I was writing a tutorial.
`List` has two implementations `OrderedList` and `UnorderedList`, it makes sense to rename `BaseTable` to `Table`.
Perhaps in future, more of these renames will occur as I try to achieve consistency over the entire library.

Rebranding of all examples

Now that `borb` has a logo and theme-colors it makes sense to ensure every example uses these colors.

2.0.6

This release features:
- Rename: `pText` has become `borb`
- Support for more kinds of TrueType fonts (previously only TrueType fonts with max. 256 glyphs)
- More tests (for aforementioned TrueType fonts)

2.0.0

This release features:
- Small bugfixes in the setup.py script (ensuring some dependencies that are present by default on Linux get installed on Windows)
- Refactor of the `LayoutElement` implementations
- Allowing users access to previously internal parameters of `PageLayout` implementations (such as margins)
- Improvements to `ChunksOfText` (now `HeterogeneousParagraph`, representing a heterogeneous paragraph)
- New text-layout class `Span` (similar to `HeterogeneousParagraph`, without default top/bottom margin)
- `LayoutElement` implementations have margins now (which was needed for HTML), you may expect some layout differences between this version of `pText` and former versions.
- A new PageLayout mechanism: `BrowserLayout`
- A new implementation of `BaseTable`.
- `FlexibleColumnWidthTable` (which behaves more like tables in HTML)
- `FixedColumnWidthTable` (which assigns a fixed width to every column)
- `HTMLToPDF` supports a lot more tags:
- `body`
- `head`
- `meta`
- `title`
- `h1` to `h6`
- `ħr`
- `img`
- `ul`, `ol`, `li`
- `address`
- `main`
- `section`
- `table`, `tbody`, `td`, `th`, `tr`
- `b`, `strong`
- `i`, `em`
- `a`
- `abbr`
- `br`
- `code`
- `mark`
- `p`

Check the examples and tests for more information.
A dozen or so documents have been provided as examples for `HTMLToPDF`.

Page 9 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.