1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-04 16:48:37 +00:00

Add PDF rendering via PDFObject (#24086)

Use [PDFObject](https://pdfobject.com/) to embed PDFs, replacing our
outdated PDF.js copy we vendor (the last non-webpack vendoring).

[Commit
1](673e0263da)
is the PDFObject integration
[Commit
2](9336f5769d)
is the removal of PDF.js

<img width="1251" alt="Screenshot 2023-05-27 at 09 57 52"
src="https://github.com/go-gitea/gitea/assets/115237/169ce50c-bd1d-4bb0-86e5-1710bd0400a9">
<img width="1257" alt="Screenshot 2023-05-27 at 10 12 50"
src="https://github.com/go-gitea/gitea/assets/115237/318f7ee9-fb11-4093-83e7-17475aa70629">


Fallback for unsupporting browsers (most mobile ones, except Firefox
Mobile):

<img width="358" alt="Screenshot 2023-05-27 at 09 43 34"
src="https://github.com/go-gitea/gitea/assets/115237/8c12d7ba-57d6-4228-89a0-5fef9fad0cbb">

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
silverwind
2023-05-29 14:10:00 +02:00
committed by GitHub
parent 35ce7ca25b
commit e4e98979ff
412 changed files with 61 additions and 124050 deletions

6
package-lock.json generated
View File

@@ -37,6 +37,7 @@
"minimatch": "9.0.1",
"monaco-editor": "0.38.0",
"monaco-editor-webpack-plugin": "7.0.1",
"pdfobject": "2.2.11",
"pretty-ms": "8.0.0",
"sortablejs": "1.15.0",
"swagger-ui-dist": "4.19.0",
@@ -8234,6 +8235,11 @@
"node": "*"
}
},
"node_modules/pdfobject": {
"version": "2.2.11",
"resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.11.tgz",
"integrity": "sha512-vGHG1+APo9+FQnnQsf36oHnpL7orJDkt8V3jRTQdvuajgJXBs1PbjA+gKsoiU1BOSNe9aSQubYWnW1LhNqurGw=="
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",