1st question
printing "BOLD" text...using lp
if possible.
example:
echo -e "\e[1mBOLD\e[0m" | lp
will print out this below on a white paper
1mBOLD0m
how to get:
BOLD
?
2nd question
Printing [font size=33]SIZED TEXT[/font]
, how?
the only way i know for now is using a2ps
example:
a2ps -B --portrait --columns=1 --rows=1 --borders=no --font-size=18 --margin=0 text.txt | lp
command above will print out big sized text, however there still a big gap of margin can be seen with naked eye there. it just too big to be missed. I want to print it just like lp
printed it on the edge of my paper and with bigger font on top of that.
SUMMARY OF THE ANSWER
based on the answer I got here, and tested. It proves that printing a nice formatted and sized font
is not that simple as printing an echo
output. Many things should be considered here such as the Margins, the font sizes, the font formatting, and specifically the AddOns which backing up the lp
. It is true that most of the system by default came with lp
but not with aha
also wkhtmltopdf
, it might be because people can do it easily in Abiword or any word processing software. But for me, I need it for my regular basis on bash script. It is kinda complicated to set up, but once it set up, it is definitely faster than any word processor. The only un-avoidable problem here is the margin, as in my case by default it came with certain number of margins with comparisons left:top - 1:1.6cm
, it gets wider when the font get smaller, and it gets thinner when font get bigger. That such problem can be easily eliminated in word processor, but again, I prefer speed and acceptable problems. From the answer, we know that aha
will got updated related to font sizes
, I don't know what that feature will be like, but I am looking forward for it.
Thank you very much for everyone who participated in this post