Observe Image below. It is a composite of two graphs, where different curves are shown in solid lines, dotted lines, and variations of dashed lines with different length of stroke.

TL;DR
I need a way to generate solid lines, dashed lines, dotted lines using basic/simplest HTML/CSS possible in hopes that tcpdf rendering engine will understand, since tcpdf does not deal well with lastest and greatest HTML/CSS markup. How?
Details you may not need, but may appreciate:
I am using flot + tcpdf to generate these, where graphs are first generated on canvas, and canvas are then transferred to PDF engine and everything seems to work fine except the legend. The legend of the curves is not being transferred to canvas, due to flot not having the capacity just yet to write its legend onto canvas. It writes it onto DIV in HTML/CSS, and the legend code generated by flot translates horribly (i.e. it did big ugly rectangles instead of lines) to tcpdf's native weak HTML-to-pdf rendering engine. In other words, I need to create my own legend using most basic HTML/CSS, and hope that tcpdf will understand and render it correctly.