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

Getting blank window #1014

Closed
bennyAG opened this issue May 24, 2017 · 4 comments
Closed

Getting blank window #1014

bennyAG opened this issue May 24, 2017 · 4 comments

Comments

@bennyAG
Copy link

bennyAG commented May 24, 2017

Just before the file download dialog box appears i get an open empty window that i can close.
There is also an error coming from the library:

Uncaught TypeError: Cannot create property 'href' on string 'about:blank'
pdfmake.min.js:2

Some has a clue?

@bennyAG
Copy link
Author

bennyAG commented May 24, 2017

It also happens with minimal code see:
docDefinition.content = [];
docDefinition.styles = {
smallText: {
fontSize: 7,
},
filter:{
fontSize:12,
color:'red',
}
};
pdfMake.createPdf(docDefinition).open();
pdfMake.createPdf(docDefinition).download('search.pdf');

@bennyAG
Copy link
Author

bennyAG commented May 24, 2017

Os: ubuntu,
run inside electron.

@liborm85
Copy link
Collaborator

You have to use open() or download(), both do not work at the same time.
And download() works on all browsers, open() not. See supported browsers: #800. In Chrome works only with disabled AdBlock.

@bennyAG
Copy link
Author

bennyAG commented May 24, 2017

Not sure it was clear from the instructions.
But thank you for the fast response.

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

2 participants