Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 27 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8240521
[MNT-23960] Added options (pdfFont, pdfFontSize) and NotoSans fonts t…
tiagosalvado10 Nov 14, 2023
67cd4c3
Merge branch 'master' into fix/MNT-23960_add-notosans-and-font-options
tiagosalvado10 Nov 14, 2023
c6ff737
[MNT-23960] Added options (pdfFont, pdfFontSize) to AIOTikaTest
tiagosalvado10 Nov 15, 2023
7cefdca
[MNT-23960] Changed the way how font is loaded
tiagosalvado10 Nov 15, 2023
759413b
[MNT-23960] Added constants for default font and font size
tiagosalvado10 Nov 15, 2023
901abd2
[MNT-23960] Removed NotoSans files. Obtain the chosen font from stand…
tiagosalvado10 Jan 29, 2024
68f0b36
Merge branch 'master' into fix/MNT-23960_add-notosans-and-font-options
tiagosalvado10 Feb 2, 2024
196df70
[MNT-23960] Added 'MISC_PDFBOX_DEFAULT_FONT' and 'transform.core.misc…
tiagosalvado10 Feb 2, 2024
1974977
[MNT-23960] Added NotoSans fonts to core-aio and misc T-Engine images
tiagosalvado10 Feb 2, 2024
72f60de
Removed unused var
tiagosalvado10 Feb 2, 2024
1fa2ed0
[MNT-23960] Changed fonts target path to /usr/local/share/fonts
tiagosalvado10 Feb 5, 2024
f82f4e1
[MNT-23960] Removed variable that was used for tests context but it i…
tiagosalvado10 Feb 6, 2024
a752a98
[MNT-23960] Changed test variables name from 'ABREVE' to 'A_BREVE'
tiagosalvado10 Feb 6, 2024
932de1b
[MNT-23960] Changed 'pdfBoxDefaultFont' visibility to private and de…
tiagosalvado10 Feb 6, 2024
1efe6fe
[MNT-23960] Changed 'DEFAULT_FONT_SIZE' visibility to private and cha…
tiagosalvado10 Feb 6, 2024
4e6bf1f
[MNT-23960] Changed 'abreve' occurrences to 'breve'
tiagosalvado10 Feb 6, 2024
7d63b59
[MNT-23960] Improved logging: added messages, using placeholders
tiagosalvado10 Feb 6, 2024
a1bbafb
[MNT-23960] Added DEFAULT_FONT constant (NotoSans-Regular)
tiagosalvado10 Feb 6, 2024
e4d04d7
[MNT-23960] Font size parameter minor changes
tiagosalvado10 Feb 6, 2024
8e8538a
[MNT-23960] Splitted getFont(PDDocument, String) code into 3 methods.…
tiagosalvado10 Feb 6, 2024
d7f801e
[MNT-23960] Changed getFont(PDDocument, String)
tiagosalvado10 Feb 6, 2024
70caa22
[MNT-23960] Improved validation
tiagosalvado10 Feb 6, 2024
ce60d28
[MNT-23960] Return TransformCheckResult on transformTextAndCheck meth…
tiagosalvado10 Feb 6, 2024
efe1545
Improved getFont(PDDocument, String) JavaDoc
tiagosalvado10 Feb 6, 2024
8ca9bc4
[MNT-23960] Changed how exceptions are supplied to log messages
tiagosalvado10 Feb 6, 2024
224d728
Merge branch 'fix/MNT-23960_add-notosans-and-font-options' of github.…
tiagosalvado10 Feb 6, 2024
5c7a66e
[MNT-23960] Changed log statements print format
tiagosalvado10 Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/external-engine-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following externalized T-engines properties are available:
| ACTIVEMQ_PASSWORD | ActiveMQ Password. | admin |
| FILE_STORE_URL | T-Engine Port. | http://localhost:8099/alfresco/api/-default-/private/sfs/versions/1/file |
| TRANSFORM_ENGINE_REQUEST_QUEUE | T-Engine queue used for async requests. | org.alfresco.transform.engine.misc.acs |
| MISC_PDFBOX_DEFAULT_FONT | Default font used by PdfBox | NotoSans-Regular |

## Libreoffice
| Property | Description | Default value |
Expand Down Expand Up @@ -96,4 +97,5 @@ The following externalized T-engines properties are available:
| IMAGEMAGICK_DYN | Path to Imagemagick DYLD. | /usr/lib64/ImageMagick-7.0.10/lib |
| IMAGEMAGICK_EXE | Path to Imagemagick EXE. | /usr/bin/convert |
| IMAGEMAGICK_CODERS | Path to Imagemagick custom coders. | |
| IMAGEMAGICK_CONFIG | Path to Imagemagick custom config. | |
| IMAGEMAGICK_CONFIG | Path to Imagemagick custom config. | |
| MISC_PDFBOX_DEFAULT_FONT | Default font used by PdfBox | NotoSans-Regular |
1 change: 1 addition & 0 deletions engines/aio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand Down
3 changes: 3 additions & 0 deletions engines/aio/src/main/resources/application-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public void optionListTest()
"startPage",
"targetEncoding",
"thumbnail",
"width"
"width",
"pdfFont",
"pdfFontSize"
),
getOptionNames(controller.transformConfig(0).getBody().getTransformOptions()));
}
Expand Down
1 change: 1 addition & 0 deletions engines/misc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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} ${MISCUSERNAME} && \
Expand Down
1 change: 1 addition & 0 deletions engines/misc/LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* commons-compress, PDFBox and poi-ooxml are from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0 or the
[Apache 2.0.txt](src/main/resources/licenses/3rd-party/Apache%202.0.txt)
file placed in the root directory of the docker image.
* NotoSans https://openfontlicense.org/open-font-license-official-text/
Loading
Loading