Skip to content

Commit

Permalink
Add PDF rendering via PDFObject (go-gitea#24086)
Browse files Browse the repository at this point in the history
Use [PDFObject](https://pdfobject.com/) to embed PDFs, replacing our
outdated PDF.js copy we vendor (the last non-webpack vendoring).

[Commit
1](go-gitea@673e026)
is the PDFObject integration
[Commit
2](go-gitea@9336f57)
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 <[email protected]>
  • Loading branch information
silverwind and GiteaBot authored May 29, 2023
1 parent 35ce7ca commit e4e9897
Show file tree
Hide file tree
Showing 412 changed files with 61 additions and 124,050 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*.tmpl linguist-language=Handlebars
/assets/*.json linguist-generated
/public/img/svg/*.svg linguist-generated
/public/vendor/** -text -eol linguist-vendored
/templates/swagger/v1_json.tmpl linguist-generated
/vendor/** -text -eol linguist-vendored
/web_src/fomantic/build/** linguist-generated
Expand Down
1 change: 0 additions & 1 deletion .ignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
/modules/options/bindata.go
/modules/public/bindata.go
/modules/templates/bindata.go
/public/vendor/plugins
/vendor
node_modules
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
177 changes: 0 additions & 177 deletions public/vendor/plugins/pdfjs/LICENSE

This file was deleted.

Loading

0 comments on commit e4e9897

Please sign in to comment.