pdfmake - blank page in MS Edge

pdfmake - blank page in MS Edge

crush123crush123 Posts: 409Questions: 125Answers: 18
edited April 2017 in Buttons

I have a page which is used to allow visitors to print off their own pdf invoices generated in situ

The page works great for FF and Chrome

I realised there are issues with older browsers, but when I use Edge for example, i get a blank page, and i can;t see anything in the debugger

I also tried updating to the latest version of pdf make (0.1.27)

Example page - https://www.cfci.org.uk/print_invoice.php?OrderID=8

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 54,880Questions: 1Answers: 8,601 Site admin

    Does it work as expected without the customize callback? It sounds like there is something funny going on in there which is upsetting pdfmake - but I couldn't really say what I'm afraid.

    Assuming it does work without the callback, I would add it back in, and then add a return statement after your first change to the pdfmake document. If that works, move it to after the second, etc, until you find the block that is causing the issue.

    Allan

  • crush123crush123 Posts: 409Questions: 125Answers: 18

    Thanks Allan,

    I stripped down the page and i eventually found the problem.

    It lies with download: 'open',

    if this line is omitted it works fine.

    i have since 'googled' it and found a bug report

    https://github.com/bpampuch/pdfmake/issues/693

  • allanallan Posts: 54,880Questions: 1Answers: 8,601 Site admin
    Answer ✓

    Thanks for posting back with the link. So if you use download instead, does that work? The bug report seems to suggest that would.

    Allan

  • crush123crush123 Posts: 409Questions: 125Answers: 18
    edited April 2017

    yes, its fine to download.

    as this is default value, i just commented out the line i mentioned.

    (a nice option for me would be to detect the browser and only download if IE, but as jQuery.browser is now deprecated, i'll just have to live with it)

  • allanallan Posts: 54,880Questions: 1Answers: 8,601 Site admin

    There have been a couple of questions from others about an option to download or open. I'll have a look and see if I can make it work for the other export types as well, and if so, add that as an option.

    Allan

This discussion has been closed.