Trying to print, export in pdf, excel, images of last column that has Barcodes

Trying to print, export in pdf, excel, images of last column that has Barcodes

TridindTridind Posts: 9Questions: 3Answers: 0

http://live.datatables.net/kuwuxuqe/1/edit?html,css,js,console,output:

I've tried to follow a couple of the forum posts around exporting images in pdf and printing images but it doesn't seem to be working. I am not sure if its because of the library I am using to generate the barcodes or what. Any insight would be super helpful.

This question has an accepted answers - jump to answer

Answers

  • TridindTridind Posts: 9Questions: 3Answers: 0

    Some additional information that I have found while trouble shooting.

    It looks like the jsbarcode is rendering the src on the html in base64

    but when I use print or the pdf export buttons the src is not there.

    Is there away to have print and export buttons take the existing elements on the page?

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • TridindTridind Posts: 9Questions: 3Answers: 0

    Hey Collin, those are the exact threads I looked at. They did not help. In my JS bin I am trying to use one of your examples from it.

    I must be missing something can you take a look at my JS Bin?

  • colincolin Posts: 15,177Questions: 1Answers: 2,590
    Answer ✓

    It looks like you were close - as there are less columns in your table than in the SO thread you were using, you need to adjust the column :smile:

    doc.content[1].table.body[c][1] = {
    

    See updated example here: http://live.datatables.net/kuwuxuqe/2/edit

    It's not quite there, as I didn't understand the select code you had, and if some columns have been responsively removed, then your columns: ':visible breaks the code. But I'll leave that as an exercise for you :)

    Colin

  • TridindTridind Posts: 9Questions: 3Answers: 0

    Gosh dang it :D of course it was something small like that! Thank you for the help. An thank you for the catch on the responsive bug.

Sign In or Register to comment.