From 2c8e8d68396c185348486abdaddfb05caa1cb0ee Mon Sep 17 00:00:00 2001 From: VickyStash Date: Thu, 25 Jun 2026 13:35:01 +0200 Subject: [PATCH 1/2] Fix PDF display, load PDF CMaps via root-relative URL --- src/components/PDFThumbnail/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PDFThumbnail/index.tsx b/src/components/PDFThumbnail/index.tsx index f2a5c5261b2a..1235f2455815 100644 --- a/src/components/PDFThumbnail/index.tsx +++ b/src/components/PDFThumbnail/index.tsx @@ -20,7 +20,9 @@ function PDFThumbnail({previewSourceURL, style, enabled = true, onPassword, onLo loading={} file={previewSourceURL} options={{ - cMapUrl: 'cmaps/', + // Use a root-relative URL so the CMap files (needed to render non-Latin fonts) + // resolve against the server root instead of the current deep route. + cMapUrl: '/cmaps/', cMapPacked: true, }} externalLinkTarget="_blank" From c3fc67ea7a84513d96aa18f1f96ca42076c08de7 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Fri, 26 Jun 2026 09:27:14 +0200 Subject: [PATCH 2/2] Bump react-fast-pdf version --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60424dbf78b4..19b755e9d854 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,7 +97,7 @@ "react-content-loader": "^7.0.0", "react-dom": "19.2.0", "react-error-boundary": "^4.0.11", - "react-fast-pdf": "^1.0.33", + "react-fast-pdf": "^1.0.34", "react-is": "^18.3.1", "react-map-gl": "^8.1.1", "react-native": "0.83.1", @@ -35395,9 +35395,9 @@ "license": "MIT" }, "node_modules/react-fast-pdf": { - "version": "1.0.33", - "resolved": "https://registry.npmjs.org/react-fast-pdf/-/react-fast-pdf-1.0.33.tgz", - "integrity": "sha512-AQxCXr3OAUr1Rks/+Mlr2AZBFR71rtojMojtStbUb5HryYFCFE5LVxv9vw5elf/me9ZbuhzqSd/X+YCdun862w==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/react-fast-pdf/-/react-fast-pdf-1.0.34.tgz", + "integrity": "sha512-gG9cEREQ/U5iv0A4YyO3n6jdt+Q78gTDoMoVOolDN1G/CgKfd/t7ot8ZYBa/NktqiNdc5T2JWm6gcv9/VOo8qg==", "license": "MIT", "dependencies": { "react-pdf": "10.3.0", diff --git a/package.json b/package.json index bea3ba044b09..770e40bbfb0c 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "react-content-loader": "^7.0.0", "react-dom": "19.2.0", "react-error-boundary": "^4.0.11", - "react-fast-pdf": "^1.0.33", + "react-fast-pdf": "^1.0.34", "react-is": "^18.3.1", "react-map-gl": "^8.1.1", "react-native": "0.83.1",