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

Open PDF blocked as popup #424

Closed
depiction opened this issue Oct 23, 2015 · 3 comments
Closed

Open PDF blocked as popup #424

depiction opened this issue Oct 23, 2015 · 3 comments

Comments

@depiction
Copy link

I'm just starting to use pdfmake. When I call pdfMake.createPdf(docDefinition).open(); it creates a popup that is blocked in most browsers by default. I don't want users to have to allow popups on my site.

Is there an alternative?

@zhulduz
Copy link

zhulduz commented Nov 2, 2016

@liborm85
Copy link
Collaborator

Answered.

@moffsugita
Copy link
Contributor

#587
I used "liborm85 commented on 2 Apr 2017"

    const pdfDocGenerator = pdfMake.createPdf(docDefinition);
    var win = window.open('', '_blank');
    (pdfDocGenerator as any).open({}, win);

did you work?

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