Borb Versions Save

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

v2.1.22

1 month ago

:mega: borb release notes

This release is more of an aesthetic release.

  • The imports have been reviewed,
  • a lot of code comments have been reviewed (adding parameters where needed)

A new feature (related to redaction) was added.

  • FaceDetectionEventListener runs through a Document and triggers _face_occurred whenever a face is detected (in an image)
  • FaceEraserEventListener (based on FaceDetectionEventListener) adds the typical (pixelated) blur to any detected face

v2.1.21

3 months ago

:mega: borb release notes

  • Added A4PortraitInvoiceTemplate
  • Added tests for A4PortraitInvoiceTemplate
  • Bugfix in HeterogeneousParagraph
  • Refactor UsageStatistics

v2.1.20

4 months ago

:mega: borb release notes

  • Added support for (some) password-protected PDF documents
  • Added test to check whether all imports are fully qualified
  • Added test to check whether all imports are in the requirements
  • Added test to check whether all imports are single line
  • Added CodeBlockWithSyntaxHighlighting LayoutElement
  • Ran black
  • Ran optimize imports
  • Removed dependency on lxml, which is only needed for HTMLToPDF

v2.1.19`

5 months ago

:mega: borb release notes

  • Added pretty much all the LayoutElement implementations to the easy imports.
  • Added a LayoutElement called Map with implementations MapOfEurope, MapOfTheUnitedStates and MapOfTheWorld. These LayoutElement instances draw a map of their respective territories, and allow you to mark one or multiple components with a different fill_color, stroke_color and line_width.
  • Fixed tests related to unsplash API.
  • Added tests for A4PortraitTemplate.
  • Added tests for A42ColumnPortraitTemplate.
  • Added tests for SlideTemplate.
  • Added TestCreateFullSlideTemplate. Check out this TestCase if you want a concrete example of how to use SlideTemplate to produce a beautiful slideshow in PDF.

v2.1.18

6 months ago

:mega: borb release notes

  • Added some utility methods in LayoutElement
    • get_golden_ratio_landscape_box
    • get_golden_ratio_portrait_box
    • get_largest_landscape_box
    • get_smallest_landscape_box
  • Removed _calculate_min_and_max_layout_box from TableCell
  • Added tests for get_golden_ratio_landscape_box
  • Added tests for get_golden_ratio_portrait_box
  • Added utility class A4PortraitTemplate
    • This class represents an A4_PORTRAIT Document
    • It contains methods that allow you to directly add content to it
    • All the content-adding methods have sensible defaults (font, font_size, font_color, etc)
    • This class has a utility method to immediately save the Document
  • Added tests for A4PortraitTemplate
  • Fixed small bug in add_outline in Document

v2.1.17

7 months ago

:mega: borb release notes

  • fixed bug in SingleColumnLayoutWithOverflow
  • replaced list += [] by list.append() for performance reasons

v2.1.16

9 months ago

:mega: borb release notes

  • add Watermark LayoutElement, representing a piece of text laid out over the entire Page. Users can specify the text, font_size, font_color, rotation, and transparency
  • add Watermark to easy imports
  • add tests for Watermark
  • re-implement MultiColumnLayout, with better handling of headers and footers
  • update requirements.txt where possible
  • reworked a couple of tests, ensuring they can run without dependencies as well
  • added a fair use warning to ensure people know the difference between using borb in an open-source vs. commercial setting. This warning is only triggered when producing a high volume of PDF documents.

v2.1.14

10 months ago

:mega: borb release notes

This release features the arrival of RGBA Image objects in borb. There is also a significant speedup in text layout due to a clever width-estimation.

v2.1.13

11 months ago

:mega: borb release notes

This release refactors the testing in borb.

  • All tests have been refactored into directories corresponding the main functionality they test
    • E.g. tests for Equation (in borb.pdf.canvas.layout.equation) can be found in tests.pdf.canvas.layout.equation
    • Tests derive from TestCase
      • TestCase offers some utility methods to standardize output files
      • TestCase offers the methods to visually compare an output
      • TestCase offers the methods to check a PDF using a validator

v2.1.11

1 year ago

:mega: borb release notes

This release is a feature release:

  • Added Equation to the LayoutElement hierarchy

    • Equation allows you to easily add mathematical expressions to a PDF
    • Determine the font, font_size, font_color and many other attributes
    • Equation behaves just like any other LayoutElement
  • Fix minor issue in SimpleFindReplace

  • Fix minor issue in Image (present for Image objects with mode LA)

  • Fix vertical_alignment for Table implementations

    • vertical_alignment is now relative to the Table rather than to the Page
    • This approach does incur the cost of having to determine the tallest LayoutElement in the row