Open fmgono opened 4 years ago
Same here. Nothing happens when I call the html2pdf()
function.
The demo is not working as well.
Is there any fix or update for this?
我正在使用此代码 https://codesandbox.io/s/xlnzq7y28q
但是当我单击导出pdf按钮时,该
html2pdf()
功能没有执行任何操作
Do you solve this problem? I had the same problem
i'm using this code codesandbox.io/s/xlnzq7y28q
but when i click export pdf button, that
html2pdf()
function like didn't execute anything
that worked here but if it still doesn't for you, maybe include browser, OS, etc. I also noticed that link was using older 0.8.2 fwiw
I've been with a similar problem for a long time today, in my case, your codesandbox is working so if you see it working on your sandbox but not on your computer you might have a similar problem as I had: this lib does not work when opening directly from the html file, check your browser and the url, if you see "file" it won't work, this is due to browser's security, since some attacks are made this way. You need to test it with an IDE that have live preview, for example brackets.io or get a plugin on your visual studio code. With live preview you will see that the url changes to a port on your localhost, then your code should work as in your sandbox 😄
i'm using this code https://codesandbox.io/s/xlnzq7y28q
but when i click export pdf button, that
html2pdf()
function like didn't execute anything