Skip to content

Content Tagged "html"

Page 1 of 1

Content Tagged "html"

Styling HTML to PDF with iText 2.1.7

July 8, 2017Categories: Software, Tutorial
There are various solutions for producing PDFs from a HTML file, some with excellent results (e.g. ones based on the chrome renderer). Unfortunately, they usually mean adding more dependencies to an existing system. To keep things in check, we've chosen to use iText to generate PDFs. Following the…

Strip HTML tags in python

June 5, 2016Categories: Software, Tutorial
Note: This is a post transferred from Laurii for historical and consolidation purposes. A common problem I have to deal with quite often is to remove all HTML tags from a document. While this is easy for XML (well formatted etc.) and you could do it by hand with a regexp, HTML has a bit more…

Brand Colors

December 19, 2014Category: Software
A while ago I've found a list of common brands' colors. Here it is:   #121212     Squarespace     #464646     WordPress (grey)     #9c0000     Readability     #c4302b     YouTube     #c41200     Yelp     #cc0000     Red Hat     #cc0000     Staples     #cc0000     Virgin Media     #d7584f…

Copy Text to Clipboard in HTML Page using JavaScript

May 1, 2014Category: Software
I've got a problem on one of my sites: I have a unique identifier displayed on one page, which I need to make it easy After looking online, I've found three approaches using only JS. Clipboard.js Clipboard.js is a new (September 2015) approach which uses only JS to copy the text transparently…

Send POST to server via python-requests

April 15, 2014Category: Software
The other day I've had a question asked: How do you send a form data to a server and get the reply? My solution involves python-requests : r.text contains the reply HTML page, which then needs to be processed via e.g. python's DOM processing module or BeautifulSoup (if you're looking for…

Decent image loader widget in django

January 25, 2014Category: Software
I'm working on a website where I need to be able to load an image. The default widget is abysmal; it has a url to the current image, a checkbox and a file loader input element. Even styled, it looks pretty bad. So, I've taken upon myself to prettify it and get from this: caption id="attachment_4…

All tags