Borb Versions Save

borb is a library for reading, creating and manipulating PDF files in python.

v2.1.10

1 year ago

:mega: borb release notes

This release is a beauty pageant release:

  • Classes have been split in 3 parts:
    • CONSTRUCTOR
    • PRIVATE
    • PUBLIC
  • :+1: All class-methods in the borb package have been sorted (in their respective part)
  • :+1: All public methods have been documented
  • :+1: The vast majority of mypy warnings have been taken care of

Although the majority of the work has been done, this will always be an ongoing task. As new development adds code, I may need this kind of release from time to time to ensure the quality of the code stays up.

This release includes the following minor fixes:

  • minor fix in DisconnectedShape (method names related to scaling were not analoguous to ConnectedShape)

v2.1.8

1 year ago

:mega: borb release notes

This release is a bugfix release.

v2.1.7

1 year ago

:mega: borb release notes

This release is a feature release.

  • Introducing SimpleFindReplace which enables you to find and replace text in a PDF
    • For examples on how to use it, check the examples repository
    • You can also check the tests directory in this project

This release fixes inconsistencies in toolkit

Most of the classes in the following table implement EventListener and are part of the package toolkit. They have a class method (which you can call if you instantiate them and add them as EventListener to a PDF). They also have a static method that you can call. The class method and static method typically return the same type/thing.

The static method has the advantage that it allows you to work with a Document, whereas the class method only works with a PDF that is being loaded. Or, to put it simply, the static method can be used at any point in the life-cycle of Document, whereas the class method can only be used when reading an existing PDF.

This table gives you an overview of the available classes in toolkit and their methods:

class class method static method status
ColorExtraction get_color get_color_from_pdf :heavy_check_mark:
FontExtraction get_fonts
FontExtraction get_font_names
HTMLToPDF convert_html_to_layout_element :heavy_check_mark:
HTMLToPDF convert_html_to_pdf :heavy_check_mark:
ImageExtraction get_images get_images_from_pdf :heavy_check_mark:
MarkdownToPDF convert_markdown_to_layout_element :heavy_check_mark:
MarkdownToPDF convert_markdown_to_pdf :heavy_check_mark:
PDFToJPG convert_to_jpg convert_pdf_to_jpg :heavy_check_mark:
PDFToMP3 convert_to_mp3 convert_pdf_to_mp3 :heavy_check_mark:
PDFToSVG convert_to_svg convert_pdf_to_svg :heavy_check_mark:
RegularExpressionTextExtraction get_matches get_matches_for_pdf :heavy_check_mark:
SimpleLineOfTextExtraction get_lines_of_text get_lines_of_text_from_pdf :heavy_check_mark:
SimpleNonLigatureTextExtraction get_text get_text_from_pdf :heavy_check_mark:
SimpleParagraphExtraction get_paragraphs get_paragraphs_from_pdf :heavy_check_mark:
SimpleTextExtraction get_text get_text_from_pdf :heavy_check_mark:
TableDetectionByLines get_tables
TableDetectionByLines get_table_bounding_boxes
TextRankKeywordExtraction get_keywords get_keywords_from_pdf :heavy_check_mark:
TFIDFKeywordExtraction get_keywords get_keywords_from_pdf :heavy_check_mark:

v2.1.6

1 year ago

:mega: borb release notes

This release is a maintenance release.

  • minor fix to annotations and Page
  • minor fix to Hyphenation

v2.1.5

1 year ago

:mega: borb release notes

This release is a maintenance release.

  • FormField elements behave more like LayoutElement now
  • Add more SmartArt
  • Add automated testing using GitHub actions
  • Add Version class to have 1 point of reference for getting version/author/producer information

Usage Statistics

Recently, borb has gone into the early stages of finding a reseller. This is a very exciting step that I am sure will bring positive things for all of us, both borb and its users.

Understandably, the marketing/sales team would like some data to figure out what our target audience is, where to invest effort and resources, and more. So I have added UsageStatistics to borb. This class gathers the following data:

  • anonymous user ID (This is a randomly generated UUID, it is persisted in the installation directory of borb to ensure consistency between calls)
  • city
  • country name
  • country code
  • system platform (the operating system on which borb is running)
  • state
  • utc time in ms
  • version (the version of borb that is running)

These statistics are periodically sent to our server(s). I have done my best to ensure this does not hinder the performance of borb in any way. I urge to look at the source code of the License package to reassure yourself of the fact that we are gathering only the bare minimum of data.

Nevertheless, I fully understand that you may prefer not to send this information. You can turn it off by calling UsageStatistics.disable().

v2.1.4

1 year ago

:mega: borb release 2.1.4

This release is a maintenance/feature release.

  • Fixed inconsistent function names in borb.toolkit
    • Updated examples repository
  • Fixed issue with deepcopy on borb objects
    • Added tests for deepcopy
  • Added more random text generators so users can pick a flavor
  • Added SmartArt to allow document designers to easily create beautiful charts and illustrations
    • Added tests for SmartArt
    • More SmartArt to come in future releases

v2.1.3

1 year ago

:mega: borb release 2.1.3

This release is a minor bugfix release:

  • Following the large refactor of LayoutElement, some minor classes still needed to be updated to work with the new framework. Most notable among these is HTMLToPDF`.

  • GradientColoredDisjointShape has become GradientColoredDisconnectedShape to follow suit with the rename of DisjointShape to DisconnectedShape.

  • InlineFlow and BlockFlow have been moved to page_layout. Easy imports have been provided for them.

  • More convenient imports have been made possible for FormField elements.

  • The documentation of borb (to be found in the examples repository) has been given a major check. There is also a script that will automatically attempt to run each example code snippet. This should make it easier to detect when a new release breaks something in the examples repository.

v2.1.2

1 year ago

:mega: borb release 2.1.2

This release is a minor bugfix release:

  • Following the large refactor of LayoutElement, some minor classes still needed to be updated to work with the new framework. Most notable among these is HTMLToPDF`.

  • GradientColoredDisjointShape has become GradientColoredDisconnectedShape to follow suit with the rename of DisjointShape to DisconnectedShape.

  • InlineFlow and BlockFlow have been moved to page_layout. Easy imports have been provided for them.

  • More convenient imports have been made possible for FormField elements.

  • The documentation of borb (to be found in the examples repository) has been given a major check. There is also a script that will automatically attempt to run each example code snippet. This should make it easier to detect when a new release breaks something in the examples repository.

v2.1.1

1 year ago

:mega: borb release 2.1.1

This release is a feature release:

  • HTMLToPDF has been updated to ensure even more HTML syntax is supported
    • HTMLToPDF allows you to specify a typing.List[Font] of fallback fonts
    • This allows you to use non-western characters in HTML and markdown
  • MarkdownToPDF now uses HTMLToPDF (making it easier for me to maintain the code)
  • Added BlockFlow and InlineFlow elements
  • Added SingleColumnLayoutWithOverflow to enable certain LayoutElement implementations to be split across multiple Page objects. Currently only splitting of Table is supported.

v2.1.0

1 year ago

:mega: borb release 2.1.0

This release is a feature release:

  • The LayoutElement framework has had a major upgrade
    • Each LayoutElement now offers a get_layout_box method which tells you how much space a LayoutElement takes up
    • Each LayoutElement now offers a paint method which renders the LayoutElement on a Page
    • LayoutElement only adds its own content to the Page (previously it would change the order of page content to ensure backgrounds get drawn first)
  • As a result of these changes, layout is a bit faster in this release, compared to previous releases
  • All tests have been checked and changed to take into account the new behaviour
  • Tests that perform visual comparison ignore HexColor("00ff00"), which allows me to add the date of the test in the output, and still compare only the relevant pixels
  • MarkdownToPDF has been refactored to convert Markdown to HTML
  • HTMLToPDF still needs work to produce PDF documents