How to show logo or custom text on top of PDF/Excel
How to show logo or custom text on top of PDF/Excel
I am trying to display some custom text on top of PDF such as Record No. Record Type and logo etc.
I have done it in Print version by extending it and it works fine. But same code doesn't work for PDF.
Due to formatting issue I am unable to paste code here so I have written it here:
http://live.datatables.net/vohukuzu
The div class box-body exists on page so I am able to add any text to it
Getting error 0x800a138f - JavaScript runtime error: Unable to get property 'body' of undefined or null reference on line $(win.document.body)
Replies
If you search for "pdf image" or "excel image" in the header you'll find a number of discussions on this topic.
And many others. The answer is it is a bit tricky due to the external formats. Hopefully the other threads will help.
Allan
Ok I am able to do it for PDF using example given but it seems it is not possible for Excel as datatables.net doesn't support it.
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
It is possible using the
customize
callback to modify the XML that Buttons produces, but we don't have an example of that I'm afraid. I've not looked up the OpenSpreadSheet reference for how to embed images.Allan