Open liborm85 opened 7 years ago
Soooooo doesnt work on ie? Seriously?
@nigel-dewar As says table - download on IE10+ works (tested on windows 10). IE9 doesn't work.
It might also be worth collecting the data URI lengths for the browsers. Because after this length only the download()
option works (instead of open()
, I haven't tried print()
).
I know, in windows (7, 64-bit), the latest version of chrome supports 2MB and FireFox supports 1MB data URI's.
After updating to the latest version .print() doesn't work anymore in chrome (chromium 57). It worked with the old version, not exactly sure about how old it was.
Interest with Chrome:
open()
and print()
methods works only without or disabled AdBlock(from issue: https://github.com/bpampuch/pdfmake/issues/954)
First post updated.
Which Version of Firefox is supported? I try to use it with an old (LTS) Version 16.0.2. Unfortunately I get the error: PdfMake is not defined... In the newest chrome everything works perfectly fast
I would use an older Version but it is always hard to find out which version supports which browsers... In a different life I would love to see a documentation by an autor which Version supports which Browser-Versions... But this is a general problem in the world of npm! Thanks for this great table, it is a beginning!
Is there any effort being made to resolve the incompatibilities with some of the browsers?
FWIW, we are developing a new web application in .NET Core, Angular 4. There is a form that we have to output as PDF. I tested it yesterday on my iPhone 6s plus with a current version of iOS, and the PDF worked just fine. The PDF utilizes Columns, Tables, styling, so it isn't just trivial.
From that single test, I would conclude that under Safari, on iOS on iPhone, the open() function is supported although it shows a "no?" in the compatibility chart above.
@TommyLCox Thanks for testing. Table updated.
Code https://jsfiddle.net/5ntw24qc/
On Phone Moto G4 / Android 7.0.0:
- It's not working with Chrome 59.0.3071.125
- Work with Firefox 54.0.1
On desktop it works in both browsers!
Update: Based on this i found a workaround, check it: https://jsfiddle.net/5ntw24qc/3/
What about Opera?
i cheked. IE 11 - 11.0.9600 - not dowload, not opened Google chrome 60.0.31.... - opened, downloaded FF 54.0.1 - not dowload, not opened Opera 47.0 - opened, downloaded
Could you please add this on the bottom of the pdfmake welcome page?
Chrome on Android throws error after download pdf file - "download failed due to unknown error":
(source: https://github.com/eligrey/FileSaver.js/issues/330)
=> In actual Chrome versions works download()
correctly in Android 6 and 7.
Problem with AdBlock in Chrome is caused in EasyList by commit https://github.com/easylist/easylist/commit/e3276b6ff9611e821d0e8ba7ac4dc336a4e3b765. The blob rule is quite strict. I don't know how this rule can get away from list.
hi, first of all i appreciate you guys u did a great job .
i am using pdfmake for my html need to export as PDF for 1 page means for small data it is working fine.
but for large data the pdf pages will split into two and they dont return any content . its just returns empty pdf pages
Can you please help me to sort out this @liborm85.
my code: vm.exportPDF = function () {
html2canvas(document.getElementById('exportthis'), {
onrendered: function (canvas) {
var data = canvas.toDataURL();
var docDefinition = {
content: [{
image: data,
width:500,
}],
pageBreakBefore: function (currentNode, followingNodesOnPage, nodesOnNextPage, previousNodesOnPage) {
return currentNode.headlineLevel === 1 && followingNodesOnPage.length === 0;
}
};
pdfMake.createPdf(docDefinition).download("BCQAM-Summary-report.pdf");
}
});
}
Please update the table. Pdfmake doesn't work for me, at least on open()
method in Firefox 62.0 with uBlock Origin enabled.
It works if I disable uBlock Origin.
disable ublock and try again
On Thu, 20 Sep 2018 at 13:41, Alexandr Zarubkin notifications@github.com wrote:
Please update the table. Pdfmake doesn't work for me, at least on open() method in Firefox 62.0 with uBlock Origin enabled.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bpampuch/pdfmake/issues/800#issuecomment-423151954, or mute the thread https://github.com/notifications/unsubscribe-auth/AKQm5w7SmVFiykyz-7NNXBXwetTohkQBks5uc37UgaJpZM4LXiOR .
Is not possible test pdfmake with all various add-ons in browsers. Notice added to first post.
Firefox 62 with add-on AdBlock works ok.
Works in Safari 12 (13606.2.11) for macOS, even with AdBlock installed
I was able to do a short test:
Edge (mobile): Edge 38, EdgeHTML 41, WP10 1607 Tested open, download, print Nothing works.
Supported browsers rewrited to new documentation - https://pdfmake.github.io/docs/getting-started/client-side/supported-browsers/
open()
of Safari's mac
can't push download button in the PDF viewer..
@moffsugita How it related to pdfmake? PDF is opened in viewer, and download button depends to this viewer. Problem is in pdf viewer not in pdfmake.
CreatePDF doesn't work with Brave web browser (just downloads PDF), even though it's built on top of Chromium (just a more secure version of Chrome). This is inconvenient since there is no way my app can tell the difference.
I tried to solve method open
and print
in Chrome with AdBlock and it looks good.
How does it work: If the window is closed immediately after opening (eg. by adblock) pdfmake use actual window to open pdf.
Try to test this pdfmake: pdfmake-adblock-fix.zip
Please test it and send feedback. Thanks.
Hi everyone I know I am very late to this thread. I have been thinking about everyone wanted to see the open and print methods working in all browser. We have to consider that not every browser have render capabilities when reading a pdf. For me and even for the users, downloading the pdf should be enough for all cases. We can't depend whether a browser can read pdf or not. I know having the pdf reader in the browser or embed in iframe looks cool and awesome. I think our biggest bet to overcome all this incompatibilities issues may be using this https://github.com/mozilla/pdf.js/. I have never try it before but seems compatible with most html5 compliance browsers https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support. I know this is out of scope of pdfmake but this would be a great integration for the people with need of viewing and printing the pdf in browser. Cheers!
@arivera12 Not related with pdfmake.
@arivera12 Not related with pdfmake.
Of course it doesn't, but may help others achieve what is not supported yet.
I am trying on mobile. Work fine with browser but doesn't work on a webview in mobile app (Android and ios)
I am trying on mobile. Work fine with browser but doesn't work on a webview in mobile app (Android and ios)
Same here. Did you find a solution ?
Internet Explorer 10 support removed in 0.2.0. Internet Explorer 11 is still supported.
Download pdf not works and breaks the page in IOS chrome browser, works fine in safari.
@avinashSkeps and error in console is ...?
Not able to get the error on mobile.
From EasyList for AdBlock was removed blob filter by commit easylist/easylist@e797d63.
Now works methods open()
/print()
works with AdBlock add-on in Chrome.
Supported browsers
Add-ons used in browsers can affect the functionality of pdfmake. If pdfmake is not working try disable add-ons in browser.
(the list may not be complete)
1 ~works only without (or with disabled) AdBlock add-on (because in EasyList is blocked using blob, see commit https://github.com/easylist/easylist/commit/e3276b6ff9611e821d0e8ba7ac4dc336a4e3b765)~ Removed by commit easylist/easylist@e797d63. Methods works with AdBlock add-on now. 2
open
invokes dialog to open document, see https://github.com/bpampuch/pdfmake/issues/679#issuecomment-464433414 3 playground preview is unsupported 4 require disabled popup blocker