From 68fb1f07a2a42aa0c4646a6706f997ca660a1c02 Mon Sep 17 00:00:00 2001 From: yurydelendik Date: Tue, 12 Feb 2013 05:33:33 -0800 Subject: [PATCH] Updated Frequently Asked Questions (markdown) --- Frequently-Asked-Questions.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Frequently-Asked-Questions.md b/Frequently-Asked-Questions.md index 883d257..f57d874 100644 --- a/Frequently-Asked-Questions.md +++ b/Frequently-Asked-Questions.md @@ -1,12 +1,16 @@ -* [Can I load a pdf from another server (cross domain request)?](#faq-xhr) +* [Can I specify different PDF in the default viewer?](#file) +* [Can I load a PDF from another server (cross domain request)?](#faq-xhr) * [What browsers are supported?](#faq-support) * [What browsers have extensions (and where can I find install procedures)?](#faq-extensions) * [I know JavaScript and want to contribute to the project. How do I start?](#faq-contrib) + +## Can I specify different PDF in the default viewer? +You can modify DEFAULT_URL variable in the web/viewer.js file. Or, you can append the `?file=` query string to the viewer URL, e.g. `http://mozilla.github.com/pdf.js/web/viewer.html?file=compressed.tracemonkey-pldi-09.pdf`. -## Can I load a pdf from another server (cross domain request)? -Not by default, but it is possible. Pdf.js runs with the same permissions as any other javascript, which means it cannot do cross origin requests (see [Same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy) and [example](https://gist.github.com/3452072)). There are some possible ways to get around this such as using [CORS](http://enable-cors.org/) or setting up a proxy on your server that will feed pdf.js the pdf. Both workarounds are out of the scope of the pdf.js project and we will not provide code to do either. +## Can I load a PDF from another server (cross domain request)? +Not by default, but it is possible. PDF.js runs with the same permissions as any other javascript, which means it cannot do cross origin requests (see [Same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy) and [example](https://gist.github.com/3452072)). There are some possible ways to get around this such as using [CORS](http://enable-cors.org/) or setting up a proxy on your server that will feed pdf.js the pdf. Both workarounds are out of the scope of the pdf.js project and we will not provide code to do either. ## What browsers are supported?