diff --git a/borb/io/read/types.py b/borb/io/read/types.py index ef2747d1b..5abe8d5b0 100644 --- a/borb/io/read/types.py +++ b/borb/io/read/types.py @@ -153,7 +153,28 @@ def get_reference(self) -> typing.Optional["Reference"]: setattr(self, "_reference", None) return self._reference - # set_is_inline + # is_uniaue + def set_is_unique(self, a_flag: bool): + """ + This function sets whether or not this Object is unique. + When an object is unique, it is not checked against the cache. + """ + if "_is_unique" not in vars(self): + setattr(self, "_is_unique", None) + self._is_unique = a_flag + return self + + # is_uniaue + def get_is_unique(self) -> bool: + """ + This function returns whether or not this Object is unique. + When an object is unique, it is not checked against the cache. + """ + if "_is_unique" not in vars(self): + setattr(self, "_is_unique", False) + return self._is_unique + + # is_inline def set_is_inline(self, a_flag: bool): """ This function sets whether or not this Object is written inline. @@ -181,6 +202,8 @@ def get_is_inline(self) -> bool: object.get_reference = types.MethodType(get_reference, object) object.set_is_inline = types.MethodType(set_is_inline, object) object.is_inline = types.MethodType(get_is_inline, object) + object.set_is_unique = types.MethodType(set_is_unique, object) + object.is_unique = types.MethodType(get_is_unique, object) object.to_json_serializable = types.MethodType(to_json_serializable, object) if isinstance(object, Image): object.__deepcopy__ = types.MethodType(deepcopy_mod, object) diff --git a/borb/io/write/ascii_art/ascii_logo.txt b/borb/io/write/ascii_art/ascii_logo.txt index 7519650e0..1abeca744 100644 --- a/borb/io/write/ascii_art/ascii_logo.txt +++ b/borb/io/write/ascii_art/ascii_logo.txt @@ -1,2 +1,2 @@ -borb version 2.0.29 +borb version 2.0.30 Joris Schellekens \ No newline at end of file diff --git a/borb/io/write/font/__init__.py b/borb/io/write/font/__init__.py new file mode 100644 index 000000000..bcf77caad --- /dev/null +++ b/borb/io/write/font/__init__.py @@ -0,0 +1,43 @@ +""" + This file is part of the borb (R) project. + Copyright (c) 2020-2040 borb Group NV + Authors: Joris Schellekens, et al. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License version 3 + as published by the Free Software Foundation with the addition of the + following permission added to Section 15 as permitted in Section 7(a): + FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY + BORB GROUP. BORB GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT + OF THIRD PARTY RIGHTS + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program; if not, see http://www.gnu.org/licenses or write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA, 02110-1301 USA. + + The interactive user interfaces in modified source and object code versions + of this program must display Appropriate Legal Notices, as required under + Section 5 of the GNU Affero General Public License. + In accordance with Section 7(b) of the GNU Affero General Public License, + a covered work must retain the producer line in every PDF that is created + or manipulated using borb. + + You can be released from the requirements of the license by purchasing + a commercial license. Buying such a license is mandatory as soon as you + develop commercial activities involving the borb software without + disclosing the source code of your own applications. + + These activities include: offering paid services to customers as an ASP, + serving PDFs on the fly in a web application, shipping borb with a closed + source product. + + For more information, please contact borb Software Corp. at this + address: joris.schellekens.1989@gmail.com +""" diff --git a/borb/io/write/font/character_set_listener.py b/borb/io/write/font/character_set_listener.py new file mode 100644 index 000000000..546a5d0b9 --- /dev/null +++ b/borb/io/write/font/character_set_listener.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +This implementation of WriteBaseTransformer is responsible for determining which characters (typing.Set[str]) +are used by which Font. This is particularly useful when performing Font subsetting. +""" +import typing + +from borb.pdf.canvas.event.chunk_of_text_render_event import ChunkOfTextRenderEvent +from borb.pdf.canvas.event.event_listener import EventListener, Event +from borb.pdf.canvas.font.font import Font + + +class CharacterSetListener(EventListener): + """ + This implementation of WriteBaseTransformer is responsible for determining which characters (typing.Set[str]) + are used by which Font. This is particularly useful when performing Font subsetting. + """ + + def __init__(self): + super(CharacterSetListener, self).__init__() + self._character_set_per_font: typing.Dict[Font, typing.Set[str]] = {} + + def _event_occurred(self, event: Event) -> None: + if isinstance(event, ChunkOfTextRenderEvent): + f: Font = event.get_font() + if f in self._character_set_per_font: + s: typing.Set[str] = self._character_set_per_font[f] + for c in event.get_text(): + s.add(c) + self._character_set_per_font[f] = s + else: + self._character_set_per_font[f] = set([x for x in event.get_text()]) + + def get_character_set_per_font(self) -> typing.Dict[Font, typing.Set[str]]: + """ + This function returns the character set (typing.Set[str]) used by each Font + :return: the character set used by each Font + """ + return self._character_set_per_font diff --git a/borb/io/write/font/copy_command_operator.py b/borb/io/write/font/copy_command_operator.py new file mode 100644 index 000000000..83e0a63c4 --- /dev/null +++ b/borb/io/write/font/copy_command_operator.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +This CanvasOperator copies an existing operator and writes its bytes to a content stream of the canvas. +""" +import typing +from decimal import Decimal + +from borb.io.read.types import AnyPDFType, HexadecimalString, String, Name +from borb.pdf.canvas.operator.canvas_operator import CanvasOperator + + +class CopyCommandOperator(CanvasOperator): + """ + This CanvasOperator copies an existing operator and writes its bytes to a content stream of the canvas. + """ + + def __init__( + self, operator_to_copy: CanvasOperator, output_content_stream: bytearray + ): + super().__init__("", 0) + self._operator_to_copy = operator_to_copy + self._output_content_stream: bytearray = output_content_stream + + def get_text(self) -> str: + """ + Return the str that invokes this CanvasOperator + """ + return self._operator_to_copy.get_text() + + def get_number_of_operands(self) -> int: + """ + Return the number of operands for this CanvasOperator + """ + return self._operator_to_copy.get_number_of_operands() + + def _operand_to_str(self, op: AnyPDFType) -> str: + if isinstance(op, Decimal): + return str(op) + if isinstance(op, HexadecimalString): + return "<" + op._text + ">" + if isinstance(op, String): + return "(" + op._text + ")" + if isinstance(op, Name): + return "/" + str(op) + if isinstance(op, list): + return "[" + "".join([self._operand_to_str(x) + " " for x in op])[:-1] + "]" + return "" + + def invoke( + self, + canvas_stream_processor: "CanvasStreamProcessor", # type: ignore [name-defined] + operands: typing.List[AnyPDFType] = [], + event_listeners: typing.List["EventListener"] = [], # type: ignore [name-defined] + ) -> None: + """ + Invokes this CanvasOperator + """ + + # execute command + self._operator_to_copy.invoke(canvas_stream_processor, operands) + + # copy command in content stream + canvas = canvas_stream_processor.get_canvas() + + # copy operand string + self._output_content_stream += b"\n" + self._output_content_stream += b"".join( + [(bytes(self._operand_to_str(s), encoding="utf8") + b" ") for s in operands] + ) + self._output_content_stream += bytes(self.get_text(), encoding="utf8") diff --git a/borb/io/write/font/subset_show_text_with_glyph_positioning.py b/borb/io/write/font/subset_show_text_with_glyph_positioning.py new file mode 100644 index 000000000..deca21974 --- /dev/null +++ b/borb/io/write/font/subset_show_text_with_glyph_positioning.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Show one or more text strings, allowing individual glyph positioning. Each +element of array shall be either a string or a number. +""" +import typing +from decimal import Decimal +from typing import List + +from borb.io.read.types import AnyPDFType, Name, String, HexadecimalString +from borb.io.write.font.copy_command_operator import CopyCommandOperator +from borb.pdf.canvas.font.font import Font +from borb.pdf.canvas.operator.text.show_text_with_glyph_positioning import ( + ShowTextWithGlyphPositioning, +) + + +class SubSetShowTextWithGlyphPositioning(CopyCommandOperator): + """ + Show one or more text strings, allowing individual glyph positioning. Each + element of array shall be either a string or a number. If the element is a + string, this operator shall show the string. If it is a number, the operator + shall adjust the text position by that amount; that is, it shall translate the + text matrix, T . The number shall be expressed in thousandths of a unit + mof text space (see 9.4.4, "Text Space Details"). This amount shall be + subtracted from the current horizontal or vertical coordinate, depending + on the writing mode. In the default coordinate system, a positive + adjustment has the effect of moving the next glyph painted either to the + left or down by the given amount. Figure 46 shows an example of the + effect of passing offsets to TJ. + """ + + def __init__( + self, old_fonts: typing.List[Font], new_fonts: typing.List[Font], s: bytearray + ): + super(SubSetShowTextWithGlyphPositioning, self).__init__( + ShowTextWithGlyphPositioning(), s + ) + self._old_fonts: typing.List[Font] = old_fonts + self._new_fonts: typing.List[Font] = new_fonts + self._s: bytearray = s + + def _to_hex(self, i: int) -> str: + s: str = hex(int(i))[2:] + while len(s) < 2: + s = "0" + s + return s + + def invoke( + self, + canvas_stream_processor: "CanvasStreamProcessor", # type: ignore [name-defined] + operands: typing.List[AnyPDFType] = [], + event_listeners: typing.List["EventListener"] = [], # type: ignore [name-defined] + ) -> None: + """ + Invoke the TJ operator + """ + + assert isinstance(operands[0], List), "Operand 0 of TJ must be a List" + canvas = canvas_stream_processor.get_canvas() + + # handle Font being a Name (optimization) + assert canvas.graphics_state.font is not None + font_name: typing.Optional[Name] = None + if isinstance(canvas.graphics_state.font, Name): + # fmt: off + font_name = canvas.graphics_state.font + canvas.graphics_state.font = canvas_stream_processor.get_resource("Font", canvas.graphics_state.font) + # fmt: on + + # we're only interested in the old_font + if canvas.graphics_state.font not in self._old_fonts: + return super(SubSetShowTextWithGlyphPositioning, self).invoke( + canvas_stream_processor, operands, event_listeners + ) + + old_font: Font = canvas.graphics_state.font + new_font: Font = self._new_fonts[self._old_fonts.index(old_font)] + + # modify the operands + operands_out: typing.List[AnyPDFType] = [] + for i in range(0, len(operands[0])): + obj = operands[0][i] + + # adjust + if isinstance(obj, Decimal): + operands_out.append(obj) + continue + + # display string + if isinstance(obj, String): + old_char: str = old_font.character_identifier_to_unicode( + int(str(obj), 16) + ) + new_code: str = self._to_hex( + new_font.unicode_to_character_identifier(old_char) + ) + operands_out.append(HexadecimalString(new_code)) + + # delegate + return super(SubSetShowTextWithGlyphPositioning, self).invoke( + canvas_stream_processor, [operands_out], event_listeners + ) diff --git a/borb/io/write/font/subsetter.py b/borb/io/write/font/subsetter.py new file mode 100644 index 000000000..93742047d --- /dev/null +++ b/borb/io/write/font/subsetter.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +This class attempts to optimize a Type0Font by performing subsetting. +Subsetting is performed using fontTools.subset, after which the dictionaries are updated in the +Type0Font, the page content is also changed, updating the TJ instructions to refer to the new GIDs. +""" +import io +import random +import typing +import zlib + +from fontTools.subset import Subsetter as fSubsetter +from fontTools.ttLib import TTFont + +from borb.io.read.types import Decimal as bDecimal, Name, String, Stream +from borb.io.write.font.character_set_listener import CharacterSetListener +from borb.io.write.font.copy_command_operator import CopyCommandOperator +from borb.io.write.font.subset_show_text_with_glyph_positioning import ( + SubSetShowTextWithGlyphPositioning, +) +from borb.pdf import Page +from borb.pdf.canvas.canvas import Canvas +from borb.pdf.canvas.canvas_stream_processor import CanvasStreamProcessor +from borb.pdf.canvas.font.composite_font.font_type_0 import Type0Font +from borb.pdf.canvas.font.font import Font +from borb.pdf.canvas.font.simple_font.true_type_font import TrueTypeFont + + +class Subsetter: + """ + This class attempts to optimize a Type0Font by performing subsetting. + Subsetting is performed using fontTools.subset, after which the dictionaries are updated in the + Type0Font, the page content is also changed, updating the TJ instructions to refer to the new GIDs. + """ + + @staticmethod + def _extract_text_per_font(page: "Page") -> typing.Dict[Font, typing.Set[str]]: + csp = CanvasStreamProcessor(page, Canvas(), []) + l: CharacterSetListener = CharacterSetListener() + csp.read(io.BytesIO(page["Contents"]["DecodedBytes"]), [l]) + return l.get_character_set_per_font() + + @staticmethod + def _modify_page_content_stream( + page: Page, old_fonts: typing.List[Font], new_fonts: typing.List[Font] + ): + + # build CanvasStreamProcessor + csp = CanvasStreamProcessor(page, Canvas(), []) + + # new content stream + new_content_stream: bytearray = bytearray() + + # modify operators + for k, v in csp._canvas_operators.items(): + csp._canvas_operators[k] = CopyCommandOperator(v, new_content_stream) + + # rewrite the operands for Tf + csp._canvas_operators["TJ"] = SubSetShowTextWithGlyphPositioning( + old_fonts, new_fonts, new_content_stream + ) + + # process page + csp.read(io.BytesIO(page["Contents"]["DecodedBytes"])) + + # modify Contents + page["Contents"][Name("DecodedBytes")] = new_content_stream + page["Contents"][Name("Bytes")] = zlib.compress(new_content_stream, 9) + page["Contents"][Name("Filter")] = Name("FlateDecode") + page["Contents"][Name("Length")] = bDecimal(len(new_content_stream)) + + # return + return page + + @staticmethod + def apply(page: Page) -> Page: + """ + This function applies Font subsetting to the input Page and returns the Page afterwards + :param page: the Page on which to apply Font subsetting + :return: the Page with Font subsetting + """ + if "Resources" not in page: + return page + if not isinstance(page["Resources"], dict): + return page + if "Font" not in page["Resources"]: + return page + + # determine which fonts to apply subsetting to + fonts_to_be_subset: typing.List[Type0Font] = [ + x for x in page["Resources"]["Font"].values() if isinstance(x, Type0Font) + ] + if len(fonts_to_be_subset) == 0: + return page + + # determine character set for each Type0Font + characters_per_font: typing.Dict[ + Font, typing.Set[str] + ] = Subsetter._extract_text_per_font(page) + + # update which fonts to apply subsetting to + fonts_to_be_subset = [ + x for x in fonts_to_be_subset if len(characters_per_font[x]) < 256 + ] + if len(fonts_to_be_subset) == 0: + return page + + subset_fonts: typing.List[Font] = [] + for old_font in fonts_to_be_subset: + + # get DecodedBytes + font_file_bytes_001 = old_font["DescendantFonts"][0]["FontDescriptor"][ + "FontFile2" + ]["DecodedBytes"] + ttfont: TTFont = TTFont(io.BytesIO(font_file_bytes_001)) + + # perform subsetting + subsetter = fSubsetter() + subsetter.options.recalc_bounds = True + subsetter.options.recalc_average_width = True + subsetter.populate(text="".join([x for x in characters_per_font[old_font]])) + subsetter.subset(ttfont) + + # determine (modified) DecodedBytes + with io.BytesIO() as font_file_bytes_002: + ttfont.save(font_file_bytes_002) + font_file_bytes_002 = font_file_bytes_002.getvalue() + + # build TrueTypeFont + # fmt: off + new_font: TrueTypeFont = TrueTypeFont.true_type_font_from_file(font_file_bytes_002) + basefont_prefix: str = "".join([random.choice("ABCDEFGHIJKLMNOPQRSTUVWXYZ") for _ in range(0, 6)]) + new_font[Name("BaseFont")] = Name(basefont_prefix + "+" + str(new_font[Name("BaseFont")])) + new_font["FontDescriptor"][Name("FontName")] = new_font[Name("BaseFont")] + new_font[Name("ToUnicode")] = TrueTypeFont._build_custom_cmap_for_type_0_font(ttfont) + new_font.pop(Name("Encoding")) + + # fmt: on + subset_fonts.append(new_font) + + # change Page / Contents + Subsetter._modify_page_content_stream(page, fonts_to_be_subset, subset_fonts) + + # change Page / Resources / Font + for k, old_font in page["Resources"]["Font"].items(): + if old_font not in fonts_to_be_subset: + continue + new_font: Font = subset_fonts[fonts_to_be_subset.index(old_font)] + page["Resources"]["Font"][k] = new_font + + # return + return page diff --git a/borb/io/write/page/page_transformer.py b/borb/io/write/page/page_transformer.py index 3bb013013..e50d4bb83 100644 --- a/borb/io/write/page/page_transformer.py +++ b/borb/io/write/page/page_transformer.py @@ -9,6 +9,7 @@ from typing import Optional from borb.io.read.types import AnyPDFType, Dictionary, Name +from borb.io.write.font.subsetter import Subsetter from borb.io.write.object.dictionary_transformer import DictionaryTransformer from borb.io.write.transformer import WriteTransformerState from borb.pdf.document.document import Document @@ -53,5 +54,9 @@ def transform( if k in object_to_transform: object_to_transform[k].set_is_inline(True) # type: ignore [attr-defined] + # apply subsetting + if context.apply_font_subsetting: + page = Subsetter.apply(object_to_transform) + # delegate to super super(PageTransformer, self).transform(object_to_transform, context) diff --git a/borb/io/write/transformer.py b/borb/io/write/transformer.py index 1c1385abe..950243d61 100644 --- a/borb/io/write/transformer.py +++ b/borb/io/write/transformer.py @@ -37,6 +37,7 @@ def __init__( self.resolved_references: typing.List[Reference] = [] # these references have already been written self.compression_level: int = 9 # default compression level self.conformance_level: typing.Optional[ConformanceLevel] = conformance_level # default conformance level + self.apply_font_subsetting: bool = False # whether to apply Font subsetting or not # fmt: on @@ -173,15 +174,20 @@ def get_reference( This function builds a Reference for the input object References are re-used whenever possible (hashing is used to detect duplicate objects) """ + is_unique: bool = False + try: + is_unique = object.is_unique() + except: + pass obj_id = id(object) - if obj_id in context.indirect_objects_by_id: + if (not is_unique) and obj_id in context.indirect_objects_by_id: cached_indirect_object: AnyPDFType = context.indirect_objects_by_id[obj_id] assert not isinstance(cached_indirect_object, Reference) return cached_indirect_object.get_reference() # type: ignore [union-attr] # look through existing indirect object hashes obj_hash: int = self._hash(object) - if obj_hash in context.indirect_objects_by_hash: + if (not is_unique) and obj_hash in context.indirect_objects_by_hash: for obj in context.indirect_objects_by_hash[obj_hash]: if obj == object: ref = obj.get_reference() # type: ignore [union-attr] diff --git a/borb/pdf/canvas/font/simple_font/true_type_font.py b/borb/pdf/canvas/font/simple_font/true_type_font.py index 0d3f60d02..78452b2c0 100644 --- a/borb/pdf/canvas/font/simple_font/true_type_font.py +++ b/borb/pdf/canvas/font/simple_font/true_type_font.py @@ -6,6 +6,7 @@ available in Apple’s TrueType Reference Manual and Microsoft’s TrueType 1.0 Font Files Technical Specification (see Bibliography). """ +import io import typing import zlib from decimal import Decimal @@ -38,21 +39,26 @@ class TrueTypeFont(Type1Font): @staticmethod def true_type_font_from_file( - path_to_font_file: Path, + font_file: typing.Union[Path, bytes], ) -> typing.Union["TrueTypeFont", "Type0Font"]: """ This function returns the PDF TrueTypeFont object for a given TTF file """ - assert path_to_font_file.exists() - assert path_to_font_file.name.endswith(".ttf") + if isinstance(font_file, Path): + assert font_file.exists() + assert font_file.name.endswith(".ttf") + # read bytes if needed font_file_bytes: typing.Optional[bytes] = None - with open(path_to_font_file, "rb") as ffh: - font_file_bytes = ffh.read() - assert font_file_bytes + if isinstance(font_file, Path): + with open(font_file, "rb") as ffh: + font_file_bytes = ffh.read() + assert font_file_bytes + else: + font_file_bytes = font_file # read file - ttf_font_file: TTFont = TTFont(path_to_font_file) + ttf_font_file: TTFont = TTFont(io.BytesIO(font_file_bytes)) # read cmap cmap: typing.Optional[typing.Dict[int, str]] = ttf_font_file.getBestCmap() @@ -84,8 +90,10 @@ def true_type_font_from_file( # build widths units_per_em: bDecimal = bDecimal(ttf_font_file["head"].unitsPerEm) if cmap is not None: - font[Name("FirstChar")] = bDecimal(0) - font[Name("LastChar")] = bDecimal(len(glyph_order)) + # fmt: off + font[Name("FirstChar")] = bDecimal(min([cid for cid, _ in enumerate(glyph_order)])) + font[Name("LastChar")] = bDecimal(max([cid for cid, _ in enumerate(glyph_order)])) + # fmt: on font[Name("Widths")] = List() for glyph_name in glyph_order: w: typing.Union[bDecimal, Decimal] = ( @@ -109,9 +117,9 @@ def true_type_font_from_file( font["Encoding"]["Differences"].append(Name(glyph_order[i])) # embed font file - font["FontDescriptor"][Name("FontFile2")] = TrueTypeFont._get_font_file_stream( - font_file_bytes - ) + # fmt: off + font["FontDescriptor"][Name("FontFile2")] = TrueTypeFont._get_font_file_stream(font_file_bytes) + # fmt: on # return return font @@ -120,7 +128,6 @@ def true_type_font_from_file( def _get_font_file_stream(font_file_bytes: bytes) -> Stream: font_stream: Stream = Stream() font_stream[Name("Type")] = Name("Font") - font_stream[Name("Subtype")] = Name("TrueType") font_stream[Name("Length")] = bDecimal(len(font_file_bytes)) font_stream[Name("Length1")] = bDecimal(len(font_file_bytes)) font_stream[Name("Filter")] = Name("FlateDecode") @@ -207,7 +214,6 @@ def _build_custom_cmap_for_type_0_font(ttf_font_file: TTFont) -> Stream: <0000> endcodespacerange """ - # 1 beginbfchar # <0000> <0000> # endbfchar diff --git a/borb/pdf/canvas/layout/forms/check_box.py b/borb/pdf/canvas/layout/forms/check_box.py index e0b241a06..fdb225168 100644 --- a/borb/pdf/canvas/layout/forms/check_box.py +++ b/borb/pdf/canvas/layout/forms/check_box.py @@ -84,12 +84,14 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget appearance dictionary widget_appearance_dictionary: Dictionary = Dictionary() widget_appearance_dictionary[Name("N")] = widget_normal_appearance + widget_appearance_dictionary.set_is_unique(True) # type: ignore [attr-defined] # get Catalog catalog: Dictionary = page.get_root()["XRef"]["Trailer"]["Root"] # type: ignore [attr-defined] # widget dictionary self._widget_dictionary = Dictionary() + self._widget_dictionary.set_is_unique(True) # type: ignore [attr-defined] self._widget_dictionary[Name("Type")] = Name("Annot") self._widget_dictionary[Name("Subtype")] = Name("Widget") self._widget_dictionary[Name("F")] = bDecimal(4) diff --git a/borb/pdf/canvas/layout/forms/drop_down_list.py b/borb/pdf/canvas/layout/forms/drop_down_list.py index 9da9643c9..4db6958d0 100644 --- a/borb/pdf/canvas/layout/forms/drop_down_list.py +++ b/borb/pdf/canvas/layout/forms/drop_down_list.py @@ -89,6 +89,7 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget appearance dictionary widget_appearance_dictionary: Dictionary = Dictionary() + widget_appearance_dictionary.set_is_unique(True) # type: ignore [attr-defined] widget_appearance_dictionary[Name("N")] = widget_normal_appearance # get Catalog @@ -96,6 +97,7 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget dictionary self._widget_dictionary = Dictionary() + self._widget_dictionary.set_is_unique(True) self._widget_dictionary[Name("Type")] = Name("Annot") self._widget_dictionary[Name("Subtype")] = Name("Widget") self._widget_dictionary[Name("F")] = bDecimal(4) diff --git a/borb/pdf/canvas/layout/forms/form_field.py b/borb/pdf/canvas/layout/forms/form_field.py index 4ee490b39..0edd9f130 100644 --- a/borb/pdf/canvas/layout/forms/form_field.py +++ b/borb/pdf/canvas/layout/forms/form_field.py @@ -17,7 +17,7 @@ class FormField(LayoutElement): This implementation of LayoutElement acts as a common base class to form fields. """ - def _get_auto_generated_field_name(self, page: Page) -> str: + def _count_fields_on_page(self, page: Page) -> int: number_of_fields: int = 0 acroform_dict: Dictionary = page.get_root()["XRef"]["Trailer"]["Root"].get( # type: ignore [attr-defined] "AcroForm", Dictionary() @@ -40,7 +40,10 @@ def _get_auto_generated_field_name(self, page: Page) -> str: if isinstance(d, List): for c in d: stk.append(c) - return "field-{0:03d}".format(number_of_fields) + return number_of_fields + + def _get_auto_generated_field_name(self, page: Page) -> str: + return "field-{0:03d}".format(self._count_fields_on_page(page)) def _get_font_resource_name(self, font: Font, page: Page): # create resources if needed diff --git a/borb/pdf/canvas/layout/forms/push_button.py b/borb/pdf/canvas/layout/forms/push_button.py index a9faa8279..70a28b1c9 100644 --- a/borb/pdf/canvas/layout/forms/push_button.py +++ b/borb/pdf/canvas/layout/forms/push_button.py @@ -101,6 +101,7 @@ def _init_widget_dictionary(self, page: Page) -> None: # widget dictionary # fmt: off self._widget_dictionary = Dictionary() + self._widget_dictionary.set_is_unique(True) self._widget_dictionary[Name("AA")] = Dictionary() self._widget_dictionary[Name("AA")][Name("D")] = Dictionary() self._widget_dictionary[Name("AA")][Name("D")][Name("Type")] = Name("Action") diff --git a/borb/pdf/canvas/layout/forms/text_area.py b/borb/pdf/canvas/layout/forms/text_area.py index e361e19d8..b971e6999 100644 --- a/borb/pdf/canvas/layout/forms/text_area.py +++ b/borb/pdf/canvas/layout/forms/text_area.py @@ -97,6 +97,7 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget appearance dictionary widget_appearance_dictionary: Dictionary = Dictionary() + widget_appearance_dictionary.set_is_unique(True) # type: ignore [attr-defined] widget_appearance_dictionary[Name("N")] = widget_normal_appearance # get Catalog @@ -105,6 +106,7 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget dictionary # fmt: off self._widget_dictionary = Dictionary() + self._widget_dictionary.set_is_unique(True) self._widget_dictionary[Name("Type")] = Name("Annot") self._widget_dictionary[Name("Subtype")] = Name("Widget") self._widget_dictionary[Name("F")] = bDecimal(4) diff --git a/borb/pdf/canvas/layout/forms/text_field.py b/borb/pdf/canvas/layout/forms/text_field.py index e5a25618d..ae025da0a 100644 --- a/borb/pdf/canvas/layout/forms/text_field.py +++ b/borb/pdf/canvas/layout/forms/text_field.py @@ -4,6 +4,7 @@ """ This implementation of FormField represents a text field. """ +import random import typing import zlib @@ -84,17 +85,16 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: widget_normal_appearance["BBox"].append(bDecimal(layout_box.width)) widget_normal_appearance["BBox"].append(bDecimal(self._font_size)) widget_normal_appearance[Name("Resources")] = widget_resources + # fmt: off widget_normal_appearance[Name("DecodedBytes")] = b"/Tx BMC EMC" - widget_normal_appearance[Name("Bytes")] = zlib.compress( - widget_normal_appearance[Name("DecodedBytes")], 9 - ) + widget_normal_appearance[Name("Bytes")] = zlib.compress(widget_normal_appearance[Name("DecodedBytes")], 9) widget_normal_appearance[Name("Filter")] = Name("FlateDecode") - widget_normal_appearance[Name("Length")] = bDecimal( - len(widget_normal_appearance[Name("Bytes")]) - ) + widget_normal_appearance[Name("Length")] = bDecimal(len(widget_normal_appearance[Name("Bytes")])) + # fmt: on # widget appearance dictionary widget_appearance_dictionary: Dictionary = Dictionary() + widget_appearance_dictionary.set_is_unique(True) # type: ignore [attr-defined] widget_appearance_dictionary[Name("N")] = widget_normal_appearance # get Catalog @@ -103,6 +103,7 @@ def _init_widget_dictionary(self, page: Page, layout_box: Rectangle) -> None: # widget dictionary # fmt: off self._widget_dictionary = Dictionary() + self._widget_dictionary.set_is_unique(True) self._widget_dictionary[Name("Type")] = Name("Annot") self._widget_dictionary[Name("Subtype")] = Name("Widget") self._widget_dictionary[Name("F")] = bDecimal(4) diff --git a/borb/pdf/canvas/layout/page_layout/header_footer_multi_column_layout.py b/borb/pdf/canvas/layout/page_layout/header_footer_multi_column_layout.py index b4d111c3b..0f32892be 100644 --- a/borb/pdf/canvas/layout/page_layout/header_footer_multi_column_layout.py +++ b/borb/pdf/canvas/layout/page_layout/header_footer_multi_column_layout.py @@ -102,6 +102,11 @@ def _add_header_footer_to_current_page(self) -> None: ) def switch_to_next_page(self) -> "PageLayout": + """ + This function forces this PageLayout to switch to the nex Page + This function returns self. + :return: self + """ # call super super(HeaderFooterMultiColumnLayout, self).switch_to_next_page() diff --git a/release_notes.md b/release_notes.md index 4b4f4af6c..7fc412af8 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,4 +1,6 @@ -# :mega: borb release 2.0.29 +# :mega: borb release 2.0.30 This release is a feature release. -- Remove the unneeded resources (`tests` and `doc`) from the build \ No newline at end of file +- Initial support for `Font` subsetting in PDF +- Small fix for `TextField` appearance dictionary +- Small fix for `CheckBox` appearance dictionary \ No newline at end of file diff --git a/setup.py b/setup.py index d81e73768..f3858c1c7 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setuptools.setup( name="borb", - version="2.0.29", + version="2.0.30", author="Joris Schellekens", author_email="joris.schellekens.1989@gmail.com", description="borb is a library for reading, creating and manipulating PDF files in python.", diff --git a/tests/corpus/test_extract_text_expect_ground_truth.py b/tests/corpus/test_extract_text_expect_ground_truth.py index 8aad0ac31..08161fb62 100644 --- a/tests/corpus/test_extract_text_expect_ground_truth.py +++ b/tests/corpus/test_extract_text_expect_ground_truth.py @@ -52,7 +52,7 @@ def test_against_specific_file(self): self._test_list_of_documents(pdfs) plt.close("all") - # @unittest.skip + @unittest.skip def test_against_entire_corpus(self): pdf_file_names = os.listdir(self.corpus_dir) pdfs = [ diff --git a/tests/output/test_add_all_rubber_stamp_annotations/output.pdf b/tests/output/test_add_all_rubber_stamp_annotations/output.pdf index 056d63a09..5b6ad5287 100644 Binary files a/tests/output/test_add_all_rubber_stamp_annotations/output.pdf and b/tests/output/test_add_all_rubber_stamp_annotations/output.pdf differ diff --git a/tests/output/test_add_circle_annotation/output.pdf b/tests/output/test_add_circle_annotation/output.pdf index 9858084b5..6ad4b70ae 100644 Binary files a/tests/output/test_add_circle_annotation/output.pdf and b/tests/output/test_add_circle_annotation/output.pdf differ diff --git a/tests/output/test_add_free_text_annotation/output_001.pdf b/tests/output/test_add_free_text_annotation/output_001.pdf index a919b9b84..05a6d0d15 100644 Binary files a/tests/output/test_add_free_text_annotation/output_001.pdf and b/tests/output/test_add_free_text_annotation/output_001.pdf differ diff --git a/tests/output/test_add_free_text_annotation/output_002.pdf b/tests/output/test_add_free_text_annotation/output_002.pdf index 9e9cfb6a4..73c7002d9 100644 Binary files a/tests/output/test_add_free_text_annotation/output_002.pdf and b/tests/output/test_add_free_text_annotation/output_002.pdf differ diff --git a/tests/output/test_add_highlight_annotation/output_001.pdf b/tests/output/test_add_highlight_annotation/output_001.pdf index a1da68362..e76258456 100644 Binary files a/tests/output/test_add_highlight_annotation/output_001.pdf and b/tests/output/test_add_highlight_annotation/output_001.pdf differ diff --git a/tests/output/test_add_highlight_annotation/output_002.pdf b/tests/output/test_add_highlight_annotation/output_002.pdf index 668ec2f62..0aab811fe 100644 Binary files a/tests/output/test_add_highlight_annotation/output_002.pdf and b/tests/output/test_add_highlight_annotation/output_002.pdf differ diff --git a/tests/output/test_add_large_amount_of_headings/output_001.pdf b/tests/output/test_add_large_amount_of_headings/output_001.pdf index d8dfb3e82..73c0c6d79 100644 Binary files a/tests/output/test_add_large_amount_of_headings/output_001.pdf and b/tests/output/test_add_large_amount_of_headings/output_001.pdf differ diff --git a/tests/output/test_add_large_amount_of_headings/output_002.pdf b/tests/output/test_add_large_amount_of_headings/output_002.pdf index 33850cca9..21aed1056 100644 Binary files a/tests/output/test_add_large_amount_of_headings/output_002.pdf and b/tests/output/test_add_large_amount_of_headings/output_002.pdf differ diff --git a/tests/output/test_add_line_annotation/output_001.pdf b/tests/output/test_add_line_annotation/output_001.pdf index c640dab35..a4387b2f5 100644 Binary files a/tests/output/test_add_line_annotation/output_001.pdf and b/tests/output/test_add_line_annotation/output_001.pdf differ diff --git a/tests/output/test_add_line_annotation/output_002.pdf b/tests/output/test_add_line_annotation/output_002.pdf index 7428c621e..c796d1a0f 100644 Binary files a/tests/output/test_add_line_annotation/output_002.pdf and b/tests/output/test_add_line_annotation/output_002.pdf differ diff --git a/tests/output/test_add_outline/output_001.pdf b/tests/output/test_add_outline/output_001.pdf index a8d5bf3ea..fda382cd5 100644 Binary files a/tests/output/test_add_outline/output_001.pdf and b/tests/output/test_add_outline/output_001.pdf differ diff --git a/tests/output/test_add_outline/output_002.pdf b/tests/output/test_add_outline/output_002.pdf index fe0879c06..7bd245aa6 100644 Binary files a/tests/output/test_add_outline/output_002.pdf and b/tests/output/test_add_outline/output_002.pdf differ diff --git a/tests/output/test_add_polygon_annotation_using_line_art_factory/output.pdf b/tests/output/test_add_polygon_annotation_using_line_art_factory/output.pdf index c4a6cc8d5..78ff0fb5a 100644 Binary files a/tests/output/test_add_polygon_annotation_using_line_art_factory/output.pdf and b/tests/output/test_add_polygon_annotation_using_line_art_factory/output.pdf differ diff --git a/tests/output/test_add_polyline_annotation_using_line_art_factory/output.pdf b/tests/output/test_add_polyline_annotation_using_line_art_factory/output.pdf index 3574620a6..706d4ed61 100644 Binary files a/tests/output/test_add_polyline_annotation_using_line_art_factory/output.pdf and b/tests/output/test_add_polyline_annotation_using_line_art_factory/output.pdf differ diff --git a/tests/output/test_add_redact_annotation/output_001.pdf b/tests/output/test_add_redact_annotation/output_001.pdf index 8c4516fa1..2f6b09080 100644 Binary files a/tests/output/test_add_redact_annotation/output_001.pdf and b/tests/output/test_add_redact_annotation/output_001.pdf differ diff --git a/tests/output/test_add_redact_annotation/output_002.pdf b/tests/output/test_add_redact_annotation/output_002.pdf index e4e5c60fb..5928b842a 100644 Binary files a/tests/output/test_add_redact_annotation/output_002.pdf and b/tests/output/test_add_redact_annotation/output_002.pdf differ diff --git a/tests/output/test_add_redact_annotation/output_003.pdf b/tests/output/test_add_redact_annotation/output_003.pdf index 100ac3d75..afe01274f 100644 Binary files a/tests/output/test_add_redact_annotation/output_003.pdf and b/tests/output/test_add_redact_annotation/output_003.pdf differ diff --git a/tests/output/test_add_redact_annotation/output_004.pdf b/tests/output/test_add_redact_annotation/output_004.pdf index c4c2e5c7c..1fa6acdbf 100644 Binary files a/tests/output/test_add_redact_annotation/output_004.pdf and b/tests/output/test_add_redact_annotation/output_004.pdf differ diff --git a/tests/output/test_add_redact_annotation/output_005.pdf b/tests/output/test_add_redact_annotation/output_005.pdf index 811631e64..fa195e6e0 100644 Binary files a/tests/output/test_add_redact_annotation/output_005.pdf and b/tests/output/test_add_redact_annotation/output_005.pdf differ diff --git a/tests/output/test_add_remote_go_to_annotation/output_001.pdf b/tests/output/test_add_remote_go_to_annotation/output_001.pdf index a9d0080c5..59f7d01e6 100644 Binary files a/tests/output/test_add_remote_go_to_annotation/output_001.pdf and b/tests/output/test_add_remote_go_to_annotation/output_001.pdf differ diff --git a/tests/output/test_add_remote_go_to_annotation/output_002.pdf b/tests/output/test_add_remote_go_to_annotation/output_002.pdf index 58f16468b..229a4cc85 100644 Binary files a/tests/output/test_add_remote_go_to_annotation/output_002.pdf and b/tests/output/test_add_remote_go_to_annotation/output_002.pdf differ diff --git a/tests/output/test_add_sound_annotation/output_001.pdf b/tests/output/test_add_sound_annotation/output_001.pdf index 7774cedce..44fcfaa42 100644 Binary files a/tests/output/test_add_sound_annotation/output_001.pdf and b/tests/output/test_add_sound_annotation/output_001.pdf differ diff --git a/tests/output/test_add_sound_annotation/output_002.pdf b/tests/output/test_add_sound_annotation/output_002.pdf index c8fd82297..9167bfe36 100644 Binary files a/tests/output/test_add_sound_annotation/output_002.pdf and b/tests/output/test_add_sound_annotation/output_002.pdf differ diff --git a/tests/output/test_add_square_annotation/output.pdf b/tests/output/test_add_square_annotation/output.pdf index f5e746bf4..043540daf 100644 Binary files a/tests/output/test_add_square_annotation/output.pdf and b/tests/output/test_add_square_annotation/output.pdf differ diff --git a/tests/output/test_add_square_annotation_in_free_space/output_001.pdf b/tests/output/test_add_square_annotation_in_free_space/output_001.pdf index 3fb0196e5..a300d85a4 100644 Binary files a/tests/output/test_add_square_annotation_in_free_space/output_001.pdf and b/tests/output/test_add_square_annotation_in_free_space/output_001.pdf differ diff --git a/tests/output/test_add_square_annotation_in_free_space/output_002.pdf b/tests/output/test_add_square_annotation_in_free_space/output_002.pdf index 14e32f9f9..fe1da9218 100644 Binary files a/tests/output/test_add_square_annotation_in_free_space/output_002.pdf and b/tests/output/test_add_square_annotation_in_free_space/output_002.pdf differ diff --git a/tests/output/test_add_squiggle_annotation/output_001.pdf b/tests/output/test_add_squiggle_annotation/output_001.pdf index 7c9b58f8f..d5f53f5e0 100644 Binary files a/tests/output/test_add_squiggle_annotation/output_001.pdf and b/tests/output/test_add_squiggle_annotation/output_001.pdf differ diff --git a/tests/output/test_add_squiggle_annotation/output_002.pdf b/tests/output/test_add_squiggle_annotation/output_002.pdf index 3592a8fd7..3a37c3624 100644 Binary files a/tests/output/test_add_squiggle_annotation/output_002.pdf and b/tests/output/test_add_squiggle_annotation/output_002.pdf differ diff --git a/tests/output/test_add_strikeout_annotation/output_001.pdf b/tests/output/test_add_strikeout_annotation/output_001.pdf index 2486f98e2..c093951e3 100644 Binary files a/tests/output/test_add_strikeout_annotation/output_001.pdf and b/tests/output/test_add_strikeout_annotation/output_001.pdf differ diff --git a/tests/output/test_add_strikeout_annotation/output_002.pdf b/tests/output/test_add_strikeout_annotation/output_002.pdf index fecb50e3e..62549346a 100644 Binary files a/tests/output/test_add_strikeout_annotation/output_002.pdf and b/tests/output/test_add_strikeout_annotation/output_002.pdf differ diff --git a/tests/output/test_add_super_mario_annotation/output.pdf b/tests/output/test_add_super_mario_annotation/output.pdf index d393ef3ae..0fa71b5cf 100644 Binary files a/tests/output/test_add_super_mario_annotation/output.pdf and b/tests/output/test_add_super_mario_annotation/output.pdf differ diff --git a/tests/output/test_add_text_annotation/output_001.pdf b/tests/output/test_add_text_annotation/output_001.pdf index b806a7410..6a8159fa3 100644 Binary files a/tests/output/test_add_text_annotation/output_001.pdf and b/tests/output/test_add_text_annotation/output_001.pdf differ diff --git a/tests/output/test_add_text_annotation/output_002.pdf b/tests/output/test_add_text_annotation/output_002.pdf index 84fd8483a..786d283a1 100644 Binary files a/tests/output/test_add_text_annotation/output_002.pdf and b/tests/output/test_add_text_annotation/output_002.pdf differ diff --git a/tests/output/test_add_underline_annotation/output_001.pdf b/tests/output/test_add_underline_annotation/output_001.pdf index e8a76fece..b0cd07b1b 100644 Binary files a/tests/output/test_add_underline_annotation/output_001.pdf and b/tests/output/test_add_underline_annotation/output_001.pdf differ diff --git a/tests/output/test_add_underline_annotation/output_002.pdf b/tests/output/test_add_underline_annotation/output_002.pdf index 688b8c3f7..00a3b1a4a 100644 Binary files a/tests/output/test_add_underline_annotation/output_002.pdf and b/tests/output/test_add_underline_annotation/output_002.pdf differ diff --git a/tests/output/test_analogous_color_scheme/output.pdf b/tests/output/test_analogous_color_scheme/output.pdf index 9474a4171..b7dc68828 100644 Binary files a/tests/output/test_analogous_color_scheme/output.pdf and b/tests/output/test_analogous_color_scheme/output.pdf differ diff --git a/tests/output/test_annotation_name/output.pdf b/tests/output/test_annotation_name/output.pdf index 82372f32f..e1494ab0f 100644 Binary files a/tests/output/test_annotation_name/output.pdf and b/tests/output/test_annotation_name/output.pdf differ diff --git a/tests/output/test_append_embedded_file/output_001.pdf b/tests/output/test_append_embedded_file/output_001.pdf index 0d2a6e9ce..150d5e413 100644 Binary files a/tests/output/test_append_embedded_file/output_001.pdf and b/tests/output/test_append_embedded_file/output_001.pdf differ diff --git a/tests/output/test_append_embedded_file/output_002.pdf b/tests/output/test_append_embedded_file/output_002.pdf index c6f434f06..38275baee 100644 Binary files a/tests/output/test_append_embedded_file/output_002.pdf and b/tests/output/test_append_embedded_file/output_002.pdf differ diff --git a/tests/output/test_append_embedded_javascript/output_001.pdf b/tests/output/test_append_embedded_javascript/output_001.pdf index 56730aea7..220082ebf 100644 Binary files a/tests/output/test_append_embedded_javascript/output_001.pdf and b/tests/output/test_append_embedded_javascript/output_001.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_001.pdf b/tests/output/test_apply_redaction_annotations/output_001.pdf index dc6598970..6e522afba 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_001.pdf and b/tests/output/test_apply_redaction_annotations/output_001.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_002.pdf b/tests/output/test_apply_redaction_annotations/output_002.pdf index ff11b79d9..45f42267c 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_002.pdf and b/tests/output/test_apply_redaction_annotations/output_002.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_003.pdf b/tests/output/test_apply_redaction_annotations/output_003.pdf index b6000fc43..742afc073 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_003.pdf and b/tests/output/test_apply_redaction_annotations/output_003.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_004.pdf b/tests/output/test_apply_redaction_annotations/output_004.pdf index e7fc9613c..2dc8ec4e8 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_004.pdf and b/tests/output/test_apply_redaction_annotations/output_004.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_005.pdf b/tests/output/test_apply_redaction_annotations/output_005.pdf index b8cd8e630..ee0dedaff 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_005.pdf and b/tests/output/test_apply_redaction_annotations/output_005.pdf differ diff --git a/tests/output/test_apply_redaction_annotations/output_006.pdf b/tests/output/test_apply_redaction_annotations/output_006.pdf index 5127a4f9e..a836fc40f 100644 Binary files a/tests/output/test_apply_redaction_annotations/output_006.pdf and b/tests/output/test_apply_redaction_annotations/output_006.pdf differ diff --git a/tests/output/test_browser_layout_inline_next_line/output.pdf b/tests/output/test_browser_layout_inline_next_line/output.pdf index 8d1eefcfb..6800da8c5 100644 Binary files a/tests/output/test_browser_layout_inline_next_line/output.pdf and b/tests/output/test_browser_layout_inline_next_line/output.pdf differ diff --git a/tests/output/test_build_matryoskha_pdf/output.pdf b/tests/output/test_build_matryoskha_pdf/output.pdf index bdb23f5e6..4adf32f1c 100644 Binary files a/tests/output/test_build_matryoskha_pdf/output.pdf and b/tests/output/test_build_matryoskha_pdf/output.pdf differ diff --git a/tests/output/test_change_info_dictionary_author/output_001.pdf b/tests/output/test_change_info_dictionary_author/output_001.pdf index 10a2d58c0..634d7dcbb 100644 Binary files a/tests/output/test_change_info_dictionary_author/output_001.pdf and b/tests/output/test_change_info_dictionary_author/output_001.pdf differ diff --git a/tests/output/test_change_info_dictionary_author/output_002.pdf b/tests/output/test_change_info_dictionary_author/output_002.pdf index 8a76bc737..e4c255fc3 100644 Binary files a/tests/output/test_change_info_dictionary_author/output_002.pdf and b/tests/output/test_change_info_dictionary_author/output_002.pdf differ diff --git a/tests/output/test_concat_documents/output_000.pdf b/tests/output/test_concat_documents/output_000.pdf index d5a3b5428..fbaad5b3a 100644 Binary files a/tests/output/test_concat_documents/output_000.pdf and b/tests/output/test_concat_documents/output_000.pdf differ diff --git a/tests/output/test_concat_documents/output_001.pdf b/tests/output/test_concat_documents/output_001.pdf index 85f31d0d4..0e1a28a63 100644 Binary files a/tests/output/test_concat_documents/output_001.pdf and b/tests/output/test_concat_documents/output_001.pdf differ diff --git a/tests/output/test_concat_documents/output_002.pdf b/tests/output/test_concat_documents/output_002.pdf index 7f7b4fc82..508612c71 100644 Binary files a/tests/output/test_concat_documents/output_002.pdf and b/tests/output/test_concat_documents/output_002.pdf differ diff --git a/tests/output/test_copy_circle_annotation/output_001.pdf b/tests/output/test_copy_circle_annotation/output_001.pdf index 1931133bd..07a57240b 100644 Binary files a/tests/output/test_copy_circle_annotation/output_001.pdf and b/tests/output/test_copy_circle_annotation/output_001.pdf differ diff --git a/tests/output/test_copy_circle_annotation/output_002.pdf b/tests/output/test_copy_circle_annotation/output_002.pdf index d487db76a..3f0809aa7 100644 Binary files a/tests/output/test_copy_circle_annotation/output_002.pdf and b/tests/output/test_copy_circle_annotation/output_002.pdf differ diff --git a/tests/output/test_copy_circle_annotation/output_003.pdf b/tests/output/test_copy_circle_annotation/output_003.pdf index 93178ed0f..47308dbc7 100644 Binary files a/tests/output/test_copy_circle_annotation/output_003.pdf and b/tests/output/test_copy_circle_annotation/output_003.pdf differ diff --git a/tests/output/test_count_annotations/output_001.pdf b/tests/output/test_count_annotations/output_001.pdf index bd1a67e14..74058851e 100644 Binary files a/tests/output/test_count_annotations/output_001.pdf and b/tests/output/test_count_annotations/output_001.pdf differ diff --git a/tests/output/test_count_annotations/output_002.pdf b/tests/output/test_count_annotations/output_002.pdf index edcb3a574..47ef94c2e 100644 Binary files a/tests/output/test_count_annotations/output_002.pdf and b/tests/output/test_count_annotations/output_002.pdf differ diff --git a/tests/output/test_create_document_with_output_intent/output_001.pdf b/tests/output/test_create_document_with_output_intent/output_001.pdf index 4e9206179..8bbda9a50 100644 Binary files a/tests/output/test_create_document_with_output_intent/output_001.pdf and b/tests/output/test_create_document_with_output_intent/output_001.pdf differ diff --git a/tests/output/test_detect_table/input_000.pdf b/tests/output/test_detect_table/input_000.pdf index 1e8d2272b..349cbb369 100644 Binary files a/tests/output/test_detect_table/input_000.pdf and b/tests/output/test_detect_table/input_000.pdf differ diff --git a/tests/output/test_detect_table/input_001.pdf b/tests/output/test_detect_table/input_001.pdf index 47eb1200a..dbe091e6a 100644 Binary files a/tests/output/test_detect_table/input_001.pdf and b/tests/output/test_detect_table/input_001.pdf differ diff --git a/tests/output/test_detect_table/input_002.pdf b/tests/output/test_detect_table/input_002.pdf index e907b48eb..d3a186b39 100644 Binary files a/tests/output/test_detect_table/input_002.pdf and b/tests/output/test_detect_table/input_002.pdf differ diff --git a/tests/output/test_detect_table/input_003.pdf b/tests/output/test_detect_table/input_003.pdf index b7a24a90e..c8029837d 100644 Binary files a/tests/output/test_detect_table/input_003.pdf and b/tests/output/test_detect_table/input_003.pdf differ diff --git a/tests/output/test_detect_table/input_004.pdf b/tests/output/test_detect_table/input_004.pdf index 0610ee9c2..692162619 100644 Binary files a/tests/output/test_detect_table/input_004.pdf and b/tests/output/test_detect_table/input_004.pdf differ diff --git a/tests/output/test_detect_table/input_005.pdf b/tests/output/test_detect_table/input_005.pdf index 03f3838a0..d85d58967 100644 Binary files a/tests/output/test_detect_table/input_005.pdf and b/tests/output/test_detect_table/input_005.pdf differ diff --git a/tests/output/test_detect_table/input_006.pdf b/tests/output/test_detect_table/input_006.pdf index c8fc35499..d8316261d 100644 Binary files a/tests/output/test_detect_table/input_006.pdf and b/tests/output/test_detect_table/input_006.pdf differ diff --git a/tests/output/test_detect_table/output_000.pdf b/tests/output/test_detect_table/output_000.pdf index b256f63bd..3c6d31154 100644 Binary files a/tests/output/test_detect_table/output_000.pdf and b/tests/output/test_detect_table/output_000.pdf differ diff --git a/tests/output/test_detect_table/output_001.pdf b/tests/output/test_detect_table/output_001.pdf index 5b2610d27..20349bc05 100644 Binary files a/tests/output/test_detect_table/output_001.pdf and b/tests/output/test_detect_table/output_001.pdf differ diff --git a/tests/output/test_detect_table/output_002.pdf b/tests/output/test_detect_table/output_002.pdf index ff8fe8ea5..da4567e34 100644 Binary files a/tests/output/test_detect_table/output_002.pdf and b/tests/output/test_detect_table/output_002.pdf differ diff --git a/tests/output/test_detect_table/output_003.pdf b/tests/output/test_detect_table/output_003.pdf index 4c1ce8e10..c5166f185 100644 Binary files a/tests/output/test_detect_table/output_003.pdf and b/tests/output/test_detect_table/output_003.pdf differ diff --git a/tests/output/test_detect_table/output_004.pdf b/tests/output/test_detect_table/output_004.pdf index c379ecfd8..4173e5799 100644 Binary files a/tests/output/test_detect_table/output_004.pdf and b/tests/output/test_detect_table/output_004.pdf differ diff --git a/tests/output/test_detect_table/output_005.pdf b/tests/output/test_detect_table/output_005.pdf index 3857ab880..2994a433f 100644 Binary files a/tests/output/test_detect_table/output_005.pdf and b/tests/output/test_detect_table/output_005.pdf differ diff --git a/tests/output/test_detect_table/output_006.pdf b/tests/output/test_detect_table/output_006.pdf index 1606dfb69..589b78b54 100644 Binary files a/tests/output/test_detect_table/output_006.pdf and b/tests/output/test_detect_table/output_006.pdf differ diff --git a/tests/output/test_digit_placement_ubuntu_font/output_001.pdf b/tests/output/test_digit_placement_ubuntu_font/output_001.pdf index 7f1c9d09c..608affb4a 100644 Binary files a/tests/output/test_digit_placement_ubuntu_font/output_001.pdf and b/tests/output/test_digit_placement_ubuntu_font/output_001.pdf differ diff --git a/tests/output/test_document_file_size/output.pdf b/tests/output/test_document_file_size/output.pdf index 6d27110ea..8687fb34a 100644 Binary files a/tests/output/test_document_file_size/output.pdf and b/tests/output/test_document_file_size/output.pdf differ diff --git a/tests/output/test_duplicate_pages/output_000.pdf b/tests/output/test_duplicate_pages/output_000.pdf index a57dd21d0..b3e097de0 100644 Binary files a/tests/output/test_duplicate_pages/output_000.pdf and b/tests/output/test_duplicate_pages/output_000.pdf differ diff --git a/tests/output/test_duplicate_pages/output_001.pdf b/tests/output/test_duplicate_pages/output_001.pdf index dd2e5bb6b..237a9e119 100644 Binary files a/tests/output/test_duplicate_pages/output_001.pdf and b/tests/output/test_duplicate_pages/output_001.pdf differ diff --git a/tests/output/test_duplicate_pages/output_002.pdf b/tests/output/test_duplicate_pages/output_002.pdf index 8ceafb704..06f3e24d5 100644 Binary files a/tests/output/test_duplicate_pages/output_002.pdf and b/tests/output/test_duplicate_pages/output_002.pdf differ diff --git a/tests/output/test_duplicate_pages/output_003.pdf b/tests/output/test_duplicate_pages/output_003.pdf index f0ce670b9..b4f3c9a51 100644 Binary files a/tests/output/test_duplicate_pages/output_003.pdf and b/tests/output/test_duplicate_pages/output_003.pdf differ diff --git a/tests/output/test_easier_imports/output.pdf b/tests/output/test_easier_imports/output.pdf index a18816a62..74c49f610 100644 Binary files a/tests/output/test_easier_imports/output.pdf and b/tests/output/test_easier_imports/output.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_000.pdf b/tests/output/test_export_html_to_pdf/example_html_input_000.pdf index 50e62163a..5759faf1f 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_000.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_000.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_001.pdf b/tests/output/test_export_html_to_pdf/example_html_input_001.pdf index 0b6d7f5df..82f32431c 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_001.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_001.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_002.pdf b/tests/output/test_export_html_to_pdf/example_html_input_002.pdf index 1330b4fd0..e51f7b88c 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_002.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_002.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_003.pdf b/tests/output/test_export_html_to_pdf/example_html_input_003.pdf index 23c6ebd5e..aac5df259 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_003.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_003.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_004.pdf b/tests/output/test_export_html_to_pdf/example_html_input_004.pdf index cd0d9a09c..75b863ca7 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_004.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_004.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_005.pdf b/tests/output/test_export_html_to_pdf/example_html_input_005.pdf index bca82fc12..413c88f5d 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_005.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_005.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_006.pdf b/tests/output/test_export_html_to_pdf/example_html_input_006.pdf index b87028786..db168bcd7 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_006.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_006.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_007.pdf b/tests/output/test_export_html_to_pdf/example_html_input_007.pdf index f048f867e..4793073a3 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_007.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_007.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_008.pdf b/tests/output/test_export_html_to_pdf/example_html_input_008.pdf index 27d4ce826..259c280bc 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_008.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_008.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_009.pdf b/tests/output/test_export_html_to_pdf/example_html_input_009.pdf index 6ce84bd4e..0f3e7bbc1 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_009.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_009.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_010.pdf b/tests/output/test_export_html_to_pdf/example_html_input_010.pdf index da7d54134..1a4d99ba7 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_010.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_010.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_011.pdf b/tests/output/test_export_html_to_pdf/example_html_input_011.pdf index 9d1cdfd73..e91f95aff 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_011.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_011.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_012.pdf b/tests/output/test_export_html_to_pdf/example_html_input_012.pdf index e530a5efd..7ba4a240b 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_012.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_012.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_013.pdf b/tests/output/test_export_html_to_pdf/example_html_input_013.pdf index d4507ca89..04b053a04 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_013.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_013.pdf differ diff --git a/tests/output/test_export_html_to_pdf/example_html_input_014.pdf b/tests/output/test_export_html_to_pdf/example_html_input_014.pdf index 1b9e04ef3..cd538bfff 100644 Binary files a/tests/output/test_export_html_to_pdf/example_html_input_014.pdf and b/tests/output/test_export_html_to_pdf/example_html_input_014.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-001.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-001.md.pdf index d2d49ea50..cced1fff8 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-001.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-001.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-002.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-002.md.pdf index 8acffe309..06a5d539c 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-002.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-002.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-003.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-003.md.pdf index b604fdceb..d3dbcef42 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-003.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-003.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-004.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-004.md.pdf index efd66768b..b27c7102b 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-004.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-004.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-005.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-005.md.pdf index 8cb71a19e..5eab389bc 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-005.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-005.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-006.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-006.md.pdf index 01a411fb1..533013764 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-006.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-006.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-007.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-007.md.pdf index a4de6a0b1..890136806 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-007.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-007.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-008.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-008.md.pdf index 29009f991..4e073ff30 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-008.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-008.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-009.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-009.md.pdf index bcc9e09cb..9aa44c957 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-009.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-009.md.pdf differ diff --git a/tests/output/test_export_markdown_to_pdf/example-markdown-input-010.md.pdf b/tests/output/test_export_markdown_to_pdf/example-markdown-input-010.md.pdf index 647405259..fdbbbc006 100644 Binary files a/tests/output/test_export_markdown_to_pdf/example-markdown-input-010.md.pdf and b/tests/output/test_export_markdown_to_pdf/example-markdown-input-010.md.pdf differ diff --git a/tests/output/test_export_to_mp3/output.mp3 b/tests/output/test_export_to_mp3/output.mp3 index 3a338b1b4..e5291fb0e 100644 Binary files a/tests/output/test_export_to_mp3/output.mp3 and b/tests/output/test_export_to_mp3/output.mp3 differ diff --git a/tests/output/test_extract_colors/output_001.pdf b/tests/output/test_extract_colors/output_001.pdf index 3545451b6..1877253b8 100644 Binary files a/tests/output/test_extract_colors/output_001.pdf and b/tests/output/test_extract_colors/output_001.pdf differ diff --git a/tests/output/test_extract_colors/output_002.pdf b/tests/output/test_extract_colors/output_002.pdf index 748c0b189..82fc46a77 100644 Binary files a/tests/output/test_extract_colors/output_002.pdf and b/tests/output/test_extract_colors/output_002.pdf differ diff --git a/tests/output/test_extract_courier_text/output_001.pdf b/tests/output/test_extract_courier_text/output_001.pdf index 8f02d5bfc..0cadc9ca9 100644 Binary files a/tests/output/test_extract_courier_text/output_001.pdf and b/tests/output/test_extract_courier_text/output_001.pdf differ diff --git a/tests/output/test_extract_font_names/output_001.pdf b/tests/output/test_extract_font_names/output_001.pdf index 8fdbc2330..e552fd953 100644 Binary files a/tests/output/test_extract_font_names/output_001.pdf and b/tests/output/test_extract_font_names/output_001.pdf differ diff --git a/tests/output/test_extract_font_names/output_002.pdf b/tests/output/test_extract_font_names/output_002.pdf index f098eb3ac..97f7bbf02 100644 Binary files a/tests/output/test_extract_font_names/output_002.pdf and b/tests/output/test_extract_font_names/output_002.pdf differ diff --git a/tests/output/test_extract_keywords/output_001.pdf b/tests/output/test_extract_keywords/output_001.pdf index dfb2a00bf..515094e2c 100644 Binary files a/tests/output/test_extract_keywords/output_001.pdf and b/tests/output/test_extract_keywords/output_001.pdf differ diff --git a/tests/output/test_extract_keywords/output_002.pdf b/tests/output/test_extract_keywords/output_002.pdf index 5b456db80..1a20e361c 100644 Binary files a/tests/output/test_extract_keywords/output_002.pdf and b/tests/output/test_extract_keywords/output_002.pdf differ diff --git a/tests/output/test_extract_keywords/output_003.pdf b/tests/output/test_extract_keywords/output_003.pdf index 439a0b971..23de6a660 100644 Binary files a/tests/output/test_extract_keywords/output_003.pdf and b/tests/output/test_extract_keywords/output_003.pdf differ diff --git a/tests/output/test_extract_red_text/output_001.pdf b/tests/output/test_extract_red_text/output_001.pdf index 8e05710c3..4b2b11946 100644 Binary files a/tests/output/test_extract_red_text/output_001.pdf and b/tests/output/test_extract_red_text/output_001.pdf differ diff --git a/tests/output/test_extract_regex/output_001.pdf b/tests/output/test_extract_regex/output_001.pdf index 6461b0c31..95d987d3f 100644 Binary files a/tests/output/test_extract_regex/output_001.pdf and b/tests/output/test_extract_regex/output_001.pdf differ diff --git a/tests/output/test_extract_regex/output_002.pdf b/tests/output/test_extract_regex/output_002.pdf index c213443e4..fcf46f22c 100644 Binary files a/tests/output/test_extract_regex/output_002.pdf and b/tests/output/test_extract_regex/output_002.pdf differ diff --git a/tests/output/test_extract_text/output_001.pdf b/tests/output/test_extract_text/output_001.pdf index 640802d0c..f5532272f 100644 Binary files a/tests/output/test_extract_text/output_001.pdf and b/tests/output/test_extract_text/output_001.pdf differ diff --git a/tests/output/test_extract_text/output_002.pdf b/tests/output/test_extract_text/output_002.pdf index 88761577f..ec3fcc219 100644 Binary files a/tests/output/test_extract_text/output_002.pdf and b/tests/output/test_extract_text/output_002.pdf differ diff --git a/tests/output/test_extract_text_expect_ground_truth/output.pdf b/tests/output/test_extract_text_expect_ground_truth/output.pdf index 09851bb9c..983e2f4f5 100644 Binary files a/tests/output/test_extract_text_expect_ground_truth/output.pdf and b/tests/output/test_extract_text_expect_ground_truth/output.pdf differ diff --git a/tests/output/test_extract_text_from_self_made_invoice/output.pdf b/tests/output/test_extract_text_from_self_made_invoice/output.pdf index c24200796..3cd1124eb 100644 Binary files a/tests/output/test_extract_text_from_self_made_invoice/output.pdf and b/tests/output/test_extract_text_from_self_made_invoice/output.pdf differ diff --git a/tests/output/test_fix_broken_xref/output_001.pdf b/tests/output/test_fix_broken_xref/output_001.pdf index ef2f70c89..3bbd72ea6 100644 Binary files a/tests/output/test_fix_broken_xref/output_001.pdf and b/tests/output/test_fix_broken_xref/output_001.pdf differ diff --git a/tests/output/test_fix_broken_xref/output_002.pdf b/tests/output/test_fix_broken_xref/output_002.pdf index 6c55c46df..ed54f4170 100644 Binary files a/tests/output/test_fix_broken_xref/output_002.pdf and b/tests/output/test_fix_broken_xref/output_002.pdf differ diff --git a/tests/output/test_header_footer_multi_column_layout/output_001.pdf b/tests/output/test_header_footer_multi_column_layout/output_001.pdf index 02de1bb66..f5bb10140 100644 Binary files a/tests/output/test_header_footer_multi_column_layout/output_001.pdf and b/tests/output/test_header_footer_multi_column_layout/output_001.pdf differ diff --git a/tests/output/test_header_footer_multi_column_layout/output_002.pdf b/tests/output/test_header_footer_multi_column_layout/output_002.pdf index 771016420..a92db2101 100644 Binary files a/tests/output/test_header_footer_multi_column_layout/output_002.pdf and b/tests/output/test_header_footer_multi_column_layout/output_002.pdf differ diff --git a/tests/output/test_header_footer_multi_column_layout/output_003.pdf b/tests/output/test_header_footer_multi_column_layout/output_003.pdf index be0c22fc5..46e6084eb 100644 Binary files a/tests/output/test_header_footer_multi_column_layout/output_003.pdf and b/tests/output/test_header_footer_multi_column_layout/output_003.pdf differ diff --git a/tests/output/test_hello_world/output.pdf b/tests/output/test_hello_world/output.pdf index a68f4dc68..9d04e1247 100644 Binary files a/tests/output/test_hello_world/output.pdf and b/tests/output/test_hello_world/output.pdf differ diff --git a/tests/output/test_inline_object_io/output_001.pdf b/tests/output/test_inline_object_io/output_001.pdf index 2ba904b90..cf3eb18e5 100644 Binary files a/tests/output/test_inline_object_io/output_001.pdf and b/tests/output/test_inline_object_io/output_001.pdf differ diff --git a/tests/output/test_margin_and_padding/output_001.pdf b/tests/output/test_margin_and_padding/output_001.pdf index ae729e846..5a08da283 100644 Binary files a/tests/output/test_margin_and_padding/output_001.pdf and b/tests/output/test_margin_and_padding/output_001.pdf differ diff --git a/tests/output/test_margin_and_padding/output_002.pdf b/tests/output/test_margin_and_padding/output_002.pdf index 19c3f33bb..dca277d0a 100644 Binary files a/tests/output/test_margin_and_padding/output_002.pdf and b/tests/output/test_margin_and_padding/output_002.pdf differ diff --git a/tests/output/test_modify_image/output_001.pdf b/tests/output/test_modify_image/output_001.pdf index d1e12a4da..8421967c2 100644 Binary files a/tests/output/test_modify_image/output_001.pdf and b/tests/output/test_modify_image/output_001.pdf differ diff --git a/tests/output/test_modify_image/output_002.pdf b/tests/output/test_modify_image/output_002.pdf index 17b89f083..68da09695 100644 Binary files a/tests/output/test_modify_image/output_002.pdf and b/tests/output/test_modify_image/output_002.pdf differ diff --git a/tests/output/test_open_encrypted_document/output.pdf b/tests/output/test_open_encrypted_document/output.pdf index 73f73a449..23d2d9266 100644 Binary files a/tests/output/test_open_encrypted_document/output.pdf and b/tests/output/test_open_encrypted_document/output.pdf differ diff --git a/tests/output/test_optimize_images/output_001.pdf b/tests/output/test_optimize_images/output_001.pdf index 1cf8a1a90..a67e9fe42 100644 Binary files a/tests/output/test_optimize_images/output_001.pdf and b/tests/output/test_optimize_images/output_001.pdf differ diff --git a/tests/output/test_page_has_empty_resource_dictionary/output_001.pdf b/tests/output/test_page_has_empty_resource_dictionary/output_001.pdf index 285a4b320..bd95a5f13 100644 Binary files a/tests/output/test_page_has_empty_resource_dictionary/output_001.pdf and b/tests/output/test_page_has_empty_resource_dictionary/output_001.pdf differ diff --git a/tests/output/test_redact_common_regular_expressions/output_001.pdf b/tests/output/test_redact_common_regular_expressions/output_001.pdf index e0b41920c..e3e5d7782 100644 Binary files a/tests/output/test_redact_common_regular_expressions/output_001.pdf and b/tests/output/test_redact_common_regular_expressions/output_001.pdf differ diff --git a/tests/output/test_redact_common_regular_expressions/output_002.pdf b/tests/output/test_redact_common_regular_expressions/output_002.pdf index fe1a2139b..050c5a566 100644 Binary files a/tests/output/test_redact_common_regular_expressions/output_002.pdf and b/tests/output/test_redact_common_regular_expressions/output_002.pdf differ diff --git a/tests/output/test_redact_common_regular_expressions/output_003.pdf b/tests/output/test_redact_common_regular_expressions/output_003.pdf index fdb10ed98..2e96fb64b 100644 Binary files a/tests/output/test_redact_common_regular_expressions/output_003.pdf and b/tests/output/test_redact_common_regular_expressions/output_003.pdf differ diff --git a/tests/output/test_remove_annotation/output_001.pdf b/tests/output/test_remove_annotation/output_001.pdf index f929d6f5b..1020b149f 100644 Binary files a/tests/output/test_remove_annotation/output_001.pdf and b/tests/output/test_remove_annotation/output_001.pdf differ diff --git a/tests/output/test_remove_annotation/output_002.pdf b/tests/output/test_remove_annotation/output_002.pdf index dd572d705..7fc7e35d0 100644 Binary files a/tests/output/test_remove_annotation/output_002.pdf and b/tests/output/test_remove_annotation/output_002.pdf differ diff --git a/tests/output/test_remove_annotation/output_003.pdf b/tests/output/test_remove_annotation/output_003.pdf index 33932785d..4a3ac56d7 100644 Binary files a/tests/output/test_remove_annotation/output_003.pdf and b/tests/output/test_remove_annotation/output_003.pdf differ diff --git a/tests/output/test_remove_page/output_001.pdf b/tests/output/test_remove_page/output_001.pdf index 11f328da1..69b5b9328 100644 Binary files a/tests/output/test_remove_page/output_001.pdf and b/tests/output/test_remove_page/output_001.pdf differ diff --git a/tests/output/test_remove_page/output_002.pdf b/tests/output/test_remove_page/output_002.pdf index 8d64434d0..983999699 100644 Binary files a/tests/output/test_remove_page/output_002.pdf and b/tests/output/test_remove_page/output_002.pdf differ diff --git a/tests/output/test_remove_page/output_003.pdf b/tests/output/test_remove_page/output_003.pdf index f4385057d..450322363 100644 Binary files a/tests/output/test_remove_page/output_003.pdf and b/tests/output/test_remove_page/output_003.pdf differ diff --git a/tests/output/test_remove_page/output_004.pdf b/tests/output/test_remove_page/output_004.pdf index 47ffaa3a2..74bfbc738 100644 Binary files a/tests/output/test_remove_page/output_004.pdf and b/tests/output/test_remove_page/output_004.pdf differ diff --git a/tests/output/test_rotate_page/output_001.pdf b/tests/output/test_rotate_page/output_001.pdf index f688c2222..4245c8a6e 100644 Binary files a/tests/output/test_rotate_page/output_001.pdf and b/tests/output/test_rotate_page/output_001.pdf differ diff --git a/tests/output/test_rotate_page/output_002.pdf b/tests/output/test_rotate_page/output_002.pdf index 702adcba6..1096f8ee3 100644 Binary files a/tests/output/test_rotate_page/output_002.pdf and b/tests/output/test_rotate_page/output_002.pdf differ diff --git a/tests/output/test_rotate_page/output_003.pdf b/tests/output/test_rotate_page/output_003.pdf index 93fc310ef..cc369f839 100644 Binary files a/tests/output/test_rotate_page/output_003.pdf and b/tests/output/test_rotate_page/output_003.pdf differ diff --git a/tests/output/test_simple_paragraph_extraction/output_000.pdf b/tests/output/test_simple_paragraph_extraction/output_000.pdf index 118d52c2d..90bcf5079 100644 Binary files a/tests/output/test_simple_paragraph_extraction/output_000.pdf and b/tests/output/test_simple_paragraph_extraction/output_000.pdf differ diff --git a/tests/output/test_simple_paragraph_extraction/output_001.pdf b/tests/output/test_simple_paragraph_extraction/output_001.pdf index 905e059fe..0c74264e4 100644 Binary files a/tests/output/test_simple_paragraph_extraction/output_001.pdf and b/tests/output/test_simple_paragraph_extraction/output_001.pdf differ diff --git a/tests/output/test_split_complementary_color_scheme/output.pdf b/tests/output/test_split_complementary_color_scheme/output.pdf index 9d292ecfe..3a321f318 100644 Binary files a/tests/output/test_split_complementary_color_scheme/output.pdf and b/tests/output/test_split_complementary_color_scheme/output.pdf differ diff --git a/tests/output/test_tetradic_rectangle_color_scheme/output.pdf b/tests/output/test_tetradic_rectangle_color_scheme/output.pdf index 2ac0b969e..c71aa5122 100644 Binary files a/tests/output/test_tetradic_rectangle_color_scheme/output.pdf and b/tests/output/test_tetradic_rectangle_color_scheme/output.pdf differ diff --git a/tests/output/test_tetradic_square_color_scheme/output.pdf b/tests/output/test_tetradic_square_color_scheme/output.pdf index df368d3e5..e563a8625 100644 Binary files a/tests/output/test_tetradic_square_color_scheme/output.pdf and b/tests/output/test_tetradic_square_color_scheme/output.pdf differ diff --git a/tests/output/test_triadic_color_scheme/output.pdf b/tests/output/test_triadic_color_scheme/output.pdf index 3a3c6d34a..01f000293 100644 Binary files a/tests/output/test_triadic_color_scheme/output.pdf and b/tests/output/test_triadic_color_scheme/output.pdf differ diff --git a/tests/output/test_write_2_scatter_plots/output.pdf b/tests/output/test_write_2_scatter_plots/output.pdf index 4f0f0810b..b498e078c 100644 Binary files a/tests/output/test_write_2_scatter_plots/output.pdf and b/tests/output/test_write_2_scatter_plots/output.pdf differ diff --git a/tests/output/test_write_3d_density_chart/output.pdf b/tests/output/test_write_3d_density_chart/output.pdf index 04b9188fa..00ad319a7 100644 Binary files a/tests/output/test_write_3d_density_chart/output.pdf and b/tests/output/test_write_3d_density_chart/output.pdf differ diff --git a/tests/output/test_write_3d_surface_plot/output.pdf b/tests/output/test_write_3d_surface_plot/output.pdf index 742074cac..14b857f0e 100644 Binary files a/tests/output/test_write_3d_surface_plot/output.pdf and b/tests/output/test_write_3d_surface_plot/output.pdf differ diff --git a/tests/output/test_write_all_types_of_barcode/output.pdf b/tests/output/test_write_all_types_of_barcode/output.pdf index 3b58cd18f..d99385e1b 100644 Binary files a/tests/output/test_write_all_types_of_barcode/output.pdf and b/tests/output/test_write_all_types_of_barcode/output.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_000.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_000.pdf index b0a03df28..9822368a8 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_000.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_000.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_001.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_001.pdf index de09eadbe..92ab5a880 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_001.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_001.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_002.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_002.pdf index 30d130734..602a773dd 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_002.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_002.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_003.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_003.pdf index d49bc3628..dfe8bbaff 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_003.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_003.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_004.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_004.pdf index 9e2eee376..34b2ec47d 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_004.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_004.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_005.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_005.pdf index ddccc3bc7..bb0d27360 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_005.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_005.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_006.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_006.pdf index 70fd50eb4..6b4c7ed22 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_006.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_006.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_007.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_007.pdf index 1f9b4d0f8..e1767d953 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_007.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_007.pdf differ diff --git a/tests/output/test_write_barcode_with_rounded_borders/output_008.pdf b/tests/output/test_write_barcode_with_rounded_borders/output_008.pdf index fdbb1535a..a7e71f4ba 100644 Binary files a/tests/output/test_write_barcode_with_rounded_borders/output_008.pdf and b/tests/output/test_write_barcode_with_rounded_borders/output_008.pdf differ diff --git a/tests/output/test_write_battleship/output.pdf b/tests/output/test_write_battleship/output.pdf index 84a341fa4..3f461c91a 100644 Binary files a/tests/output/test_write_battleship/output.pdf and b/tests/output/test_write_battleship/output.pdf differ diff --git a/tests/output/test_write_blobs/output.pdf b/tests/output/test_write_blobs/output.pdf index 11df73c6a..08c729a82 100644 Binary files a/tests/output/test_write_blobs/output.pdf and b/tests/output/test_write_blobs/output.pdf differ diff --git a/tests/output/test_write_check_box/output_001.pdf b/tests/output/test_write_check_box/output_001.pdf index a0786eef6..ac595cb8a 100644 Binary files a/tests/output/test_write_check_box/output_001.pdf and b/tests/output/test_write_check_box/output_001.pdf differ diff --git a/tests/output/test_write_check_box/output_001_validation.json b/tests/output/test_write_check_box/output_001_validation.json index 751b55d6b..90ca69533 100644 --- a/tests/output/test_write_check_box/output_001_validation.json +++ b/tests/output/test_write_check_box/output_001_validation.json @@ -1,7 +1,7 @@ { "analysis-summary": { "can-be-optimized": false, - "date": "Sun Jul 3 02:59:35 2022", + "date": "Sat Jul 23 11:35:47 2022", "input": "/home/joris/Code/borb-dev/tests/output/test_write_check_box/output_001.pdf", "metadata": { "Author": "", diff --git a/tests/output/test_write_check_box/output_002.pdf b/tests/output/test_write_check_box/output_002.pdf index 4de6e42cf..a01303037 100644 Binary files a/tests/output/test_write_check_box/output_002.pdf and b/tests/output/test_write_check_box/output_002.pdf differ diff --git a/tests/output/test_write_check_box/output_002_validation.json b/tests/output/test_write_check_box/output_002_validation.json index 6bef4d844..acf5a6a31 100644 --- a/tests/output/test_write_check_box/output_002_validation.json +++ b/tests/output/test_write_check_box/output_002_validation.json @@ -1,7 +1,7 @@ { "analysis-summary": { "can-be-optimized": false, - "date": "Sun Jul 3 02:59:35 2022", + "date": "Sat Jul 23 11:35:47 2022", "input": "/home/joris/Code/borb-dev/tests/output/test_write_check_box/output_002.pdf", "metadata": { "Author": "", @@ -19,7 +19,7 @@ "pdf-major-version": 1, "pdf-minor-version": 7, "profile": "/home/joris/Downloads/PDF-CHECKER-Lin64/PDF_Checker/CheckerProfiles/iso_32000.json", - "size-in-bytes": 5604, + "size-in-bytes": 5655, "triggered-abort": "pdf-error" }, "cleanup-results": { diff --git a/tests/output/test_write_chunk_of_text/output.pdf b/tests/output/test_write_chunk_of_text/output.pdf index 5c490cb7e..ea31328e2 100644 Binary files a/tests/output/test_write_chunk_of_text/output.pdf and b/tests/output/test_write_chunk_of_text/output.pdf differ diff --git a/tests/output/test_write_chunk_of_text_escaped_chars/output.pdf b/tests/output/test_write_chunk_of_text_escaped_chars/output.pdf index 9fb8df628..d0084159f 100644 Binary files a/tests/output/test_write_chunk_of_text_escaped_chars/output.pdf and b/tests/output/test_write_chunk_of_text_escaped_chars/output.pdf differ diff --git a/tests/output/test_write_chunk_of_text_in_rainbow_colors/output.pdf b/tests/output/test_write_chunk_of_text_in_rainbow_colors/output.pdf index 1d48e7792..afd8233fc 100644 Binary files a/tests/output/test_write_chunk_of_text_in_rainbow_colors/output.pdf and b/tests/output/test_write_chunk_of_text_in_rainbow_colors/output.pdf differ diff --git a/tests/output/test_write_chunks_of_text/output_001.pdf b/tests/output/test_write_chunks_of_text/output_001.pdf index 3a88da122..22abcd142 100644 Binary files a/tests/output/test_write_chunks_of_text/output_001.pdf and b/tests/output/test_write_chunks_of_text/output_001.pdf differ diff --git a/tests/output/test_write_chunks_of_text/output_002.pdf b/tests/output/test_write_chunks_of_text/output_002.pdf index d583fd601..0530303b7 100644 Binary files a/tests/output/test_write_chunks_of_text/output_002.pdf and b/tests/output/test_write_chunks_of_text/output_002.pdf differ diff --git a/tests/output/test_write_chunks_of_text/output_003.pdf b/tests/output/test_write_chunks_of_text/output_003.pdf index 660b4b66c..1a75e992e 100644 Binary files a/tests/output/test_write_chunks_of_text/output_003.pdf and b/tests/output/test_write_chunks_of_text/output_003.pdf differ diff --git a/tests/output/test_write_chunks_of_text/output_004.pdf b/tests/output/test_write_chunks_of_text/output_004.pdf index eb1fafc90..e563e791b 100644 Binary files a/tests/output/test_write_chunks_of_text/output_004.pdf and b/tests/output/test_write_chunks_of_text/output_004.pdf differ diff --git a/tests/output/test_write_chunks_of_text/output_005.pdf b/tests/output/test_write_chunks_of_text/output_005.pdf index 43dbaeaf3..4a79bf09d 100644 Binary files a/tests/output/test_write_chunks_of_text/output_005.pdf and b/tests/output/test_write_chunks_of_text/output_005.pdf differ diff --git a/tests/output/test_write_chunks_of_text_preserves_bounding_boxes/output.pdf b/tests/output/test_write_chunks_of_text_preserves_bounding_boxes/output.pdf index 403c5ade5..4f4ced32b 100644 Binary files a/tests/output/test_write_chunks_of_text_preserves_bounding_boxes/output.pdf and b/tests/output/test_write_chunks_of_text_preserves_bounding_boxes/output.pdf differ diff --git a/tests/output/test_write_code_128_barcode/output.pdf b/tests/output/test_write_code_128_barcode/output.pdf index 623181fd9..4cc532d2f 100644 Binary files a/tests/output/test_write_code_128_barcode/output.pdf and b/tests/output/test_write_code_128_barcode/output.pdf differ diff --git a/tests/output/test_write_code_128_barcode_in_color/output.pdf b/tests/output/test_write_code_128_barcode_in_color/output.pdf index 89abd3ba3..d8072ec54 100644 Binary files a/tests/output/test_write_code_128_barcode_in_color/output.pdf and b/tests/output/test_write_code_128_barcode_in_color/output.pdf differ diff --git a/tests/output/test_write_codeblock/output.pdf b/tests/output/test_write_codeblock/output.pdf index 95ade9ff6..b4f2c05a2 100644 Binary files a/tests/output/test_write_codeblock/output.pdf and b/tests/output/test_write_codeblock/output.pdf differ diff --git a/tests/output/test_write_document_with_lipsum/output_001.pdf b/tests/output/test_write_document_with_lipsum/output_001.pdf index 0ef6f282c..a67e94387 100644 Binary files a/tests/output/test_write_document_with_lipsum/output_001.pdf and b/tests/output/test_write_document_with_lipsum/output_001.pdf differ diff --git a/tests/output/test_write_document_with_lipsum/output_001.png b/tests/output/test_write_document_with_lipsum/output_001.png index bb5627e30..347d5f839 100644 Binary files a/tests/output/test_write_document_with_lipsum/output_001.png and b/tests/output/test_write_document_with_lipsum/output_001.png differ diff --git a/tests/output/test_write_document_with_lipsum/output_002.pdf b/tests/output/test_write_document_with_lipsum/output_002.pdf index b96cb76f1..2666912c6 100644 Binary files a/tests/output/test_write_document_with_lipsum/output_002.pdf and b/tests/output/test_write_document_with_lipsum/output_002.pdf differ diff --git a/tests/output/test_write_document_with_lipsum/output_002.png b/tests/output/test_write_document_with_lipsum/output_002.png index f43cc14e2..7af5c183c 100644 Binary files a/tests/output/test_write_document_with_lipsum/output_002.png and b/tests/output/test_write_document_with_lipsum/output_002.png differ diff --git a/tests/output/test_write_dragon_curve/output.pdf b/tests/output/test_write_dragon_curve/output.pdf index ddd9b02e7..8aea8d073 100644 Binary files a/tests/output/test_write_dragon_curve/output.pdf and b/tests/output/test_write_dragon_curve/output.pdf differ diff --git a/tests/output/test_write_drop_down_list/output_001.pdf b/tests/output/test_write_drop_down_list/output_001.pdf index 25024ec28..81afe7d28 100644 Binary files a/tests/output/test_write_drop_down_list/output_001.pdf and b/tests/output/test_write_drop_down_list/output_001.pdf differ diff --git a/tests/output/test_write_drop_down_list/output_002.pdf b/tests/output/test_write_drop_down_list/output_002.pdf index 3dab7b3c8..55414c8a9 100644 Binary files a/tests/output/test_write_drop_down_list/output_002.pdf and b/tests/output/test_write_drop_down_list/output_002.pdf differ diff --git a/tests/output/test_write_emoji/output.pdf b/tests/output/test_write_emoji/output.pdf index a1abe60ce..7c86a9c6e 100644 Binary files a/tests/output/test_write_emoji/output.pdf and b/tests/output/test_write_emoji/output.pdf differ diff --git a/tests/output/test_write_empty_document/output.pdf b/tests/output/test_write_empty_document/output.pdf index ea2918880..a421a5a86 100644 Binary files a/tests/output/test_write_empty_document/output.pdf and b/tests/output/test_write_empty_document/output.pdf differ diff --git a/tests/output/test_write_eurion/output_001.pdf b/tests/output/test_write_eurion/output_001.pdf index c523f64be..664dcc556 100644 Binary files a/tests/output/test_write_eurion/output_001.pdf and b/tests/output/test_write_eurion/output_001.pdf differ diff --git a/tests/output/test_write_eurion/output_002.pdf b/tests/output/test_write_eurion/output_002.pdf index ae1d31ef1..6979b187e 100644 Binary files a/tests/output/test_write_eurion/output_002.pdf and b/tests/output/test_write_eurion/output_002.pdf differ diff --git a/tests/output/test_write_fixed_column_width_table/output_001.pdf b/tests/output/test_write_fixed_column_width_table/output_001.pdf index 38bfab081..7c5c80f3a 100644 Binary files a/tests/output/test_write_fixed_column_width_table/output_001.pdf and b/tests/output/test_write_fixed_column_width_table/output_001.pdf differ diff --git a/tests/output/test_write_fixed_column_width_table/output_002.pdf b/tests/output/test_write_fixed_column_width_table/output_002.pdf index 09f77582c..e17c3ed35 100644 Binary files a/tests/output/test_write_fixed_column_width_table/output_002.pdf and b/tests/output/test_write_fixed_column_width_table/output_002.pdf differ diff --git a/tests/output/test_write_fixed_column_width_table/output_003.pdf b/tests/output/test_write_fixed_column_width_table/output_003.pdf index 5c66b38c7..206c5e3e9 100644 Binary files a/tests/output/test_write_fixed_column_width_table/output_003.pdf and b/tests/output/test_write_fixed_column_width_table/output_003.pdf differ diff --git a/tests/output/test_write_fixed_column_width_table/output_004.pdf b/tests/output/test_write_fixed_column_width_table/output_004.pdf index c7c1940fd..c6d5dc35b 100644 Binary files a/tests/output/test_write_fixed_column_width_table/output_004.pdf and b/tests/output/test_write_fixed_column_width_table/output_004.pdf differ diff --git a/tests/output/test_write_fixed_column_width_table/output_005.pdf b/tests/output/test_write_fixed_column_width_table/output_005.pdf index eb5048b13..a4b61aaa9 100644 Binary files a/tests/output/test_write_fixed_column_width_table/output_005.pdf and b/tests/output/test_write_fixed_column_width_table/output_005.pdf differ diff --git a/tests/output/test_write_flexi_table/output_001.pdf b/tests/output/test_write_flexi_table/output_001.pdf index 659acb45a..ca4de4035 100644 Binary files a/tests/output/test_write_flexi_table/output_001.pdf and b/tests/output/test_write_flexi_table/output_001.pdf differ diff --git a/tests/output/test_write_flexi_table/output_002.pdf b/tests/output/test_write_flexi_table/output_002.pdf index ada79e554..8973b07d2 100644 Binary files a/tests/output/test_write_flexi_table/output_002.pdf and b/tests/output/test_write_flexi_table/output_002.pdf differ diff --git a/tests/output/test_write_flexi_table/output_003.pdf b/tests/output/test_write_flexi_table/output_003.pdf index 8cc3c7dfa..d5c560cd3 100644 Binary files a/tests/output/test_write_flexi_table/output_003.pdf and b/tests/output/test_write_flexi_table/output_003.pdf differ diff --git a/tests/output/test_write_flexi_table/output_004.pdf b/tests/output/test_write_flexi_table/output_004.pdf index 741583a8b..db9362064 100644 Binary files a/tests/output/test_write_flexi_table/output_004.pdf and b/tests/output/test_write_flexi_table/output_004.pdf differ diff --git a/tests/output/test_write_flexi_table/output_005.pdf b/tests/output/test_write_flexi_table/output_005.pdf index 2e3f08749..ee1dce0b6 100644 Binary files a/tests/output/test_write_flexi_table/output_005.pdf and b/tests/output/test_write_flexi_table/output_005.pdf differ diff --git a/tests/output/test_write_flexi_table_with_preferred_width/output.pdf b/tests/output/test_write_flexi_table_with_preferred_width/output.pdf index 557b0caab..f2138f398 100644 Binary files a/tests/output/test_write_flexi_table_with_preferred_width/output.pdf and b/tests/output/test_write_flexi_table_with_preferred_width/output.pdf differ diff --git a/tests/output/test_write_flowchart_line_art/output.pdf b/tests/output/test_write_flowchart_line_art/output.pdf index 6336bfe08..466bf27d2 100644 Binary files a/tests/output/test_write_flowchart_line_art/output.pdf and b/tests/output/test_write_flowchart_line_art/output.pdf differ diff --git a/tests/output/test_write_flyer/output.pdf b/tests/output/test_write_flyer/output.pdf index 4fec024fe..bc2a14449 100644 Binary files a/tests/output/test_write_flyer/output.pdf and b/tests/output/test_write_flyer/output.pdf differ diff --git a/tests/output/test_write_form_with_missing_xref/output_001.pdf b/tests/output/test_write_form_with_missing_xref/output_001.pdf index 81b752cb6..16b56b95a 100644 Binary files a/tests/output/test_write_form_with_missing_xref/output_001.pdf and b/tests/output/test_write_form_with_missing_xref/output_001.pdf differ diff --git a/tests/output/test_write_gradient_rectangular_maze/output_001.pdf b/tests/output/test_write_gradient_rectangular_maze/output_001.pdf index 68c04e61a..4e7476e41 100644 Binary files a/tests/output/test_write_gradient_rectangular_maze/output_001.pdf and b/tests/output/test_write_gradient_rectangular_maze/output_001.pdf differ diff --git a/tests/output/test_write_gradient_rectangular_maze/output_002.pdf b/tests/output/test_write_gradient_rectangular_maze/output_002.pdf index eab080ae8..12af80790 100644 Binary files a/tests/output/test_write_gradient_rectangular_maze/output_002.pdf and b/tests/output/test_write_gradient_rectangular_maze/output_002.pdf differ diff --git a/tests/output/test_write_gradient_rectangular_maze/output_003.pdf b/tests/output/test_write_gradient_rectangular_maze/output_003.pdf index 54fc67319..9e0f48fc6 100644 Binary files a/tests/output/test_write_gradient_rectangular_maze/output_003.pdf and b/tests/output/test_write_gradient_rectangular_maze/output_003.pdf differ diff --git a/tests/output/test_write_grayscale_image/output.pdf b/tests/output/test_write_grayscale_image/output.pdf index 6c352bbac..6c1874d38 100644 Binary files a/tests/output/test_write_grayscale_image/output.pdf and b/tests/output/test_write_grayscale_image/output.pdf differ diff --git a/tests/output/test_write_hello_world_with_monaco_font/output_001.pdf b/tests/output/test_write_hello_world_with_monaco_font/output_001.pdf index 72cc2fece..52f26b51b 100644 Binary files a/tests/output/test_write_hello_world_with_monaco_font/output_001.pdf and b/tests/output/test_write_hello_world_with_monaco_font/output_001.pdf differ diff --git a/tests/output/test_write_hello_world_with_simhei_font/output_001.pdf b/tests/output/test_write_hello_world_with_simhei_font/output_001.pdf index aac9ba4b9..148fd326d 100644 Binary files a/tests/output/test_write_hello_world_with_simhei_font/output_001.pdf and b/tests/output/test_write_hello_world_with_simhei_font/output_001.pdf differ diff --git a/tests/output/test_write_hyphenated_paragraph/output_001.pdf b/tests/output/test_write_hyphenated_paragraph/output_001.pdf index 08e7d7bd6..a6ed28fde 100644 Binary files a/tests/output/test_write_hyphenated_paragraph/output_001.pdf and b/tests/output/test_write_hyphenated_paragraph/output_001.pdf differ diff --git a/tests/output/test_write_hyphenated_paragraph/output_002.pdf b/tests/output/test_write_hyphenated_paragraph/output_002.pdf index 49fceaf60..33ad0c783 100644 Binary files a/tests/output/test_write_hyphenated_paragraph/output_002.pdf and b/tests/output/test_write_hyphenated_paragraph/output_002.pdf differ diff --git a/tests/output/test_write_image_aligned_center/output.pdf b/tests/output/test_write_image_aligned_center/output.pdf index af1e1676c..eff72ad42 100644 Binary files a/tests/output/test_write_image_aligned_center/output.pdf and b/tests/output/test_write_image_aligned_center/output.pdf differ diff --git a/tests/output/test_write_image_by_url/output.pdf b/tests/output/test_write_image_by_url/output.pdf index 51fe0fd79..fda08a7b7 100644 Binary files a/tests/output/test_write_image_by_url/output.pdf and b/tests/output/test_write_image_by_url/output.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_000.pdf b/tests/output/test_write_image_with_rounded_borders/output_000.pdf index 4005f37d0..f2367b6c9 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_000.pdf and b/tests/output/test_write_image_with_rounded_borders/output_000.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_001.pdf b/tests/output/test_write_image_with_rounded_borders/output_001.pdf index 2a403ef47..f957c5c33 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_001.pdf and b/tests/output/test_write_image_with_rounded_borders/output_001.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_002.pdf b/tests/output/test_write_image_with_rounded_borders/output_002.pdf index 059358f40..184b74d8b 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_002.pdf and b/tests/output/test_write_image_with_rounded_borders/output_002.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_003.pdf b/tests/output/test_write_image_with_rounded_borders/output_003.pdf index 9d4a5f747..a4ee6b66b 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_003.pdf and b/tests/output/test_write_image_with_rounded_borders/output_003.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_004.pdf b/tests/output/test_write_image_with_rounded_borders/output_004.pdf index 9fa1e52fd..e4cfa4135 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_004.pdf and b/tests/output/test_write_image_with_rounded_borders/output_004.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_005.pdf b/tests/output/test_write_image_with_rounded_borders/output_005.pdf index d1685a5a1..4503e95c2 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_005.pdf and b/tests/output/test_write_image_with_rounded_borders/output_005.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_006.pdf b/tests/output/test_write_image_with_rounded_borders/output_006.pdf index 3d416fa6d..e7a576cc5 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_006.pdf and b/tests/output/test_write_image_with_rounded_borders/output_006.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_007.pdf b/tests/output/test_write_image_with_rounded_borders/output_007.pdf index d46ca9992..792b017d6 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_007.pdf and b/tests/output/test_write_image_with_rounded_borders/output_007.pdf differ diff --git a/tests/output/test_write_image_with_rounded_borders/output_008.pdf b/tests/output/test_write_image_with_rounded_borders/output_008.pdf index 11ff78c07..b04b4ea4e 100644 Binary files a/tests/output/test_write_image_with_rounded_borders/output_008.pdf and b/tests/output/test_write_image_with_rounded_borders/output_008.pdf differ diff --git a/tests/output/test_write_incomplete_table/output.pdf b/tests/output/test_write_incomplete_table/output.pdf index 1bca5821f..b42094efe 100644 Binary files a/tests/output/test_write_incomplete_table/output.pdf and b/tests/output/test_write_incomplete_table/output.pdf differ diff --git a/tests/output/test_write_line_of_text_justified_center/output.pdf b/tests/output/test_write_line_of_text_justified_center/output.pdf index c84a00f65..23453cbbe 100644 Binary files a/tests/output/test_write_line_of_text_justified_center/output.pdf and b/tests/output/test_write_line_of_text_justified_center/output.pdf differ diff --git a/tests/output/test_write_line_of_text_justified_full/output.pdf b/tests/output/test_write_line_of_text_justified_full/output.pdf index 92f99b9f8..cc371d72a 100644 Binary files a/tests/output/test_write_line_of_text_justified_full/output.pdf and b/tests/output/test_write_line_of_text_justified_full/output.pdf differ diff --git a/tests/output/test_write_line_of_text_justified_right/output_001.pdf b/tests/output/test_write_line_of_text_justified_right/output_001.pdf index 46361f34f..3192218c4 100644 Binary files a/tests/output/test_write_line_of_text_justified_right/output_001.pdf and b/tests/output/test_write_line_of_text_justified_right/output_001.pdf differ diff --git a/tests/output/test_write_line_of_text_justified_right/output_002.pdf b/tests/output/test_write_line_of_text_justified_right/output_002.pdf index 83888cbd2..db7e82b63 100644 Binary files a/tests/output/test_write_line_of_text_justified_right/output_002.pdf and b/tests/output/test_write_line_of_text_justified_right/output_002.pdf differ diff --git a/tests/output/test_write_lissajours_line_art/output.pdf b/tests/output/test_write_lissajours_line_art/output.pdf index 2fb728c5b..37b8af5ed 100644 Binary files a/tests/output/test_write_lissajours_line_art/output.pdf and b/tests/output/test_write_lissajours_line_art/output.pdf differ diff --git a/tests/output/test_write_long_unordered_list/output.pdf b/tests/output/test_write_long_unordered_list/output.pdf index 71f54a7fd..589034a0b 100644 Binary files a/tests/output/test_write_long_unordered_list/output.pdf and b/tests/output/test_write_long_unordered_list/output.pdf differ diff --git a/tests/output/test_write_multiple_pages/output.pdf b/tests/output/test_write_multiple_pages/output.pdf index 0bbaa47b6..fd274b183 100644 Binary files a/tests/output/test_write_multiple_pages/output.pdf and b/tests/output/test_write_multiple_pages/output.pdf differ diff --git a/tests/output/test_write_multiple_pages/output.png b/tests/output/test_write_multiple_pages/output.png index 14604e31c..c568025a6 100644 Binary files a/tests/output/test_write_multiple_pages/output.png and b/tests/output/test_write_multiple_pages/output.png differ diff --git a/tests/output/test_write_nested_ordered_list/output.pdf b/tests/output/test_write_nested_ordered_list/output.pdf index 3906cbd5f..3a2192621 100644 Binary files a/tests/output/test_write_nested_ordered_list/output.pdf and b/tests/output/test_write_nested_ordered_list/output.pdf differ diff --git a/tests/output/test_write_nested_unordered_list/output.pdf b/tests/output/test_write_nested_unordered_list/output.pdf index f59ac4d62..b151ea46e 100644 Binary files a/tests/output/test_write_nested_unordered_list/output.pdf and b/tests/output/test_write_nested_unordered_list/output.pdf differ diff --git a/tests/output/test_write_ordered_list/output_001.pdf b/tests/output/test_write_ordered_list/output_001.pdf index 290d894fc..9788b3da7 100644 Binary files a/tests/output/test_write_ordered_list/output_001.pdf and b/tests/output/test_write_ordered_list/output_001.pdf differ diff --git a/tests/output/test_write_ordered_list/output_002.pdf b/tests/output/test_write_ordered_list/output_002.pdf index 1f80b2e22..932c4b44a 100644 Binary files a/tests/output/test_write_ordered_list/output_002.pdf and b/tests/output/test_write_ordered_list/output_002.pdf differ diff --git a/tests/output/test_write_paragraph/output.pdf b/tests/output/test_write_paragraph/output.pdf index 53d6f1514..e5dd81e4a 100644 Binary files a/tests/output/test_write_paragraph/output.pdf and b/tests/output/test_write_paragraph/output.pdf differ diff --git a/tests/output/test_write_paragraph_alignment/output.pdf b/tests/output/test_write_paragraph_alignment/output.pdf index b7a47ea79..02cc9c0f1 100644 Binary files a/tests/output/test_write_paragraph_alignment/output.pdf and b/tests/output/test_write_paragraph_alignment/output.pdf differ diff --git a/tests/output/test_write_paragraph_border_left/output.pdf b/tests/output/test_write_paragraph_border_left/output.pdf index fe59ee73b..188523e3d 100644 Binary files a/tests/output/test_write_paragraph_border_left/output.pdf and b/tests/output/test_write_paragraph_border_left/output.pdf differ diff --git a/tests/output/test_write_paragraph_force_split/output.pdf b/tests/output/test_write_paragraph_force_split/output.pdf index 41bbe8b7e..5c00caf7c 100644 Binary files a/tests/output/test_write_paragraph_force_split/output.pdf and b/tests/output/test_write_paragraph_force_split/output.pdf differ diff --git a/tests/output/test_write_paragraph_justified_center/output_001.pdf b/tests/output/test_write_paragraph_justified_center/output_001.pdf index 8bf03cecd..2c8bf3da7 100644 Binary files a/tests/output/test_write_paragraph_justified_center/output_001.pdf and b/tests/output/test_write_paragraph_justified_center/output_001.pdf differ diff --git a/tests/output/test_write_paragraph_justified_center/output_002.pdf b/tests/output/test_write_paragraph_justified_center/output_002.pdf index ed3c6b5a9..b81ae7eb8 100644 Binary files a/tests/output/test_write_paragraph_justified_center/output_002.pdf and b/tests/output/test_write_paragraph_justified_center/output_002.pdf differ diff --git a/tests/output/test_write_paragraph_justified_center_with_padding/output.pdf b/tests/output/test_write_paragraph_justified_center_with_padding/output.pdf index 664f608fe..77dd87749 100644 Binary files a/tests/output/test_write_paragraph_justified_center_with_padding/output.pdf and b/tests/output/test_write_paragraph_justified_center_with_padding/output.pdf differ diff --git a/tests/output/test_write_paragraph_justified_center_with_padding_and_border/output.pdf b/tests/output/test_write_paragraph_justified_center_with_padding_and_border/output.pdf index 0e0a70391..2fca65655 100644 Binary files a/tests/output/test_write_paragraph_justified_center_with_padding_and_border/output.pdf and b/tests/output/test_write_paragraph_justified_center_with_padding_and_border/output.pdf differ diff --git a/tests/output/test_write_paragraph_justified_center_with_padding_and_border_and_background/output.pdf b/tests/output/test_write_paragraph_justified_center_with_padding_and_border_and_background/output.pdf index e2dda817d..4dc942510 100644 Binary files a/tests/output/test_write_paragraph_justified_center_with_padding_and_border_and_background/output.pdf and b/tests/output/test_write_paragraph_justified_center_with_padding_and_border_and_background/output.pdf differ diff --git a/tests/output/test_write_paragraph_justified_full/output.pdf b/tests/output/test_write_paragraph_justified_full/output.pdf index 1eb667fe1..004929d3d 100644 Binary files a/tests/output/test_write_paragraph_justified_full/output.pdf and b/tests/output/test_write_paragraph_justified_full/output.pdf differ diff --git a/tests/output/test_write_paragraph_justified_right/output.pdf b/tests/output/test_write_paragraph_justified_right/output.pdf index c7856ddb2..2cb3c6554 100644 Binary files a/tests/output/test_write_paragraph_justified_right/output.pdf and b/tests/output/test_write_paragraph_justified_right/output.pdf differ diff --git a/tests/output/test_write_paragraph_preserve_space/output.pdf b/tests/output/test_write_paragraph_preserve_space/output.pdf index 1ac2d2ad5..c00d9d3b1 100644 Binary files a/tests/output/test_write_paragraph_preserve_space/output.pdf and b/tests/output/test_write_paragraph_preserve_space/output.pdf differ diff --git a/tests/output/test_write_paragraph_save_twice/output_001.pdf b/tests/output/test_write_paragraph_save_twice/output_001.pdf index 001076f21..46382812d 100644 Binary files a/tests/output/test_write_paragraph_save_twice/output_001.pdf and b/tests/output/test_write_paragraph_save_twice/output_001.pdf differ diff --git a/tests/output/test_write_paragraph_save_twice/output_002.pdf b/tests/output/test_write_paragraph_save_twice/output_002.pdf index b699a6e70..51573162e 100644 Binary files a/tests/output/test_write_paragraph_save_twice/output_002.pdf and b/tests/output/test_write_paragraph_save_twice/output_002.pdf differ diff --git a/tests/output/test_write_paragraph_with_accented_letters/output.pdf b/tests/output/test_write_paragraph_with_accented_letters/output.pdf index 7338e7562..06afaf4e1 100644 Binary files a/tests/output/test_write_paragraph_with_accented_letters/output.pdf and b/tests/output/test_write_paragraph_with_accented_letters/output.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_000.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_000.pdf index 6245a0a6a..cd7ddf50b 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_000.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_000.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_001.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_001.pdf index 3ae7eb33f..ba18c6efd 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_001.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_001.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_002.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_002.pdf index a9b2a655e..5c280f00e 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_002.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_002.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_003.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_003.pdf index e0fb68722..7df6c183b 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_003.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_003.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_004.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_004.pdf index a12fd5d6d..ad38d8a15 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_004.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_004.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_005.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_005.pdf index c8148346e..ef32764c6 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_005.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_005.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_006.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_006.pdf index 50a2e175c..0b8111e44 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_006.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_006.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_007.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_007.pdf index 8010bad38..fdd68f4b0 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_007.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_007.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_008.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_008.pdf index 2f7664e63..1dd23e13c 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_008.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_008.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_009.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_009.pdf index 620bdb6bc..7b32cb1d1 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_009.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_009.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_010.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_010.pdf index f9d514ec4..12db283fb 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_010.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_010.pdf differ diff --git a/tests/output/test_write_paragraph_with_rounded_borders/output_011.pdf b/tests/output/test_write_paragraph_with_rounded_borders/output_011.pdf index 615178205..8a05babd7 100644 Binary files a/tests/output/test_write_paragraph_with_rounded_borders/output_011.pdf and b/tests/output/test_write_paragraph_with_rounded_borders/output_011.pdf differ diff --git a/tests/output/test_write_paragraphs_using_multi_column_layout/output.pdf b/tests/output/test_write_paragraphs_using_multi_column_layout/output.pdf index 9b45fb59f..20d5f16ff 100644 Binary files a/tests/output/test_write_paragraphs_using_multi_column_layout/output.pdf and b/tests/output/test_write_paragraphs_using_multi_column_layout/output.pdf differ diff --git a/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_005.pdf b/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_005.pdf index 197b7b910..c76374911 100644 Binary files a/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_005.pdf and b/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_005.pdf differ diff --git a/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_010.pdf b/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_010.pdf index dabfb7ba7..813dd8191 100644 Binary files a/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_010.pdf and b/tests/output/test_write_paragraphs_using_multi_column_layout_with_varying_spacing/output_010.pdf differ diff --git a/tests/output/test_write_paragraphs_using_single_column_layout/output.pdf b/tests/output/test_write_paragraphs_using_single_column_layout/output.pdf index 9a6aa405d..6298ab488 100644 Binary files a/tests/output/test_write_paragraphs_using_single_column_layout/output.pdf and b/tests/output/test_write_paragraphs_using_single_column_layout/output.pdf differ diff --git a/tests/output/test_write_paragraphs_with_headings/output.pdf b/tests/output/test_write_paragraphs_with_headings/output.pdf index 891f6c8d7..a4d02edd0 100644 Binary files a/tests/output/test_write_paragraphs_with_headings/output.pdf and b/tests/output/test_write_paragraphs_with_headings/output.pdf differ diff --git a/tests/output/test_write_paragraphs_with_headings/output.png b/tests/output/test_write_paragraphs_with_headings/output.png index 59eab969e..9e2566c8a 100644 Binary files a/tests/output/test_write_paragraphs_with_headings/output.png and b/tests/output/test_write_paragraphs_with_headings/output.png differ diff --git a/tests/output/test_write_pdf_a_1b/output_001.pdf b/tests/output/test_write_pdf_a_1b/output_001.pdf index 02e526a45..415272e83 100644 Binary files a/tests/output/test_write_pdf_a_1b/output_001.pdf and b/tests/output/test_write_pdf_a_1b/output_001.pdf differ diff --git a/tests/output/test_write_pdf_a_1b/output_001_validation.json b/tests/output/test_write_pdf_a_1b/output_001_validation.json index c3d183f1b..aaa4705fa 100644 --- a/tests/output/test_write_pdf_a_1b/output_001_validation.json +++ b/tests/output/test_write_pdf_a_1b/output_001_validation.json @@ -3,7 +3,7 @@ "can-be-optimized": true, "claimed-pdfa-type": "PDF/A-1b", "conforms-to-claimed-pdfa-type": false, - "date": "Sun Jul 3 03:04:35 2022", + "date": "Sat Jul 23 11:43:31 2022", "errors": [ "does-not-conform-to-claimed-pdfa-type" ], diff --git a/tests/output/test_write_pdf_a_1b/output_002.pdf b/tests/output/test_write_pdf_a_1b/output_002.pdf index 83ef6fc30..88d60a0b5 100644 Binary files a/tests/output/test_write_pdf_a_1b/output_002.pdf and b/tests/output/test_write_pdf_a_1b/output_002.pdf differ diff --git a/tests/output/test_write_pdf_a_1b/output_002_validation.json b/tests/output/test_write_pdf_a_1b/output_002_validation.json index d7f881e0b..1dc9eee88 100644 --- a/tests/output/test_write_pdf_a_1b/output_002_validation.json +++ b/tests/output/test_write_pdf_a_1b/output_002_validation.json @@ -3,7 +3,7 @@ "can-be-optimized": true, "claimed-pdfa-type": "PDF/A-1b", "conforms-to-claimed-pdfa-type": false, - "date": "Sun Jul 3 03:04:33 2022", + "date": "Sat Jul 23 11:43:28 2022", "errors": [ "does-not-conform-to-claimed-pdfa-type" ], diff --git a/tests/output/test_write_pil_image/output.pdf b/tests/output/test_write_pil_image/output.pdf index fd5b67dc8..65857214e 100644 Binary files a/tests/output/test_write_pil_image/output.pdf and b/tests/output/test_write_pil_image/output.pdf differ diff --git a/tests/output/test_write_png_image_by_url/output.pdf b/tests/output/test_write_png_image_by_url/output.pdf index 1b7802e01..5aa874c99 100644 Binary files a/tests/output/test_write_png_image_by_url/output.pdf and b/tests/output/test_write_png_image_by_url/output.pdf differ diff --git a/tests/output/test_write_push_button/output_001.pdf b/tests/output/test_write_push_button/output_001.pdf index 5e0be88ec..0fc63aa4e 100644 Binary files a/tests/output/test_write_push_button/output_001.pdf and b/tests/output/test_write_push_button/output_001.pdf differ diff --git a/tests/output/test_write_push_button/output_002.pdf b/tests/output/test_write_push_button/output_002.pdf index b446c916f..41037485d 100644 Binary files a/tests/output/test_write_push_button/output_002.pdf and b/tests/output/test_write_push_button/output_002.pdf differ diff --git a/tests/output/test_write_push_button/output_003.pdf b/tests/output/test_write_push_button/output_003.pdf index 73c802a68..6408acec5 100644 Binary files a/tests/output/test_write_push_button/output_003.pdf and b/tests/output/test_write_push_button/output_003.pdf differ diff --git a/tests/output/test_write_radar_plot/output.pdf b/tests/output/test_write_radar_plot/output.pdf index af4f506ec..35f4ac2d7 100644 Binary files a/tests/output/test_write_radar_plot/output.pdf and b/tests/output/test_write_radar_plot/output.pdf differ diff --git a/tests/output/test_write_rectangular_hitomezashi/output.pdf b/tests/output/test_write_rectangular_hitomezashi/output.pdf index bb2ce57b9..4e322942e 100644 Binary files a/tests/output/test_write_rectangular_hitomezashi/output.pdf and b/tests/output/test_write_rectangular_hitomezashi/output.pdf differ diff --git a/tests/output/test_write_rectangular_maze/output.pdf b/tests/output/test_write_rectangular_maze/output.pdf index b9614e41f..988d05ee8 100644 Binary files a/tests/output/test_write_rectangular_maze/output.pdf and b/tests/output/test_write_rectangular_maze/output.pdf differ diff --git a/tests/output/test_write_single_line_justified_full/output_001.pdf b/tests/output/test_write_single_line_justified_full/output_001.pdf index a429aeacc..b213c61b1 100644 Binary files a/tests/output/test_write_single_line_justified_full/output_001.pdf and b/tests/output/test_write_single_line_justified_full/output_001.pdf differ diff --git a/tests/output/test_write_single_line_justified_full/output_002.pdf b/tests/output/test_write_single_line_justified_full/output_002.pdf index 022b53070..1f6485b14 100644 Binary files a/tests/output/test_write_single_line_justified_full/output_002.pdf and b/tests/output/test_write_single_line_justified_full/output_002.pdf differ diff --git a/tests/output/test_write_table_with_col_span/output.pdf b/tests/output/test_write_table_with_col_span/output.pdf index 43d53e944..75b20adf4 100644 Binary files a/tests/output/test_write_table_with_col_span/output.pdf and b/tests/output/test_write_table_with_col_span/output.pdf differ diff --git a/tests/output/test_write_table_with_image/output.pdf b/tests/output/test_write_table_with_image/output.pdf index 2b763ce43..aa47a7568 100644 Binary files a/tests/output/test_write_table_with_image/output.pdf and b/tests/output/test_write_table_with_image/output.pdf differ diff --git a/tests/output/test_write_table_with_non_black_paragraphs/output.pdf b/tests/output/test_write_table_with_non_black_paragraphs/output.pdf index 8765d704f..e18bf3c7f 100644 Binary files a/tests/output/test_write_table_with_non_black_paragraphs/output.pdf and b/tests/output/test_write_table_with_non_black_paragraphs/output.pdf differ diff --git a/tests/output/test_write_table_with_rainbow_background/output.pdf b/tests/output/test_write_table_with_rainbow_background/output.pdf index da5ffd95b..bdd5dc965 100644 Binary files a/tests/output/test_write_table_with_rainbow_background/output.pdf and b/tests/output/test_write_table_with_rainbow_background/output.pdf differ diff --git a/tests/output/test_write_table_with_rounded_borders/output_000.pdf b/tests/output/test_write_table_with_rounded_borders/output_000.pdf index 26e0b474c..1d7b960de 100644 Binary files a/tests/output/test_write_table_with_rounded_borders/output_000.pdf and b/tests/output/test_write_table_with_rounded_borders/output_000.pdf differ diff --git a/tests/output/test_write_table_with_rounded_borders/output_001.pdf b/tests/output/test_write_table_with_rounded_borders/output_001.pdf index f046cc486..c644d2a4c 100644 Binary files a/tests/output/test_write_table_with_rounded_borders/output_001.pdf and b/tests/output/test_write_table_with_rounded_borders/output_001.pdf differ diff --git a/tests/output/test_write_table_with_rounded_borders/output_002.pdf b/tests/output/test_write_table_with_rounded_borders/output_002.pdf index 75b0250f5..00c416d88 100644 Binary files a/tests/output/test_write_table_with_rounded_borders/output_002.pdf and b/tests/output/test_write_table_with_rounded_borders/output_002.pdf differ diff --git a/tests/output/test_write_table_with_rounded_borders/output_003.pdf b/tests/output/test_write_table_with_rounded_borders/output_003.pdf index 139028b0a..fa6a101c5 100644 Binary files a/tests/output/test_write_table_with_rounded_borders/output_003.pdf and b/tests/output/test_write_table_with_rounded_borders/output_003.pdf differ diff --git a/tests/output/test_write_table_with_rounded_borders/output_004.pdf b/tests/output/test_write_table_with_rounded_borders/output_004.pdf index a88d2f7c4..5f9f4c11d 100644 Binary files a/tests/output/test_write_table_with_rounded_borders/output_004.pdf and b/tests/output/test_write_table_with_rounded_borders/output_004.pdf differ diff --git a/tests/output/test_write_table_with_row_span/output.pdf b/tests/output/test_write_table_with_row_span/output.pdf index 4c4a64e00..c8ab47ca5 100644 Binary files a/tests/output/test_write_table_with_row_span/output.pdf and b/tests/output/test_write_table_with_row_span/output.pdf differ diff --git a/tests/output/test_write_table_with_special_characters/output.pdf b/tests/output/test_write_table_with_special_characters/output.pdf index f933d12a0..36bf04185 100644 Binary files a/tests/output/test_write_table_with_special_characters/output.pdf and b/tests/output/test_write_table_with_special_characters/output.pdf differ diff --git a/tests/output/test_write_table_with_special_characters/output.png b/tests/output/test_write_table_with_special_characters/output.png index 061f3610d..058a66477 100644 Binary files a/tests/output/test_write_table_with_special_characters/output.png and b/tests/output/test_write_table_with_special_characters/output.png differ diff --git a/tests/output/test_write_tents_and_trees/output.pdf b/tests/output/test_write_tents_and_trees/output.pdf index c8178e513..de7b4c18d 100644 Binary files a/tests/output/test_write_tents_and_trees/output.pdf and b/tests/output/test_write_tents_and_trees/output.pdf differ diff --git a/tests/output/test_write_text_area/output_001.pdf b/tests/output/test_write_text_area/output_001.pdf index 85a714f8b..06b3ef395 100644 Binary files a/tests/output/test_write_text_area/output_001.pdf and b/tests/output/test_write_text_area/output_001.pdf differ diff --git a/tests/output/test_write_text_area/output_001.png b/tests/output/test_write_text_area/output_001.png index 45a65db9a..0ff2f76a3 100644 Binary files a/tests/output/test_write_text_area/output_001.png and b/tests/output/test_write_text_area/output_001.png differ diff --git a/tests/output/test_write_text_area/output_002.pdf b/tests/output/test_write_text_area/output_002.pdf index 5b8197681..f58d2bbdf 100644 Binary files a/tests/output/test_write_text_area/output_002.pdf and b/tests/output/test_write_text_area/output_002.pdf differ diff --git a/tests/output/test_write_text_area/output_002.png b/tests/output/test_write_text_area/output_002.png index 8674ff941..28ec692d7 100644 Binary files a/tests/output/test_write_text_area/output_002.png and b/tests/output/test_write_text_area/output_002.png differ diff --git a/tests/output/test_write_text_field/output_001.pdf b/tests/output/test_write_text_field/output_001.pdf index 147859345..2c8c8a9fd 100644 Binary files a/tests/output/test_write_text_field/output_001.pdf and b/tests/output/test_write_text_field/output_001.pdf differ diff --git a/tests/output/test_write_text_field/output_001.png b/tests/output/test_write_text_field/output_001.png index 239ab31af..e4caee752 100644 Binary files a/tests/output/test_write_text_field/output_001.png and b/tests/output/test_write_text_field/output_001.png differ diff --git a/tests/output/test_write_text_field/output_002.pdf b/tests/output/test_write_text_field/output_002.pdf index f64eb1bfc..333263720 100644 Binary files a/tests/output/test_write_text_field/output_002.pdf and b/tests/output/test_write_text_field/output_002.pdf differ diff --git a/tests/output/test_write_two_formfields/output_001.pdf b/tests/output/test_write_two_formfields/output_001.pdf new file mode 100644 index 000000000..f8c62afdf Binary files /dev/null and b/tests/output/test_write_two_formfields/output_001.pdf differ diff --git a/tests/output/test_write_two_formfields/output_002.pdf b/tests/output/test_write_two_formfields/output_002.pdf new file mode 100644 index 000000000..7d16eed31 Binary files /dev/null and b/tests/output/test_write_two_formfields/output_002.pdf differ diff --git a/tests/output/test_write_two_formfields/output_003.pdf b/tests/output/test_write_two_formfields/output_003.pdf new file mode 100644 index 000000000..07c0dd965 Binary files /dev/null and b/tests/output/test_write_two_formfields/output_003.pdf differ diff --git a/tests/output/test_write_two_formfields/output_003_validation.json b/tests/output/test_write_two_formfields/output_003_validation.json new file mode 100644 index 000000000..fd6ba6898 --- /dev/null +++ b/tests/output/test_write_two_formfields/output_003_validation.json @@ -0,0 +1,90 @@ +{ + "analysis-summary": { + "can-be-optimized": false, + "date": "Sat Jul 23 11:36:04 2022", + "input": "/home/joris/Code/borb-dev/tests/output/test_write_two_formfields/output_003.pdf", + "metadata": { + "Author": "", + "CreationDate": "", + "Creator": "", + "Keywords": "", + "ModDate": "", + "Producer": "borb", + "Subject": "", + "Title": "", + "Trapped": "" + }, + "pdf-checker-version": "2.1.0", + "pdf-extension-level": 0, + "pdf-major-version": 1, + "pdf-minor-version": 7, + "profile": "/home/joris/Downloads/PDF-CHECKER-Lin64/PDF_Checker/CheckerProfiles/iso_32000.json", + "size-in-bytes": 1882, + "triggered-abort": "pdf-error" + }, + "cleanup-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "color-images": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "fonts-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "general-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": { + "pdf-error": "Unable to process document due to PDF Error" + }, + "how-to-optimize": {}, + "information": {} + }, + "grayscale-images": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "image-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "monochrome-images": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "objects-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "userdata-results": { + "checks-aborted": [], + "checks-completed": [], + "errors": {}, + "how-to-optimize": {}, + "information": {} + } +} diff --git a/tests/output/test_write_two_formfields/output_004.pdf b/tests/output/test_write_two_formfields/output_004.pdf new file mode 100644 index 000000000..a78277388 Binary files /dev/null and b/tests/output/test_write_two_formfields/output_004.pdf differ diff --git a/tests/output/test_write_unordered_list/output.pdf b/tests/output/test_write_unordered_list/output.pdf index 3ffb23108..10b2c2893 100644 Binary files a/tests/output/test_write_unordered_list/output.pdf and b/tests/output/test_write_unordered_list/output.pdf differ diff --git a/tests/output/test_write_using_low_level_instructions/output.pdf b/tests/output/test_write_using_low_level_instructions/output.pdf index 763206011..fce89c0b8 100644 Binary files a/tests/output/test_write_using_low_level_instructions/output.pdf and b/tests/output/test_write_using_low_level_instructions/output.pdf differ diff --git a/tests/output/test_write_using_low_level_instructions/output.png b/tests/output/test_write_using_low_level_instructions/output.png index bd86f1875..a1c9b925d 100644 Binary files a/tests/output/test_write_using_low_level_instructions/output.png and b/tests/output/test_write_using_low_level_instructions/output.png differ diff --git a/tests/output/test_write_with_truetype_font/output_001.pdf b/tests/output/test_write_with_truetype_font/output_001.pdf index ac02335b2..08eb5c441 100644 Binary files a/tests/output/test_write_with_truetype_font/output_001.pdf and b/tests/output/test_write_with_truetype_font/output_001.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_001_ground_truth.png b/tests/output/test_write_with_truetype_font/output_001_ground_truth.png index e1a8a01a6..f8db7a094 100644 Binary files a/tests/output/test_write_with_truetype_font/output_001_ground_truth.png and b/tests/output/test_write_with_truetype_font/output_001_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_002.pdf b/tests/output/test_write_with_truetype_font/output_002.pdf index 1e3f37ec2..6849b5a11 100644 Binary files a/tests/output/test_write_with_truetype_font/output_002.pdf and b/tests/output/test_write_with_truetype_font/output_002.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_002_ground_truth.png b/tests/output/test_write_with_truetype_font/output_002_ground_truth.png index c634f7654..a61ad0b8e 100644 Binary files a/tests/output/test_write_with_truetype_font/output_002_ground_truth.png and b/tests/output/test_write_with_truetype_font/output_002_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_003.pdf b/tests/output/test_write_with_truetype_font/output_003.pdf index e8f02ba7f..91f3cf046 100644 Binary files a/tests/output/test_write_with_truetype_font/output_003.pdf and b/tests/output/test_write_with_truetype_font/output_003.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_003_ground_truth.png b/tests/output/test_write_with_truetype_font/output_003_ground_truth.png index 1575adb57..00e8fc55b 100644 Binary files a/tests/output/test_write_with_truetype_font/output_003_ground_truth.png and b/tests/output/test_write_with_truetype_font/output_003_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_004.pdf b/tests/output/test_write_with_truetype_font/output_004.pdf index d6aa44a01..64bbd51c5 100644 Binary files a/tests/output/test_write_with_truetype_font/output_004.pdf and b/tests/output/test_write_with_truetype_font/output_004.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_004_ground_truth.png b/tests/output/test_write_with_truetype_font/output_004_ground_truth.png index 906287b4d..9772c5572 100644 Binary files a/tests/output/test_write_with_truetype_font/output_004_ground_truth.png and b/tests/output/test_write_with_truetype_font/output_004_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_005.pdf b/tests/output/test_write_with_truetype_font/output_005.pdf new file mode 100644 index 000000000..615ecaeb7 Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_005.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_005_ground_truth.png b/tests/output/test_write_with_truetype_font/output_005_ground_truth.png new file mode 100644 index 000000000..39d9bed6f Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_005_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_006.pdf b/tests/output/test_write_with_truetype_font/output_006.pdf new file mode 100644 index 000000000..960409cce Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_006.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_006_ground_truth.png b/tests/output/test_write_with_truetype_font/output_006_ground_truth.png new file mode 100644 index 000000000..a484646bb Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_006_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_007.pdf b/tests/output/test_write_with_truetype_font/output_007.pdf new file mode 100644 index 000000000..0110c6e80 Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_007.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_007_ground_truth.png b/tests/output/test_write_with_truetype_font/output_007_ground_truth.png new file mode 100644 index 000000000..a64e396e9 Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_007_ground_truth.png differ diff --git a/tests/output/test_write_with_truetype_font/output_007_validation.json b/tests/output/test_write_with_truetype_font/output_007_validation.json new file mode 100644 index 000000000..b41ee42d5 --- /dev/null +++ b/tests/output/test_write_with_truetype_font/output_007_validation.json @@ -0,0 +1,166 @@ +{ + "analysis-summary": { + "can-be-optimized": true, + "claimed-pdfa-type": "PDF/A-1b", + "conforms-to-claimed-pdfa-type": false, + "date": "Sat Jul 23 11:34:52 2022", + "errors": [ + "does-not-conform-to-claimed-pdfa-type" + ], + "information": [ + "born-digital", + "contains-metadata" + ], + "input": "/home/joris/Code/borb-dev/tests/output/test_write_with_truetype_font/output_007.pdf", + "metadata": { + "Author": "", + "CreationDate": "", + "Creator": "", + "Keywords": "", + "ModDate": "", + "Producer": "borb", + "Subject": "", + "Title": "", + "Trapped": "" + }, + "pdf-checker-version": "2.1.0", + "pdf-extension-level": 0, + "pdf-major-version": 1, + "pdf-minor-version": 7, + "profile": "/home/joris/Downloads/PDF-CHECKER-Lin64/PDF_Checker/CheckerProfiles/iso_32000.json", + "size-in-bytes": 9107, + "triggered-abort": "" + }, + "cleanup-results": { + "checks-aborted": [], + "checks-completed": [ + "suboptimal-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "color-images": { + "checks-aborted": [], + "checks-completed": [ + "image-depth", + "resolution-too-high", + "resolution-too-low", + "uses-jpeg2000-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "fonts-results": { + "checks-aborted": [], + "checks-completed": [ + "fontdescriptor-missing-capheight", + "fontdescriptor-missing-fields", + "found-non-extractible-text", + "uses-fonts-fully-embedded", + "uses-fonts-not-embedded" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "general-results": { + "checks-aborted": [], + "checks-completed": [ + "acroforms-type", + "born-digital", + "claims-pdfe-conformance", + "claims-pdfua-conformance", + "claims-pdfvt-conformance", + "claims-pdfx-conformance", + "contains-owner-password", + "contains-signature", + "damaged", + "does-not-conform-to-claimed-pdfa-type", + "image-only", + "password-protected", + "pdf-v2", + "tagged-pdf", + "unable-to-open", + "xfa-type" + ], + "errors": { + "does-not-conform-to-claimed-pdfa-type": [ + "Total: (1 instance)" + ] + }, + "how-to-optimize": { + "does-not-conform-to-claimed-pdfa-type": [ + "Document claims to be PDF/A-1b conformant, but it is not, try using PDF Optimizer to convert to a compliant PDF/A document. (1 instance)" + ] + }, + "information": { + "born-digital": [ + "Document was born digital. It was produced from PDF authoring software and so it may contain text, images, tables, forms, and other objects. These types of PDFs typically do not require OCR." + ] + } + }, + "grayscale-images": { + "checks-aborted": [], + "checks-completed": [ + "resolution-too-high", + "resolution-too-low", + "uses-jpeg2000-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "image-results": { + "checks-aborted": [], + "checks-completed": [ + "alternate-images" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "monochrome-images": { + "checks-aborted": [], + "checks-completed": [ + "resolution-too-high", + "resolution-too-low", + "uses-jbig2-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "objects-results": { + "checks-aborted": [], + "checks-completed": [ + "contains-javascript-actions", + "contains-thumbnails" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "userdata-results": { + "checks-aborted": [], + "checks-completed": [ + "contains-annots", + "contains-annots-not-for-printing", + "contains-annots-not-for-viewing", + "contains-annots-without-normal-appearances", + "contains-embedded-files", + "contains-metadata", + "contains-optional-content", + "contains-private-data", + "contains-transparency" + ], + "errors": {}, + "how-to-optimize": {}, + "information": { + "contains-metadata": [ + "SubType: XML, Update region size: 0 (1 instance)" + ] + } + } +} diff --git a/tests/output/test_write_with_truetype_font/output_008.pdf b/tests/output/test_write_with_truetype_font/output_008.pdf new file mode 100644 index 000000000..69c29cbce Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_008.pdf differ diff --git a/tests/output/test_write_with_truetype_font/output_008.png b/tests/output/test_write_with_truetype_font/output_008.png new file mode 100644 index 000000000..6c9121573 Binary files /dev/null and b/tests/output/test_write_with_truetype_font/output_008.png differ diff --git a/tests/output/test_write_with_truetype_font/output_008_validation.json b/tests/output/test_write_with_truetype_font/output_008_validation.json new file mode 100644 index 000000000..580381290 --- /dev/null +++ b/tests/output/test_write_with_truetype_font/output_008_validation.json @@ -0,0 +1,171 @@ +{ + "analysis-summary": { + "can-be-optimized": true, + "claimed-pdfa-type": "PDF/A-1b", + "conforms-to-claimed-pdfa-type": false, + "date": "Sat Jul 23 11:34:56 2022", + "errors": [ + "does-not-conform-to-claimed-pdfa-type" + ], + "information": [ + "born-digital", + "contains-metadata", + "suboptimal-compression" + ], + "input": "/home/joris/Code/borb-dev/tests/output/test_write_with_truetype_font/output_008.pdf", + "metadata": { + "Author": "", + "CreationDate": "", + "Creator": "", + "Keywords": "", + "ModDate": "", + "Producer": "borb", + "Subject": "", + "Title": "", + "Trapped": "" + }, + "pdf-checker-version": "2.1.0", + "pdf-extension-level": 0, + "pdf-major-version": 1, + "pdf-minor-version": 7, + "profile": "/home/joris/Downloads/PDF-CHECKER-Lin64/PDF_Checker/CheckerProfiles/iso_32000.json", + "size-in-bytes": 12516, + "triggered-abort": "" + }, + "cleanup-results": { + "checks-aborted": [], + "checks-completed": [ + "suboptimal-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": { + "suboptimal-compression": [ + "Uncompressed: (4 instances)" + ] + } + }, + "color-images": { + "checks-aborted": [], + "checks-completed": [ + "image-depth", + "resolution-too-high", + "resolution-too-low", + "uses-jpeg2000-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "fonts-results": { + "checks-aborted": [], + "checks-completed": [ + "fontdescriptor-missing-capheight", + "fontdescriptor-missing-fields", + "found-non-extractible-text", + "uses-fonts-fully-embedded", + "uses-fonts-not-embedded" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "general-results": { + "checks-aborted": [], + "checks-completed": [ + "acroforms-type", + "born-digital", + "claims-pdfe-conformance", + "claims-pdfua-conformance", + "claims-pdfvt-conformance", + "claims-pdfx-conformance", + "contains-owner-password", + "contains-signature", + "damaged", + "does-not-conform-to-claimed-pdfa-type", + "image-only", + "password-protected", + "pdf-v2", + "tagged-pdf", + "unable-to-open", + "xfa-type" + ], + "errors": { + "does-not-conform-to-claimed-pdfa-type": [ + "Total: (1 instance)" + ] + }, + "how-to-optimize": { + "does-not-conform-to-claimed-pdfa-type": [ + "Document claims to be PDF/A-1b conformant, but it is not, try using PDF Optimizer to convert to a compliant PDF/A document. (1 instance)" + ] + }, + "information": { + "born-digital": [ + "Document was born digital. It was produced from PDF authoring software and so it may contain text, images, tables, forms, and other objects. These types of PDFs typically do not require OCR." + ] + } + }, + "grayscale-images": { + "checks-aborted": [], + "checks-completed": [ + "resolution-too-high", + "resolution-too-low", + "uses-jpeg2000-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "image-results": { + "checks-aborted": [], + "checks-completed": [ + "alternate-images" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "monochrome-images": { + "checks-aborted": [], + "checks-completed": [ + "resolution-too-high", + "resolution-too-low", + "uses-jbig2-compression" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "objects-results": { + "checks-aborted": [], + "checks-completed": [ + "contains-javascript-actions", + "contains-thumbnails" + ], + "errors": {}, + "how-to-optimize": {}, + "information": {} + }, + "userdata-results": { + "checks-aborted": [], + "checks-completed": [ + "contains-annots", + "contains-annots-not-for-printing", + "contains-annots-not-for-viewing", + "contains-annots-without-normal-appearances", + "contains-embedded-files", + "contains-metadata", + "contains-optional-content", + "contains-private-data", + "contains-transparency" + ], + "errors": {}, + "how-to-optimize": {}, + "information": { + "contains-metadata": [ + "SubType: XML, Update region size: 0 (1 instance)" + ] + } + } +} diff --git a/tests/output/test_write_xl_image/output.pdf b/tests/output/test_write_xl_image/output.pdf index 44f6c7443..f6d236f3a 100644 Binary files a/tests/output/test_write_xl_image/output.pdf and b/tests/output/test_write_xl_image/output.pdf differ diff --git a/tests/pdf/canvas/font/test_write_with_truetype_font.py b/tests/pdf/canvas/font/test_write_with_truetype_font.py index bf0292611..eafd2c2f4 100644 --- a/tests/pdf/canvas/font/test_write_with_truetype_font.py +++ b/tests/pdf/canvas/font/test_write_with_truetype_font.py @@ -3,6 +3,8 @@ from pathlib import Path from borb.io.read.types import Decimal +from borb.io.write.conformance_level import ConformanceLevel +from borb.io.write.transformer import WriteTransformerState from borb.pdf.canvas.color.color import HexColor from borb.pdf.canvas.font.simple_font.true_type_font import TrueTypeFont from borb.pdf.canvas.layout.annotation.square_annotation import SquareAnnotation @@ -11,6 +13,9 @@ from borb.pdf.canvas.layout.table.fixed_column_width_table import ( FixedColumnWidthTable as Table, ) +from borb.io.write.any_object_transformer import ( + AnyObjectTransformer as WriteAnyObjectTransformer, +) from borb.pdf.canvas.layout.text.paragraph import Paragraph from borb.pdf.document.document import Document from borb.pdf.page.page import Page @@ -35,60 +40,6 @@ def __init__(self, methodName="runTest"): if not self.output_dir.exists(): self.output_dir.mkdir() - def test_write_document_004(self): - - # create document - pdf = Document() - - # add page - page = Page() - pdf.add_page(page) - - # layout - layout: PageLayout = SingleColumnLayout(page) - - # add test information - layout.add( - Table(number_of_columns=2, number_of_rows=3) - .add(Paragraph("Date", font="Helvetica-Bold")) - .add(Paragraph(datetime.now().strftime("%d/%m/%Y, %H:%M:%S"))) - .add(Paragraph("Test", font="Helvetica-Bold")) - .add(Paragraph(Path(__file__).stem)) - .add(Paragraph("Description", font="Helvetica-Bold")) - .add( - Paragraph( - "This test loads a truetype _font from a .ttf file and attempts to use it to write the text A B. The bounding box of the text is then drawn." - ) - ) - .set_padding_on_all_cells(Decimal(2), Decimal(2), Decimal(2), Decimal(2)) - ) - - # path to _font - font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" - assert font_path.exists() - - # add paragraph - p: Paragraph = Paragraph( - "A B", font=TrueTypeFont.true_type_font_from_file(font_path) - ) - layout.add(p) - - # add box - page.add_annotation( - SquareAnnotation(p.get_bounding_box(), stroke_color=HexColor("ff0000")) - ) - - # determine output location - out_file = self.output_dir / "output_004.pdf" - - # attempt to store PDF - with open(out_file, "wb") as in_file_handle: - PDF.dumps(in_file_handle, pdf) - - # compare visually - compare_visually_to_ground_truth(out_file) - check_pdf_using_validator(out_file) - def test_write_document_001(self): # create document @@ -328,3 +279,275 @@ def test_write_document_003(self): # compare visually compare_visually_to_ground_truth(out_file) check_pdf_using_validator(out_file) + + def test_write_document_004(self): + + # create document + pdf = Document() + + # add page + page = Page() + pdf.add_page(page) + + # layout + layout: PageLayout = SingleColumnLayout(page) + + # add test information + layout.add( + Table(number_of_columns=2, number_of_rows=3) + .add(Paragraph("Date", font="Helvetica-Bold")) + .add(Paragraph(datetime.now().strftime("%d/%m/%Y, %H:%M:%S"))) + .add(Paragraph("Test", font="Helvetica-Bold")) + .add(Paragraph(Path(__file__).stem)) + .add(Paragraph("Description", font="Helvetica-Bold")) + .add( + Paragraph( + "This test loads a truetype _font from a .ttf file and attempts to use it to write the text A B. The bounding box of the text is then drawn." + ) + ) + .set_padding_on_all_cells(Decimal(2), Decimal(2), Decimal(2), Decimal(2)) + ) + + # path to _font + font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" + # font_path: Path = Path("/home/joris/font_subsetting_issues/font-outtake.ttf") + assert font_path.exists() + + # add paragraph + p: Paragraph = Paragraph( + "ABC", font=TrueTypeFont.true_type_font_from_file(font_path) + ) + layout.add(p) + + # add box + page.add_annotation( + SquareAnnotation(p.get_bounding_box(), stroke_color=HexColor("ff0000")) + ) + + # determine output location + out_file = self.output_dir / "output_004.pdf" + + # attempt to store PDF + with open(out_file, "wb") as in_file_handle: + PDF.dumps(in_file_handle, pdf) + + # compare visually + compare_visually_to_ground_truth(out_file) + check_pdf_using_validator(out_file) + + def test_write_document_005(self): + """ + This test explicitly writes a compressed with a TrueType subset font + :return: + """ + # create document + pdf = Document() + + # add page + page = Page() + pdf.add_page(page) + + # layout + layout: PageLayout = SingleColumnLayout(page) + + # add test information + layout.add( + Table(number_of_columns=2, number_of_rows=3) + .add(Paragraph("Date", font="Helvetica-Bold")) + .add(Paragraph(datetime.now().strftime("%d/%m/%Y, %H:%M:%S"))) + .add(Paragraph("Test", font="Helvetica-Bold")) + .add(Paragraph(Path(__file__).stem)) + .add(Paragraph("Description", font="Helvetica-Bold")) + .add( + Paragraph( + "This test loads a truetype _font from a .ttf file and attempts to use it to write the text A B. The bounding box of the text is then drawn." + ) + ) + .set_padding_on_all_cells(Decimal(2), Decimal(2), Decimal(2), Decimal(2)) + ) + + # path to _font + font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" + assert font_path.exists() + + # add paragraph + p: Paragraph = Paragraph( + "ABC", font=TrueTypeFont.true_type_font_from_file(font_path) + ) + layout.add(p) + + # determine output location + out_file = self.output_dir / "output_005.pdf" + + # attempt to store PDF + with open(out_file, "wb") as out_file_handle: + wts: WriteTransformerState = WriteTransformerState( + root_object=pdf, + destination=out_file_handle, + ) + wts.apply_font_subsetting = True + WriteAnyObjectTransformer().transform( + object_to_transform=pdf, + context=wts, + destination=out_file_handle, + ) + + # compare visually + compare_visually_to_ground_truth(out_file) + check_pdf_using_validator(out_file) + + def test_write_document_006(self): + """ + This test explicitly writes an uncompressed with a TrueType subset font + :return: + """ + # create document + pdf = Document() + + # add page + page = Page() + pdf.add_page(page) + + # layout + layout: PageLayout = SingleColumnLayout(page) + + # add test information + layout.add( + Table(number_of_columns=2, number_of_rows=3) + .add(Paragraph("Date", font="Helvetica-Bold")) + .add(Paragraph(datetime.now().strftime("%d/%m/%Y, %H:%M:%S"))) + .add(Paragraph("Test", font="Helvetica-Bold")) + .add(Paragraph(Path(__file__).stem)) + .add(Paragraph("Description", font="Helvetica-Bold")) + .add( + Paragraph( + "This test loads a truetype _font from a .ttf file and attempts to use it to write the text A B. The bounding box of the text is then drawn." + ) + ) + .set_padding_on_all_cells(Decimal(2), Decimal(2), Decimal(2), Decimal(2)) + ) + + # path to _font + font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" + # font_path: Path = Path("/home/joris/font_subsetting_issues/font-outtake.ttf") + assert font_path.exists() + + # add paragraph + p: Paragraph = Paragraph( + "ABC", font=TrueTypeFont.true_type_font_from_file(font_path) + ) + layout.add(p) + + # determine output location + out_file = self.output_dir / "output_006.pdf" + + # attempt to store PDF + with open(out_file, "wb") as out_file_handle: + wts: WriteTransformerState = WriteTransformerState( + root_object=pdf, + destination=out_file_handle, + ) + wts.apply_font_subsetting = True + wts.compression_level = 0 + WriteAnyObjectTransformer().transform( + object_to_transform=pdf, + context=wts, + destination=out_file_handle, + ) + + # compare visually + compare_visually_to_ground_truth(out_file) + check_pdf_using_validator(out_file) + + def test_write_document_007(self): + """ + This test explicitly writes a compressed with a TrueType subset font + :return: + """ + # create document + pdf = Document() + + # add page + page = Page() + pdf.add_page(page) + + # layout + layout: PageLayout = SingleColumnLayout(page) + + # path to _font + font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" + assert font_path.exists() + + # add paragraph + p: Paragraph = Paragraph( + "ABC", font=TrueTypeFont.true_type_font_from_file(font_path) + ) + layout.add(p) + + # determine output location + out_file = self.output_dir / "output_007.pdf" + + # attempt to store PDF + with open(out_file, "wb") as out_file_handle: + wts: WriteTransformerState = WriteTransformerState( + root_object=pdf, + destination=out_file_handle, + ) + wts.apply_font_subsetting = True + wts.conformance_level = ConformanceLevel.PDFA_1B + WriteAnyObjectTransformer().transform( + object_to_transform=pdf, + context=wts, + destination=out_file_handle, + ) + + # compare visually + compare_visually_to_ground_truth(out_file) + check_pdf_using_validator(out_file) + + def test_write_document_008(self): + """ + This test explicitly writes an uncompressed with a TrueType subset font + :return: + """ + # create document + pdf = Document() + + # add page + page = Page() + pdf.add_page(page) + + # layout + layout: PageLayout = SingleColumnLayout(page) + + # path to _font + font_path: Path = Path(__file__).parent / "Pacifico-Regular.ttf" + assert font_path.exists() + + # add paragraph + p: Paragraph = Paragraph( + "ABC", font=TrueTypeFont.true_type_font_from_file(font_path) + ) + layout.add(p) + + # determine output location + out_file = self.output_dir / "output_008.pdf" + + # attempt to store PDF + with open(out_file, "wb") as out_file_handle: + wts: WriteTransformerState = WriteTransformerState( + root_object=pdf, + destination=out_file_handle, + ) + wts.apply_font_subsetting = True + wts.compression_level = 0 + wts.conformance_level = ConformanceLevel.PDFA_1B + WriteAnyObjectTransformer().transform( + object_to_transform=pdf, + context=wts, + destination=out_file_handle, + ) + + # compare visually + compare_visually_to_ground_truth(out_file) + check_pdf_using_validator(out_file) diff --git a/tests/pdf/canvas/layout/forms/test_write_two_formfields.py b/tests/pdf/canvas/layout/forms/test_write_two_formfields.py new file mode 100644 index 000000000..79353825a --- /dev/null +++ b/tests/pdf/canvas/layout/forms/test_write_two_formfields.py @@ -0,0 +1,193 @@ +import unittest +from pathlib import Path + +import typing + +from borb.io.read.types import Name +from borb.pdf import Document, Page, SingleColumnLayout, PageLayout, PDF +from borb.pdf.canvas.layout.forms.check_box import CheckBox +from borb.pdf.canvas.layout.forms.drop_down_list import DropDownList +from borb.pdf.canvas.layout.forms.text_area import TextArea +from borb.pdf.canvas.layout.forms.text_field import TextField +from tests.test_util import check_pdf_using_validator + + +class TestWriteTwoFormFields(unittest.TestCase): + """ + This test attempts to insert two FormField objects in a PDF + """ + + def __init__(self, methodName="runTest"): + super().__init__(methodName) + # find output dir + p: Path = Path(__file__).parent + while "output" not in [x.stem for x in p.iterdir() if x.is_dir()]: + p = p.parent + p = p / "output" + self.output_dir = Path(p, Path(__file__).stem.replace(".py", "")) + if not self.output_dir.exists(): + self.output_dir.mkdir() + + def test_write_two_textfields(self): + + # create Document + d: Document = Document() + + # create Page + p: Page = Page() + d.add_page(p) + + # create PageLayout + l: PageLayout = SingleColumnLayout(p) + + # add + for _ in range(0, 2): + l.add(TextField()) + + # store + out_file: Path = self.output_dir / "output_001.pdf" + with open(out_file, "wb") as fh: + PDF.dumps(fh, d) + + # check PDF syntax + check_pdf_using_validator(out_file) + + # load + with open(out_file, "rb") as fh: + d = PDF.loads(fh) + + # get AcroForm/Fields + fields: typing.List[typing.Dict[Name, typing.Any]] = d["XRef"]["Trailer"][ + "Root" + ]["AcroForm"]["Fields"] + + # get object number of each /AP + aps: typing.List[int] = [ + x.get_reference().object_number for x in fields if "AP" in x + ] + + # check whether each /AP is unique + assert len(aps) == len(set(aps)) + + def test_write_two_textareas(self): + + # create Document + d: Document = Document() + + # create Page + p: Page = Page() + d.add_page(p) + + # create PageLayout + l: PageLayout = SingleColumnLayout(p) + + # add + for _ in range(0, 2): + l.add(TextArea()) + + # store + out_file: Path = self.output_dir / "output_002.pdf" + with open(out_file, "wb") as fh: + PDF.dumps(fh, d) + + # check PDF syntax + check_pdf_using_validator(out_file) + + # load + with open(out_file, "rb") as fh: + d = PDF.loads(fh) + + # get AcroForm/Fields + fields: typing.List[typing.Dict[Name, typing.Any]] = d["XRef"]["Trailer"][ + "Root" + ]["AcroForm"]["Fields"] + + # get object number of each /AP + aps: typing.List[int] = [ + x.get_reference().object_number for x in fields if "AP" in x + ] + + # check whether each /AP is unique + assert len(aps) == len(set(aps)) + + def test_write_two_checkboxes(self): + + # create Document + d: Document = Document() + + # create Page + p: Page = Page() + d.add_page(p) + + # create PageLayout + l: PageLayout = SingleColumnLayout(p) + + # add + for _ in range(0, 2): + l.add(CheckBox()) + + # store + out_file: Path = self.output_dir / "output_003.pdf" + with open(out_file, "wb") as fh: + PDF.dumps(fh, d) + + # check PDF syntax + check_pdf_using_validator(out_file) + + # load + with open(out_file, "rb") as fh: + d = PDF.loads(fh) + + # get AcroForm/Fields + fields: typing.List[typing.Dict[Name, typing.Any]] = d["XRef"]["Trailer"][ + "Root" + ]["AcroForm"]["Fields"] + + # get object number of each /AP + aps: typing.List[int] = [ + x.get_reference().object_number for x in fields if "AP" in x + ] + + # check whether each /AP is unique + assert len(aps) == len(set(aps)) + + def test_write_two_dropdownlists(self): + + # create Document + d: Document = Document() + + # create Page + p: Page = Page() + d.add_page(p) + + # create PageLayout + l: PageLayout = SingleColumnLayout(p) + + # add + for _ in range(0, 2): + l.add(DropDownList()) + + # store + out_file: Path = self.output_dir / "output_004.pdf" + with open(out_file, "wb") as fh: + PDF.dumps(fh, d) + + # check PDF syntax + check_pdf_using_validator(out_file) + + # load + with open(out_file, "rb") as fh: + d = PDF.loads(fh) + + # get AcroForm/Fields + fields: typing.List[typing.Dict[Name, typing.Any]] = d["XRef"]["Trailer"][ + "Root" + ]["AcroForm"]["Fields"] + + # get object number of each /AP + aps: typing.List[int] = [ + x.get_reference().object_number for x in fields if "AP" in x + ] + + # check whether each /AP is unique + assert len(aps) == len(set(aps))