Styling a Printable 'form'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CJM

    Styling a Printable 'form'

    ....When I say 'form' I'm talking about a conventional paper version, as
    opposed to a <form>.

    I'm building a web-based application which needs to be able to create
    Invoices/Advice Notes/Order Acknowledgement s etc... The application itself
    has a largely fluid layout, but for these printed documents I need to make
    them fixed, such that the printed layout is consistent. That is, they need
    to look consistent on an A4 page.

    Its worth noting that the printable version will be displayed in a page, but
    only to be immediately printed. That is, there doesnt specifically need to
    be a screen stylesheet, since the user will only print the page, rather that
    look at it on-screen.

    Before I start bodging my own solution, I thought I'd better do some
    homework on what the best approach to take - hence I'm asking you guys!

    I've googled for help, and there is plenty out there, but I'm still sorting
    the wheat from the chaff. I'm also finding a few annoying things like that
    there is a great @Page directive in CSS, which is all but unsupported!

    Most of these forms/documents are tabular by nature, but I'm trying to
    resist resorting to a tables-within-tables layout as yet.

    How best do I control this layout? Do I specify a bounding block of a fixed
    width? Do I use px/pt/cm/em/etc widths? How do I make sure that the content
    wraps rather than stretches it's container?

    It's hard to ask more specific questions because I don't know what I don't
    know!

    Anyway, thanks in advance...

    Chris


    --
    cjmnews04@REMOV EMEyahoo.co.uk
    [remove the obvious bits]



  • me

    #2
    Re: Styling a Printable 'form'

    "CJM" <cjmnew04@REMOV EMEyahoo.co.uk> wrote in message
    news:3ad4crF672 o9qU1@individua l.net...[color=blue]
    > ...When I say 'form' I'm talking about a conventional paper version, as
    > opposed to a <form>.
    >
    > I'm building a web-based application which needs to be able to create
    > Invoices/Advice Notes/Order Acknowledgement s etc... The application itself
    > has a largely fluid layout, but for these printed documents I need to make
    > them fixed, such that the printed layout is consistent. That is, they need
    > to look consistent on an A4 page.
    >
    > Its worth noting that the printable version will be displayed in a page,[/color]
    but[color=blue]
    > only to be immediately printed. That is, there doesnt specifically need to
    > be a screen stylesheet, since the user will only print the page, rather[/color]
    that[color=blue]
    > look at it on-screen.
    >
    > Before I start bodging my own solution, I thought I'd better do some
    > homework on what the best approach to take - hence I'm asking you guys!
    >
    > I've googled for help, and there is plenty out there, but I'm still[/color]
    sorting[color=blue]
    > the wheat from the chaff. I'm also finding a few annoying things like that
    > there is a great @Page directive in CSS, which is all but unsupported!
    >
    > Most of these forms/documents are tabular by nature, but I'm trying to
    > resist resorting to a tables-within-tables layout as yet.
    >
    > How best do I control this layout? Do I specify a bounding block of a[/color]
    fixed[color=blue]
    > width? Do I use px/pt/cm/em/etc widths? How do I make sure that the[/color]
    content[color=blue]
    > wraps rather than stretches it's container?
    >
    > It's hard to ask more specific questions because I don't know what I don't
    > know!
    >
    > Anyway, thanks in advance...
    >
    > Chris
    >
    >
    > --
    > cjmnews04@REMOV EMEyahoo.co.uk
    > [remove the obvious bits][/color]

    Thank heavens I got here before the carnage began as I predicted in my post
    to you in c.i.w.a.h. :-)

    For printed documents I recommend PDF. With PDF you can be certain your
    document will look exactly as you expect.
    Good Luck,
    me

    PS: Please try not to be too offended by the crazies in here who will likely
    (surely?) attack you for wanting to use fixed fonts and non-fluid layout.


    Comment

    • Beauregard T. Shagnasty

      #3
      Re: Styling a Printable 'form'

      me wrote:
      [color=blue]
      > Thank heavens I got here before the carnage began as I predicted in
      > my post to you in c.i.w.a.h. :-)
      >
      > For printed documents I recommend PDF. With PDF you can be certain
      > your document will look exactly as you expect.[/color]

      For a printed form, PDF is a good option. So would a print style sheet.
      [color=blue]
      > PS: Please try not to be too offended by the crazies in here who
      > will likely (surely?) attack you for wanting to use fixed fonts and
      > non-fluid layout.[/color]

      We are not crazy.

      --
      -bts
      -This space intentionally left blank.

      Comment

      • kaeli

        #4
        Re: Styling a Printable 'form'

        In article <1142qo0i0hoq96 5@corp.supernew s.com>, anonymous@_.com enlightened
        us with...[color=blue]
        >
        > PS: Please try not to be too offended by the crazies in here who will likely
        > (surely?) attack you for wanting to use fixed fonts and non-fluid layout.[/color]

        And you say people ridicule YOU.

        Pot...kettle.

        --
        --
        ~kaeli~
        Murphy's Law #2030: If at first you don't succeed, destroy
        all evidence that you tried.



        Comment

        • CJM

          #5
          Re: Styling a Printable 'form'

          Well unfortunately (for me) this is an urgent business requirement. I really
          havent got time to get involved with any flame-war or jihad.

          I have to produce printed documents from a web application that will look
          consistent to all and every customer. I'd like to do it as slickly as I can,
          but I'd rather offend a few sensibilities and break a few rules if it's an
          alternative to not getting it done.

          I'll listen to the 'crazies' if they can be off help. Equally I'll listen to
          the Best-in-IE/fixed width/etc philistines if they can be of help. If both
          sides bother to help me out, I'll weigh up their respective advice and make
          my best judgement.

          However, we seemed to have jumped straight from the initial question to the
          idealogical battle with out actually offering and advice up; good, bad, or
          indifferent.

          Can anyone offer any sensible suggestions?

          Chris



          Comment

          • CJM

            #6
            Re: Styling a Printable 'form'

            If you disagree with his advice, please post your alternative suggestions...

            But please dont just waste my thread on an ongoing argument.


            Comment

            • me

              #7
              Re: Styling a Printable 'form'

              "kaeli" <tiny_one@NOSPA M.comcast.net> wrote in message
              news:MPG.1cab47 396e96977e98a3b c@nntp.lucent.c om...[color=blue]
              > In article <1142qo0i0hoq96 5@corp.supernew s.com>, anonymous@_.com[/color]
              enlightened[color=blue]
              > us with...[color=green]
              > >
              > > PS: Please try not to be too offended by the crazies in here who will[/color][/color]
              likely[color=blue][color=green]
              > > (surely?) attack you for wanting to use fixed fonts and non-fluid[/color][/color]
              layout.[color=blue]
              >
              > And you say people ridicule YOU.
              >
              > Pot...kettle.[/color]

              If I'm wrong then I haven't ridiculed anyone. Answer this. How many times
              have posters had their hands slapped in here for asking how to do things the
              (insert description of narrow minded people here) disapprove of?
              Signed,
              me


              Comment

              • Chris Morris

                #8
                Re: Styling a Printable 'form'

                "CJM" <cjmnew04@REMOV EMEyahoo.co.uk> writes:[color=blue]
                > Well unfortunately (for me) this is an urgent business requirement. I really
                > havent got time to get involved with any flame-war or jihad.
                >
                > I have to produce printed documents from a web application that will look
                > consistent to all and every customer. I'd like to do it as slickly as I can,
                > but I'd rather offend a few sensibilities and break a few rules if it's an
                > alternative to not getting it done.
                >
                > I'll listen to the 'crazies' if they can be off help. Equally I'll listen to
                > the Best-in-IE/fixed width/etc philistines if they can be of help. If both
                > sides bother to help me out, I'll weigh up their respective advice and make
                > my best judgement.
                >
                > However, we seemed to have jumped straight from the initial question to the
                > idealogical battle with out actually offering and advice up; good, bad, or
                > indifferent.
                >
                > Can anyone offer any sensible suggestions?[/color]

                You can use print stylesheets, but support is limited and you may find
                problems if you have a lot of IE users, and especially if you have
                users of older browsers.

                If it absolutely must look consistent in print, use PDF. You can
                generate it customised as necessary from a server-side script, if you
                need that, though I don't know the details and there are more appropriate
                groups to ask in for that.

                I think, from what you've said, the latter is the better solution. I
                think print stylesheets are more useful for producing screen documents
                _that also happen to print reasonably well_ rather than for producing
                documents that are primarily there to be printed.

                --
                Chris

                Comment

                • CJM

                  #9
                  Re: Styling a Printable 'form'


                  "me" <anonymous@_.co m> wrote in message
                  news:1142qo0i0h oq965@corp.supe rnews.com...[color=blue][color=green]
                  >> cjmnews04@REMOV EMEyahoo.co.uk
                  >> [remove the obvious bits][/color]
                  >
                  > Thank heavens I got here before the carnage began as I predicted in my
                  > post
                  > to you in c.i.w.a.h. :-)
                  >
                  > For printed documents I recommend PDF. With PDF you can be certain your
                  > document will look exactly as you expect.
                  > Good Luck,
                  > me[/color]

                  This seems like a long way round...

                  I have a PDF component which can render an ASP page as a PDF, but this is
                  dependant on the same issues - ie I must style the page appropriately in the
                  ASP page in order for it to render appropriately in the PDF.

                  The same component can construct a PDF manually (ie by adding text/graphics
                  etc to a blank PDF page) but this is a nightmare when it comes to handling
                  wrapping text etc...

                  There surely must be an easier route, via CSS??


                  Comment

                  • Beauregard T. Shagnasty

                    #10
                    Re: Styling a Printable 'form'

                    CJM wrote:
                    [color=blue]
                    > I have to produce printed documents from a web application that
                    > will look consistent to all and every customer.[/color]

                    Since you have no control over all and every customer's browser that
                    your visitors may use, you could only arrive at "consistent " by using
                    a pdf.

                    You haven't described exactly how intricate this form is. If it is
                    fairly simple, perhaps using tables with field names to the left of
                    fill-in spaces, and using CSS to make underlines with border-bottom
                    would work.

                    If it is complex, then HTML is not your answer.

                    --
                    -bts
                    -This space intentionally left blank.

                    Comment

                    • me

                      #11
                      Re: Styling a Printable 'form'

                      "CJM" <cjmnew04@REMOV EMEyahoo.co.uk> wrote in message
                      news:3adgufF696 qm4U1@individua l.net...[color=blue]
                      > Well unfortunately (for me) this is an urgent business requirement. I[/color]
                      really[color=blue]
                      > havent got time to get involved with any flame-war or jihad.
                      >
                      > I have to produce printed documents from a web application that will look
                      > consistent to all and every customer. I'd like to do it as slickly as I[/color]
                      can,[color=blue]
                      > but I'd rather offend a few sensibilities and break a few rules if it's an
                      > alternative to not getting it done.
                      >
                      > I'll listen to the 'crazies' if they can be of help.[/color]

                      ?
                      [color=blue]
                      > Equally I'll listen to
                      > the Best-in-IE/fixed width/etc philistines if they can be of help.[/color]

                      That would be *me*.
                      [color=blue]
                      > If both
                      > sides bother to help me out, I'll weigh up their respective advice and[/color]
                      make[color=blue]
                      > my best judgement.
                      >
                      > However, we seemed to have jumped straight from the initial question to[/color]
                      the[color=blue]
                      > idealogical battle with out actually offering and advice up; good, bad, or
                      > indifferent.
                      >
                      > Can anyone offer any sensible suggestions?
                      >
                      > Chris[/color]

                      PDF won't work for you? I assume you're familiar with them, if not please
                      say so.
                      Signed,
                      me


                      Comment

                      • CJM

                        #12
                        Re: Styling a Printable 'form'


                        "Chris Morris" <c.i.morris@dur ham.ac.uk> wrote in message
                        news:87eke6jrfg .fsf@dinopsis.d ur.ac.uk...[color=blue]
                        >
                        > You can use print stylesheets, but support is limited and you may find
                        > problems if you have a lot of IE users, and especially if you have
                        > users of older browsers.
                        >
                        > If it absolutely must look consistent in print, use PDF. You can
                        > generate it customised as necessary from a server-side script, if you
                        > need that, though I don't know the details and there are more appropriate
                        > groups to ask in for that.
                        >
                        > I think, from what you've said, the latter is the better solution. I
                        > think print stylesheets are more useful for producing screen documents
                        > _that also happen to print reasonably well_ rather than for producing
                        > documents that are primarily there to be printed.
                        >
                        > --
                        > Chris[/color]

                        Thanks Chris

                        Given the time constraints, I think I'm going to have to go for the
                        screen-documents-that-print-reasonably-well. The PDF solution is a little
                        bit more work than I have time for... though it might be a worthy addition
                        to the next version....

                        PS... ALL my users are using IE! (same as many other corporate
                        environments). In theory, having a known and limited user base could be an
                        advantage, but I'm reluctant to start developing IE-only applications, and
                        as we all know - it isn't the most reliable or compliant browser.



                        Comment

                        • me

                          #13
                          Re: Styling a Printable 'form'

                          "CJM" <cjmnew04@REMOV EMEyahoo.co.uk> wrote in message
                          news:3adhfeF6bn ondU1@individua l.net...[color=blue]
                          >
                          > "me" <anonymous@_.co m> wrote in message
                          > news:1142qo0i0h oq965@corp.supe rnews.com...[color=green][color=darkred]
                          > >> cjmnews04@REMOV EMEyahoo.co.uk
                          > >> [remove the obvious bits][/color]
                          > >
                          > > Thank heavens I got here before the carnage began as I predicted in my
                          > > post
                          > > to you in c.i.w.a.h. :-)
                          > >
                          > > For printed documents I recommend PDF. With PDF you can be certain your
                          > > document will look exactly as you expect.
                          > > Good Luck,
                          > > me[/color]
                          >
                          > This seems like a long way round...
                          >
                          > I have a PDF component which can render an ASP page as a PDF, but this is
                          > dependant on the same issues - ie I must style the page appropriately in[/color]
                          the[color=blue]
                          > ASP page in order for it to render appropriately in the PDF.
                          >
                          > The same component can construct a PDF manually (ie by adding[/color]
                          text/graphics[color=blue]
                          > etc to a blank PDF page) but this is a nightmare when it comes to handling
                          > wrapping text etc...
                          >
                          > There surely must be an easier route, via CSS??[/color]

                          I assume you want a pixel perfect layout, if so you must use fixed fonts and
                          a non-fluid layout, if that's OK for you.
                          Signed,
                          me


                          Comment

                          • CJM

                            #14
                            Re: Styling a Printable 'form'


                            "Beauregard T. Shagnasty" <a.nony.mous@ex ample.invalid> wrote in message
                            news:3adhliF69f a4gU1@individua l.net...[color=blue]
                            > CJM wrote:
                            > Since you have no control over all and every customer's browser that
                            > your visitors may use, you could only arrive at "consistent " by using
                            > a pdf.
                            >[/color]

                            I think I might have led you up the wrong path! The application is used
                            internally for tracking a service that one part of our business conducts -
                            customers wont be getting anywhere near it! So the user base is known (All
                            IE users I'm afraid). But the application needs to spit out some paperwork
                            periodically that is posted to the customer.

                            [color=blue]
                            > You haven't described exactly how intricate this form is. If it is
                            > fairly simple, perhaps using tables with field names to the left of
                            > fill-in spaces, and using CSS to make underlines with border-bottom
                            > would work.
                            >[/color]

                            The forms aren't that complex...

                            - a header, with logo & company address etc
                            - Customer Billing Address details on one side, Delivery Address details on
                            the other (so each would use half the width or thereabouts)
                            - details of items ordered/shipped/invoiced beneath
                            - finish off with some footer info.

                            I just need it to use the full width of an A4 page and to be printed
                            reasonably consistently;
                            [color=blue]
                            > If it is complex, then HTML is not your answer.[/color]

                            Not that complicated... is it?

                            My instinct is to create a bounding DIV or to style the Body element to the
                            width of an A4 page...and I can then use 100% of that bounding container to
                            position the individual elements... How to make them stick to that width is
                            another question...

                            But how do I specify the width of the page? Body { width: 8in;} ?? Should I
                            use 70ems? A number of pts?

                            Chris


                            Comment

                            • CJM

                              #15
                              Re: Styling a Printable 'form'

                              Not pixel perfect...

                              But I'm not sure about a truly fluid design either - I dont mind subtle
                              differences, but I dont want them to be extreme.


                              Comment

                              Working...