-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Extracts PDFLinkService and PDFHistory APIs #5971
Conversation
Returning to the previous position in the document appears to be broken. Steps to reproduce:
|
d9b28e3
to
4332aca
Compare
@timvandermeij history will work only if the same viewer.html domain is used -- verify with different preview at http://107.21.233.14:8877/ (instead of mozilla.github.io) |
4332aca
to
1dc135e
Compare
if (!PDFViewerApplication.isInitialViewSet) { | ||
PDFViewerApplication.initialBookmark = hash; | ||
} else { | ||
PDFViewerApplication.linkService.setHash(hash); |
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.
There's a typo on this line: it should be pdfLinkService
instead of linkService
.
https://github.com/yurydelendik/pdf.js/blob/refact-hist-link/web/viewer.js#L1170 needs to be changed as well, |
return anchor; | ||
//#endif | ||
//#if (FIREFOX || MOZCENTRAL) | ||
// return this.url.split('#')[0] + anchor; |
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.url
is undefined in PDFLinkService
, so this will not work in the Firefox addon/built-in version (in the current code it points to PDFViewerApplication.url
).
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.
Good catch, fixed.
# Conflicts: # web/viewer.js
# Conflicts: # extensions/b2g/viewer.js # web/pdf_history.js # web/pdf_viewer.component.js # web/viewer.js
1dc135e
to
5cff06e
Compare
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/718b14e544f1721/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/718b14e544f1721/output.txt Total script time: 0.66 mins Published |
Extracts PDFLinkService and PDFHistory APIs
Looks good, thank you for re-factoring this! |
Nice work! |
Subset of #5947