Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Xslt (table row shrinks in resultant html) [modified]

Xslt (table row shrinks in resultant html) [modified]

Scheduled Pinned Locked Moved XML / XSL
csharphtmlasp-netxml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Madhanlal JM
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • M Madhanlal JM

      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

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      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

      M 1 Reply Last reply
      0
      • G George L Jackson

        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

        M Offline
        M Offline
        Madhanlal JM
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • M Madhanlal JM

          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

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups