-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to use web viewer 8.1 #17
Conversation
top: typeof style.top === 'number' ? style.top + pad : style.top, | ||
left: typeof style.left === 'number' ? style.left + pad : style.left, | ||
top: typeof style.top === 'number' ? (style.top as number) + pad : style.top, | ||
left: typeof style.left === 'number' ? (style.left as number) + pad : style.left, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this as typescript complained
"react": ">=16.8.0", | ||
"react-dom": ">=16.8.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.7.4", | ||
"@babel/preset-env": "7.9.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isntalled some of these to get the
npm start
npm run build
command to work
const fetchedBlob = await blob; | ||
return await coreControls.createDocument(fetchedBlob, { extension, l: l || globalLicense.get() }); | ||
try { | ||
const document = await coreControls.createDocument(fetchedBlob, { extension, l: l || globalLicense.get() }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the line throwing that uncaught exception:
File extension html is only supported by using WebViewer with WebViewer Server. See http://r.pdftron.com/fileformats for a full list of file formats supported by WebViewer. Visit https://www.pdftron.com/documentation/web/guides/wv-server-deployment for more information about WebViewer Server
changed the typing to be Core.Document | undefined to handle it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Upgraded to use WebViewer 8.1
Also caught and handled error from WebViewer createDocument API:
File extension html is only supported by using WebViewer with WebViewer Server. See http://r.pdftron.com/fileformats for a full list of file formats supported by WebViewer. Visit https://www.pdftron.com/documentation/web/guides/wv-server-deployment for more information about WebViewer Server