HTML Editing in PDF Template

While creating pdf template whenever I write bootstrap code and saves it. It does not work and when I open code again in HTML editor source, code is not there available.
How can I write code in HTML editor of pdf template creation to create template of my wish ?
Also If I add Bootstrap file inside its header, it also does not include it.

It’s normal, the HTML is stripped out for security reasons. but I agree this could be improved so that there is some way to achieve what you need to achieve.

I’ve heard of people putting HTML code directly in the database, in the templates tables.

There are also fancy solutions like this one: