Skip to content
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

pdfmake unable to open pdf in chrome browser. #954

Closed
ninad-d opened this issue Apr 18, 2017 · 7 comments
Closed

pdfmake unable to open pdf in chrome browser. #954

ninad-d opened this issue Apr 18, 2017 · 7 comments

Comments

@ninad-d
Copy link

ninad-d commented Apr 18, 2017

pdfmake is unable to open up pdf's in chrome browser. The call to open() just opens up a new tab for a second and then closes automatically, no error are displayed on console. The code I have used to work earlier looks like something went wrong on the browser end. The default example on playground.html also does not works and fails to open up pdf in new tab. This problem is only when I try to open the pdf in new tab.The code to download() pdf then it works fine on chrome.

The chrome version is 57.0.2987.133 (64-bit)

@Wabbala
Copy link

Wabbala commented Apr 18, 2017 via email

@ninad-d
Copy link
Author

ninad-d commented Apr 18, 2017

That was my first reaction but the pop-up opens up for a split second and then closes and no message related to blocking or errors is displayed. I have not made any changes to browser settings and it was working fine few days back. I tried "allow all pop-ups" and it still failed to open up. The i tried "open pdf files in default application." In this case the pdf file was downloaded by chrome and I was able to open it using pdf reader. It simply does not opens up the pdf in new tab.

@ninad-d
Copy link
Author

ninad-d commented Apr 18, 2017

Update the same code is able to open up the pdf in new tab for firefox.

@Wabbala
Copy link

Wabbala commented Apr 18, 2017

I think I found the issue. I am also running the same chrome version as you do and the behaviour was indeed also on the playground! But then I saw that my ad-blocker (uorigin) was blocking it somehow ... after disabling it for a moment the playground example worked. So try disable ad-block :)

@ninad-d
Copy link
Author

ninad-d commented Apr 18, 2017

@Wabbala you got me here, I thought on why not disable ad-block and see. It was not evident to me first since my ad-block was hidden in chrome. It clicked me when I was reviewing my extensions and i saw adblocker. Thanks for the help.

@brobertsaz
Copy link

I know that this is closed and for me the issue was ad-blocker. I did figure out that if I used .download() or open in same window pdfMake.createPdf(docDefinition).open({}, window); it will work with ad-blocker turned on.

@BAPopov
Copy link

BAPopov commented Feb 19, 2020

@brobertsaz Thank you exactly what I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants