I am trying to generate a PDF from an Excel (.xlsx) file via command line on Azure AppService (Windows) environment.
The Excel file uses custom characters defined in the Private Use Area (PUA) with a specific custom font explicitly set within Excel.
Since OS-level font installation is not permitted on AppService, I followed the instructions at the following URL and placed the custom TrueType font under share\fonts\truetype
within LibreOffice Portable:
The version of soffice.com
is as follows:
.\soffice.com --version
LibreOffice 7.6.7.2
When I test this approach on a local Windows 10 machine, the font is correctly embedded in the PDF output and the custom characters display properly.
However, when performing the PDF conversion in the same manner on AppService, a different font (ming-lt-hkscs-uni-h
) is embedded instead of the specified custom font, resulting in different characters being displayed in the PDF.
An example of the command actually run on AppService is as follows:
C:\home\LibreOfficePortable\App\libreoffice\program\soffice.com ^
--headless --language=ja --convert-to pdf ^
--outdir "C:\home\test" "C:\home\test\sample.xlsx"
Questions:
- Is there a reliable way to ensure that fonts placed under
share/fonts/truetype
are embedded when converting withsoffice.com
via the command line? - How can I prevent unintended fallback fonts (such as
ming-lt-hkscs-uni-h
) from being embedded instead?
If anyone has experience or advice on this issue, I would greatly appreciate your help.
Thank you very much in advance.