Generate PDF export as accessible URL

Generate PDF export as accessible URL

DanielSCDanielSC Posts: 19Questions: 7Answers: 1

Hello!
I was wondering if there's any way to make the PDF exports from Datatables generate as an accessible and shareable URL rather than a blob?

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    No, as it needs to run the code to generate the file, it needs to be a blob rather than a simple URL.

    Colin

  • DanielSCDanielSC Posts: 19Questions: 7Answers: 1

    Thank you for your response @colin, I am sorry to hear it is't possible. Would it be possible to generate a link containing the information for the PDF generation that could then the passed and generated as a blob?

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    You could do something like this here perhaps. The link is triggering the PDF button, which has been hidden in initComplete,

    Colin

  • DanielSCDanielSC Posts: 19Questions: 7Answers: 1

    @colin From what I can see the example simply downloads the PDF file as per usual. Where do you see the link?

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394

    The link is partially obscured by "run with js".

  • DanielSCDanielSC Posts: 19Questions: 7Answers: 1

    @tangerine I see the link to "http://live.datatables.net/runner" but this link doesn't store the contents of the PDF so I assume thats not it?

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    That's right, as I said before, you can't do the blob, so this was an alternative. This thread also talks about blobs, so very similar to what you wanted.

    Colin

  • DanielSCDanielSC Posts: 19Questions: 7Answers: 1

    @colin I see. From what I gather its not possible to pass the table data in a URL

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    The pdf specifically? As I mentioned in the other thread, you'd need to make a small change to the library to get the Blob and then URL encode it. I'm not sure why you'd want to do that though - just host the pdf file on a server somewhere? The URL would be massive.

    Allan

Sign In or Register to comment.