There appear to be two possible methods. Either turn off the workers:
From a pdf.js example:
// Disable workers to avoid yet another cross-origin issue (workers
// need the URL of // the script to be loaded, and currently do not allow
// cross-origin scripts)
// PDFJS.disableWorker = true;
or as suggested by async5 it is relatively easy to serve pdf.js on the same Apache VirtualHost as Django, with some files served by URLs as static media, and others using the mod_wsgi interface to Django. The documentation here is relatively easy to follow for the apache deployment. For local development the following snippet added to urls.py is easy to adapt to serve up pdf.js:
from django.conf import settings
# ... the rest of your URLconf goes here ...
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
)
with MEDIA_URL and MEDIA_ROOT set appropriately in settings.py
Both will have performance implications.