-
Notifications
You must be signed in to change notification settings - Fork 986
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
Promote 2.3 dev to production #299
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumping version # before I forget
None of the major browser vendors actively support navigator.mimeTypes. The oldest browser supported by PDFObject (IE11) uses ActiveX. Time to clean house.
Clean up
Removed embed element in favor of more widely supported iframe. This also enables removal of special handling for Safari (macOS desktop edition). As a result, the forceIframe option will no longer be utilized. The change is backwards-compatible, specifying forceIframe: true will not generate errors.
The logic is spelled out in code comments, but the gist is that we only execute tests when needed, not all up front as previously written. We also add a check for navigator.pdfViewerEnabled prior to doing any sniffing (we can avoid sniffing if navigator.pdfViewerEnabled is available and true). Finally, we revert to prior logic involving assumptions about modern browsers having native PDF support, and IE11 using ActiveX. These changes modernize the approach, as should be more performant as it reduces the number of browser checks
Using variable for window to aid in minification
Modified PDF Open Params handling: * ensures page is always set if comment, viewrect or highlight are specified * always puts page as first param in URL (as required for comment, viewrect, and highlight) * changed string building from concatenation to array.join. Simpler, cleaner. * Simplified embedError function and suppressConsole handling
Ensure fdf is always listed last in the URL string, per Adobe docs
If specified PDF is a base64 string, and the browser is unable to display the PDF, convert the base64 string to a downloadable file and present link to user.
IE11 doesn't support fetch() so we have to go old-school with xhr. Can't wait to drop IE11.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.