bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.6k stars 2.03k forks source link

Supported browsers #800

Open liborm85 opened 7 years ago

liborm85 commented 7 years ago

Supported browsers

Add-ons used in browsers can affect the functionality of pdfmake. If pdfmake is not working try disable add-ons in browser.

Browser download() open() print() Issue(s)
Internet Explorer 9 no no no
Internet Explorer 10 only 0.1.x no no 3
Internet Explorer 11 only 0.1.x and 0.2.x no no 3
Edge 20 - 44 (engine: EdgeHTML) only 0.1.x and 0.2.x no no #693
Edge 79+ (engine: Blink) YES YES 1 YES 1
Edge (mobile) ??? ??? - #708
Firefox YES YES YES
Chrome YES YES 1 YES 1
Chrome (Android) YES YES 2 no?
Opera YES YES YES
Safari (iOS) YES YES / NO 4 YES / NO 4
Safari (iOS) iPhone YES YES -

(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

nigel-dewar commented 7 years ago

Soooooo doesnt work on ie? Seriously?

liborm85 commented 7 years ago

@nigel-dewar As says table - download on IE10+ works (tested on windows 10). IE9 doesn't work.

Chris--A commented 7 years ago

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.

themasch commented 7 years ago

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.

liborm85 commented 7 years ago

Interest with Chrome:

(from issue: https://github.com/bpampuch/pdfmake/issues/954)

First post updated.

boom235 commented 7 years ago

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!

Holyphoenix commented 7 years ago

Is there any effort being made to resolve the incompatibilities with some of the browsers?

TommyLCox commented 7 years ago

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.

liborm85 commented 7 years ago

@TommyLCox Thanks for testing. Table updated.

uebbi commented 7 years ago

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/

oscarhandsome commented 7 years ago

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

FlorianLeitgeb commented 6 years ago

Could you please add this on the bottom of the pdfmake welcome page?

liborm85 commented 6 years ago

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.

liborm85 commented 6 years ago

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.

Ananyag commented 6 years ago

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"); } }); }

me21 commented 5 years ago

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.

Wabbala commented 5 years ago

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 .

liborm85 commented 5 years ago

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.

markusand commented 5 years ago

Works in Safari 12 (13606.2.11) for macOS, even with AdBlock installed

Rotzbua commented 5 years ago

I was able to do a short test:

Edge (mobile): Edge 38, EdgeHTML 41, WP10 1607 Tested open, download, print Nothing works.

liborm85 commented 5 years ago

Supported browsers rewrited to new documentation - https://pdfmake.github.io/docs/getting-started/client-side/supported-browsers/

moffsugita commented 5 years ago

open() of Safari's mac can't push download button in the PDF viewer..

liborm85 commented 5 years ago

@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.

dethier1958 commented 5 years ago

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.

liborm85 commented 5 years ago

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.

arivera12 commented 4 years ago

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!

liborm85 commented 4 years ago

@arivera12 Not related with pdfmake.

arivera12 commented 4 years ago

@arivera12 Not related with pdfmake.

Of course it doesn't, but may help others achieve what is not supported yet.

cristiandaulisio commented 4 years ago

I am trying on mobile. Work fine with browser but doesn't work on a webview in mobile app (Android and ios)

mignam commented 3 years ago

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 ?

liborm85 commented 3 years ago

Internet Explorer 10 support removed in 0.2.0. Internet Explorer 11 is still supported.

avinashSkeps commented 2 years ago

Download pdf not works and breaks the page in IOS chrome browser, works fine in safari.

liborm85 commented 2 years ago

@avinashSkeps and error in console is ...?

avinashSkeps commented 2 years ago

Not able to get the error on mobile.

liborm85 commented 2 years ago

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.