Hi @Ryan ,
I’m trying to figure out a solution for this in an aws lambda image (public.ecr.aws/lambda/nodejs:20.2023.12.13.20-arm64), the command you shared here doesn’t solve the pdfnet error for me.
What specifically is PDFWorker looking for from the locale settings?
More specifically looking at locale there seems to be a key file (/etc/locale.conf ?) missing in the aws/lambda/nodejs:20 image that is preset in the nodejs:14 image, where my pdftron function code executes without the locale error:
# public.ecr.aws/lambda/nodejs:14.2024.03.28.15-arm64
sh-4.2# uname -m
aarch64
sh-4.2# node -v
v14.21.3
sh-4.2# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
sh-4.2#
# public.ecr.aws/lambda/nodejs:20-arm64
sh-5.2# uname -m
aarch64
sh-5.2# node -v
v20.11.1
sh-5.2# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
sh-5.2#
I found my missing package; for the AWS provided Lambda images for nodejs, the required package for the PDFTron addon is glibc-langpack-en . I think this is specifically for operations using the Convert class.