Setting defaultUrl has no effect
See original GitHub issueSteps to reproduce:
Download 2.0 https://github.com/mozilla/pdf.js/releases/download/2.0.550/pdfjs-2.0.550-dist.zip
Edit viewer.html:
<script>
AppOptions.set('defaultUrl', 'test.pdf');
</script>
Result: ReferenceError: Can’t find variable: AppOptions
Expected Result: Load test.pdf
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
asp.net - Default url property is not working when redirecting
It seems, that the user with this username/password doesn't have access to the Admin/AdminHome.aspx page. That's why you've been redirected ...
Read more >SharePoint 2019 Change the default URL
Add a new URL in Central Admin -> System Settings -> Uner Farm Management ... SharePoint will not let you delete the Default...
Read more >Chrome Sign Builder Default URL Refresh - Chrome Enterprise ...
However, I have not seen a setting to change how often the default URL is refreshed? For example, if they change their slides...
Read more >How to change default URL for guest users. - Forums - Liferay
I'm not looking for virtual host. Say when I use default URL http://111.111.111.70:8080/ it is adding /web/guest and displaying page. Where I need...
Read more >Setting up Google Analytics default URL | SEO Forum - Moz
If someone has set: the default url in Google Analytics to a non-www ... What I'll emphasize is that your Default URL value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After reading through the Issue related to defaultUrl and I know how to solve the problem, it works well!
File viewer.js config
Delete string ‘compressed.tracemonkey-pldi-09.pdf’ in defaultUrl We will be like this
File viewer.html
For the curious, this would be how to set DEFAULT_URL in the header of viewer.html:
<script>
$(document).ready(function() {
PDFViewerApplicationOptions.set('defaultUrl', '<?=$file;?>');
});
</script>