Xslt (table row shrinks in resultant html) [modified]
-
Hi I have to print 14col x 3 rows = 42 labels from my asp.net. I use Xslt transform to display the labels in the aspx page and label width and height also specified in xslt. Also i use style sheet to set paper size a4, and margins,,. When the resultant page is sent to printer from the IE-->Print the Height of each row is shrinked. Any suggestions please. -- modified at 6:24 Wednesday 11th July, 2007
-
Hi I have to print 14col x 3 rows = 42 labels from my asp.net. I use Xslt transform to display the labels in the aspx page and label width and height also specified in xslt. Also i use style sheet to set paper size a4, and margins,,. When the resultant page is sent to printer from the IE-->Print the Height of each row is shrinked. Any suggestions please. -- modified at 6:24 Wednesday 11th July, 2007
CSS has an @-rule for printing: "print". You can use this @-rule to create rules for printing. However, a "Label" in ASP.NET is really a "span" element in the client's browsers. A "span" element is in-line; thus, takes the height of its content. The "height" attribute doesn't have any effect on it. Nevertheless, you can set the said "span" elements' style to "display: block". Consequently, the height attribute will then be effective.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
CSS has an @-rule for printing: "print". You can use this @-rule to create rules for printing. However, a "Label" in ASP.NET is really a "span" element in the client's browsers. A "span" element is in-line; thus, takes the height of its content. The "height" attribute doesn't have any effect on it. Nevertheless, you can set the said "span" elements' style to "display: block". Consequently, the height attribute will then be effective.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
Thanks for your reply George. i have piced the records from db. and using xslt, i transform to html with 3 columns and and 14 rows. I set the paper size to a4 using @print in style sheet. But When printed from a browser(ie), Table size and Table row shrinks a little. Values given in the xslt for each row and table dimensions are not reflected exactly in print. Does the display:block applies to Row of a table in html? Any suggestions or ideas plz..? Thank you George
-
Thanks for your reply George. i have piced the records from db. and using xslt, i transform to html with 3 columns and and 14 rows. I set the paper size to a4 using @print in style sheet. But When printed from a browser(ie), Table size and Table row shrinks a little. Values given in the xslt for each row and table dimensions are not reflected exactly in print. Does the display:block applies to Row of a table in html? Any suggestions or ideas plz..? Thank you George
Unfortunately, CSS1 and <table> don't work well together. Also, it is very difficult to print from HTML exactly the way you want it. I usually generate a PDF (using Crystal Reports) for my clients to print.
"We make a living by what we get, we make a life by what we give." --Winston Churchill