[MNT-24238] Added new options (pdfFont, pdfFontSize) to textToPdf transformer (#885) (#929)

* [MNT-23960] Added new options (pdfFont, pdfFontSize) to textToPdf transformer (#885)

* [MNT-23960] Added options (pdfFont, pdfFontSize) and NotoSans fonts to textToPdf transformer

* [MNT-23960] Added 'MISC_PDFBOX_DEFAULT_FONT' and 'transform.core.misc.pdfbox.defaultFont' configuration to core-aio and misc T-Engines

* [MNT-23960] Added NotoSans fonts to core-aio and misc T-Engine images

* [MNT-23960] Improved logging: added messages, using placeholders

* [MNT-23960] Added DEFAULT_FONT constant (NotoSans-Regular)

* [MNT-23960] Splitted getFont(PDDocument, String) code into 3 methods. Added Javadoc.

* [MNT-23960] Return TransformCheckResult on transformTextAndCheck methods. Added assertion to testUTF8WithBOM test.

(cherry picked from commit b9bcc3c9d2)

* [MNT-24238] Removed jakarta.annotation.PostConstruct import
This commit is contained in:
tiagosalvado10
2024-02-16 17:11:18 +00:00
committed by GitHub
parent 5040c8197d
commit 65ac8f9aed
16 changed files with 556 additions and 52 deletions

View File

@@ -62,6 +62,7 @@ ADD target/generated-resources/licenses /licenses
ADD target/generated-resources/licenses.xml /licenses/
ADD target/generated-sources/license/THIRD-PARTY.txt /licenses/
COPY target/classes/licenses/3rd-party/ /
COPY target/classes/fonts/NotoSans /usr/local/share/fonts/NotoSans
RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
useradd -u ${USERID} -G ${GROUPNAME} ${AIOUSERNAME} && \

View File

@@ -24,3 +24,6 @@ transform:
exifTool:
windowsOS: 'exiftool -args -G1 -sep "|||" #{"$"}{INPUT}'
unixOS: 'env FOO=#{"$"}{OUTPUT} exiftool -args -G1 -sep "|||" #{"$"}{INPUT}'
misc:
pdfBox:
defaultFont: ${MISC_PDFBOX_DEFAULT_FONT:NotoSans-Regular}

View File

@@ -71,7 +71,9 @@ public class AIOTikaTest extends TikaTest
"startPage",
"targetEncoding",
"thumbnail",
"width"
"width",
"pdfFont",
"pdfFontSize"
),
getOptionNames(controller.transformConfig(0).getBody().getTransformOptions()));
}