Pdfmake: Getting blank window

Created on 24 May 2017  路  4Comments  路  Source: bpampuch/pdfmake

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?

Most helpful comment

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: https://github.com/bpampuch/pdfmake/issues/800. In Chrome works only with disabled AdBlock.

All 4 comments

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');

Os: ubuntu,
run inside electron.

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: https://github.com/bpampuch/pdfmake/issues/800. In Chrome works only with disabled AdBlock.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SummerSonnet picture SummerSonnet  路  3Comments

Masber picture Masber  路  3Comments

einfallstoll picture einfallstoll  路  3Comments

Christian24 picture Christian24  路  3Comments

CharlyPoppins picture CharlyPoppins  路  3Comments