Is there a way to just open a PDF instead download?

Is there a way to just open a PDF instead download?

Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0

I would like to know if there is a way to override the default behavior of a PDF button (from the extension Buttons) which opens a dialog to download the file, to just open it in a new window. According to pdfmake docs:

// open the PDF in a new window pdfMake.createPdf(docDefinition).open();

I don't know if there is way to that from datatables.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,106Questions: 1Answers: 10,394 Site admin
    Answer ✓

    Not in 1.0.0, but I've just committed a feature for this which will be in 1.0.1 which I plan to release tomorrow. Thanks for the suggestion!

    Allan

  • Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0

    Thanks for the feedback!

  • Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0
    edited August 2015

    I already downloaded in my project the update of Buttons, however didn't work.
    I figure out that I'm using the download generator consolidated in a single file and the link to the 1.0.1 is not there yet :/

  • allanallan Posts: 63,106Questions: 1Answers: 10,394 Site admin

    That's because I haven't released 1.0.1 yet. I will be doing so later today.

    Allan

  • Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0

    Try this another, I don't have a real hosting because my site is not published yet and it is currently a development:

    https://datatables-bug-mrlindowsmac.c9.io/index.html

  • allanallan Posts: 63,106Questions: 1Answers: 10,394 Site admin

    I don't understand. What is the link for?

  • Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0

    Is part of my current website, with the bug included.

  • allanallan Posts: 63,106Questions: 1Answers: 10,394 Site admin

    What is the bug?

  • Mr_LinDowsMacMr_LinDowsMac Posts: 7Questions: 2Answers: 0

    Mmmm... sorry... I posted in the wrong thread. I'll answer you in the pull request in github

This discussion has been closed.