Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide text from printing but keeping the space

Tags:

html

css

We have in-house server which brings the records by php from mysql.

We have Dot matrix printer which we are using for printing on carbon less paper (2 copies:- one for official records,one for customer and one for gatekeeper).

We tried to print the content by display:none but it was removing that space from that Div.

Then we tried to print it with the white color font without display:none (we realized that print head reads everything), so it was printing the characters on the 2nd and 3rd copy.

So We want to know how can hide the text at the same time by keeping that much space blank.

Please tell how to do the same thing with border ?

thanks in advance

like image 301
dave Avatar asked Jun 02 '11 06:06

dave


People also ask

How do I get word to not print hidden text?

Go to File > Options. In the Word Options dialog box, go to the left panel and select Display. In the Printing options section, select the Print hidden text check box to print the document including the hidden text. Clear the Print hidden text check box to print the document without including the hidden text.

How do you hide text within an element in CSS?

If the point is simply to make the text inside the element invisible, set the color attribute to have 0 opacity using a rgba value such as color:rgba(0,0,0,0); clean and simple. Save this answer.

How do I stop an element from printing on two pages?

You can use page-break-inside="avoid" on <div> "B". This is probably closer to what you want. If "B" does not fit on the page with "A", "B" will all be moved to the next page.


2 Answers

visibility: hidden; makes it invisible, but leaves the space.

Check this

like image 188
Zirak Avatar answered Sep 17 '22 18:09

Zirak


you can keep the div with text in one div with height and width and give style display:none property to the div with text. this way the space will remain

like image 27
jimy Avatar answered Sep 19 '22 18:09

jimy