Insert barcode in the header or footer of the datatables

Insert barcode in the header or footer of the datatables

alexbritoalexbrito Posts: 3Questions: 1Answers: 0

https:///forums/discussion/71911/trying-to-print-export-in-pdf-excel-images-of-last-column-that-has-barcodes
http://live.datatables.net/kuwuxuqe/2/edit

I was reading this article above to try insert a barcode that will contain the user session ID in the header or footer of the datatables.
This is necessary for me to identify who share or print the report.
Is it possible?
Thanks.

This question has an accepted answers - jump to answer

Answers

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

    Do you mean something like this: http://live.datatables.net/kuwuxuqe/10/edit

    It's just adding another barcode into the header in the initComplete function.

    $('table thead tr th:eq(5)').html('<img class="barcode" jsbarcode-value="' + 'header' + '" />')
    

    Colin

  • alexbritoalexbrito Posts: 3Questions: 1Answers: 0

    Hi colin,
    Thanks for helping me.
    Let me try to explain more what I want to do.
    In this example http://live.datatables.net/jatobaqi/1/edit made by kthorngren we can see ways to show images on the exported pdf datatable.
    Using this example, I just want to show the barcode under the "Image top" or in the place of "Image end".
    So this barcode will only appear when we print or export the datatables. Like a watermark.

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

    That would be outside the scope of the support I can give. The example Kevin created shows how to insert the images. The issue you have is converting one of those images into a base64 format that you can embed. That isn't DataTables specific, so it would be worth asking on the barcode website or on StackOverflow,

    Colin

  • alexbritoalexbrito Posts: 3Questions: 1Answers: 0

    ok!
    thank you!

Sign In or Register to comment.