angular - ng2-pdf-viewer Access-Control-Allow-Origin -


i using ng2-pdf-viewer library angular , trying display pdf basic url. problem following error :

xmlhttprequest cannot load https://www.bbv.ch/images/bbv/pdf/publikationen/bbv16poster_angular2.pdf. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:54800' therefore not allowed access.

here code :

.ts :

{ name: "angular2 tuto", description: "an amazing angular2 pdf !", url: {url: "https://www.bbv.ch/images/bbv/pdf/publikationen/bbv16poster_angular2.pdf", withcredentials: true} } 

.html :

<pdf-viewer [src]="document.url" [page]="1" [original-size]="false" style="display: block;"></pdf-viewer> 

i tried , without "withcredentials" property - nothing changed..

how can show pdf link in angular2 ? (worked in basic iframe though...)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -