[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.
This commit is contained in:
tiagosalvado10
2024-02-06 16:26:25 +00:00
committed by GitHub
parent bb5d86135d
commit b9bcc3c9d2
16 changed files with 555 additions and 52 deletions

View File

@@ -76,6 +76,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()));
}