diff --git a/README.md b/README.md index 4474725..ae685d8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # DocumentViewer bug showcase + This repository is a fork of [webviewer-custom-ui](https://github.com/PDFTron/webviewer-custom-ui) to reproduce bugs. # Reported Bugs: -- [Document not rendering when DocumentViewer is loaded in an absolut right positioned parent](https://github.com/jonasherbert/documentviewer-core/tree/position-absolute-right) + +- [Initial loadtime of documents in mobile webkit browsers with iOS < 17.0.0 takes distintly longer](https://support.apryse.com/support/tickets/58437) diff --git a/package.json b/package.json index 5bae061..1134a19 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,9 @@ "version": "1.0.0", "private": true, "dependencies": { - "@pdftron/webviewer": "^8.0.0", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-scripts": "3.4.3" + "@pdftron/webviewer": "^10.5.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "devDependencies": { "btoa": "^1.2.1", @@ -29,4 +28,4 @@ "not ie <= 11", "not op_mini all" ] -} +} \ No newline at end of file diff --git a/public/files/pdftron_about.pdf b/public/files/demo.pdf similarity index 72% rename from public/files/pdftron_about.pdf rename to public/files/demo.pdf index 55b72b2..a5a52bc 100644 Binary files a/public/files/pdftron_about.pdf and b/public/files/demo.pdf differ diff --git a/src/App.js b/src/App.js index 4c88bf7..3822375 100644 --- a/src/App.js +++ b/src/App.js @@ -4,7 +4,7 @@ import { ReactComponent as ZoomIn } from './assets/icons/ic_zoom_in_black_24px.s import { ReactComponent as ZoomOut } from './assets/icons/ic_zoom_out_black_24px.svg'; import { ReactComponent as AnnotationRectangle } from './assets/icons/ic_annotation_square_black_24px.svg'; import { ReactComponent as AnnotationRedact } from './assets/icons/ic_annotation_add_redact_black_24px.svg'; -import { ReactComponent as AnnotationApplyRedact} from './assets/icons/ic_annotation_apply_redact_black_24px.svg'; +import { ReactComponent as AnnotationApplyRedact } from './assets/icons/ic_annotation_apply_redact_black_24px.svg'; import { ReactComponent as Search } from './assets/icons/ic_search_black_24px.svg'; import { ReactComponent as Select } from './assets/icons/ic_select_black_24px.svg'; import { ReactComponent as EditContent } from './assets/icons/ic_edit_page_24px.svg'; @@ -34,8 +34,8 @@ const App = () => { const documentViewer = new Core.DocumentViewer(); documentViewer.setScrollViewElement(scrollView.current); documentViewer.setViewerElement(viewer.current); - documentViewer.setOptions({ enableAnnotations: true }); - documentViewer.loadDocument('/files/pdftron_about.pdf'); + documentViewer.enableAnnotations(); + documentViewer.loadDocument('/files/demo.pdf'); setDocumentViewer(documentViewer); @@ -47,11 +47,11 @@ const App = () => { }, []); const zoomOut = () => { - documentViewer.zoomTo(documentViewer.getZoom() - 0.25); + documentViewer.zoomTo(documentViewer.getZoomLevel() - 0.25); }; const zoomIn = () => { - documentViewer.zoomTo(documentViewer.getZoom() + 0.25); + documentViewer.zoomTo(documentViewer.getZoomLevel() + 0.25); }; const startEditingContent = () => {