PDF - download: 'open' HOW CAN I CHANGE THE FILENAME AFTER OPEN IT IN NEW PAGE?
PDF - download: 'open' HOW CAN I CHANGE THE FILENAME AFTER OPEN IT IN NEW PAGE?
djaydote
Posts: 1Questions: 1Answers: 0
this is my code: but this is not working! how to change the file name, with download: 'open' ??
buttons: [
{
text: 'PDF',
title: 'Equipment',
extend: 'pdfHtml5',
filename: "Equipment",
download: 'open',
pageSize: 'LETTER',
orientation: 'portrait',
alignment: 'center',
exportOptions: {
columns: [ 1, 2,3 ]
},
This discussion has been closed.
Answers
Hi @djaydote ,
I just tried it and I don't think that's possible, though I can see why it would be a useful extension. I'll see if it's possible to add it into a future release.
Cheers,
Colin
To be perfectly honest, I'm not actually sure where that uuid is coming from. uuid isn't used in the pdfmake code and its certainly not something coming from DataTables or Buttons.
The pdfmake examples do exactly the same thing.
I suspect that it is actually a browser thing since it needs to show something in the address bar. I don't think there is much we can do about that, but it might be worth opening a pdfmake question and see if they can help you.
Allan
you can set the title in pdfmake in the metadata:
https://pdfmake.github.io/docs/document-definition-object/document-medatadata/