Fallback font not working

Run the docker image

docker run --name webviewer-server -p 8090:8090 --net pdftron-network -e TRN_PDFNET_KEY=XXXX -e TRN_MAX_CACHED_MB=50000 pdftron/webviewer-server:2.1.0

Upload fonts in /usr/share/fonts/truetype
Upload the fonts.json in /usr/share/fonts and /usr/share/fonts/truetype

Now Upload the attached html file

curl --location ‘http://localhost:8090/blackbox/AuxUpload?type=upload&ext=html’ \

–header ‘Cookie: JSESSIONID=40CA106AAA011205C2D8E9EDA8D300ED’ \

–form ‘file=@“/C:/Users/XXX/Downloads/test_fonts.html”’

Response

{
“uri”: “cid://test_fonts.htmlkwCxQbqjKWBj1VQ8pxp-onhtml”,
“name”: “test_fonts.htmlkwCxQbqjKWBj1VQ8pxp-onhtml.html”,
“share_id”: “”,
“doc_id”: “1EhGKyzqoJWAPGfH3xPJO-gX6YQ-zVvDHut70DV0Sg0=”,
“pswd”: “”,
“extraHash”: “”,
“thumb”: “Image/Uploaded/1EhGKyzqoJWAPGfH3xPJO-gX6YQ-zVvDHut70DV0Sg0=.html_dir/pageimg0_320.jpg”,
“mOfficeOptions”: {
“applyPageBreaksToSheet”: false,
“displayChangeTracking”: false,
“excelDefaultCellBorderWidth”: -1,
“excelMaxAllowedCellCount”: -1
}
}

Copy the uri from response and hit below GetPDF url

curl --location ‘http://localhost:8090/blackbox/GetPDF?uri=cid://test_fonts.htmlkwCxQbqjKWBj1VQ8pxp-onhtml&fmt=data&ext=html
–header ‘Cookie: JSESSIONID=40CA106AAA011205C2D8E9EDA8D300ED’

Download the response and open in acrobat reader

Actual Result : Last text showing in Times new roman and not in Arial
Expected Result : Last text should be converted to Default font which is “Arial”

test_fonts.html (1.3 KB)
fonts.json (11.5 KB)