Rob P.
Rob P.

Reputation: 15091

How To Print A Specific Physical Size

I'm sure this is a common problem, but I haven't been able to find it.

I have a website and I want the user to be able to print a rectangle on their printer that is 3.5 inches x 2 inches. Exactly (within reason).

What's the best way to do this?

EDIT: To clarify - I'm looking to print a bunch of multicolored Text within a rectangle that needs to be a specific physical size. I also need to print specific shapes around some of the letters.

I'd looked into some of the .NET Printing stuff and found examples of measuring/drawing strings and shapes; but I didn't see anything that would let me specify a specific size.

Upvotes: 2

Views: 633

Answers (1)

Dan R
Dan R

Reputation: 88

Is this what you are looking for?

<div style="width:3.5in;height:2in;border:1px solid black;"></div>

CSS allows other physical sizes too:

http://msdn.microsoft.com/en-us/library/ms531211%28v=vs.85%29.aspx

Upvotes: 1

Related Questions