HTML , Printing labels and spacing

Discussion in 'HTML' started by Saeed, Sep 30, 2008.

  1. Saeed

    Saeed Guest

    I have 7 items that detail the customers address and need to print it
    in 5 lines where that 5 lines woudl fit in a Lable sticker.

    I m using C/C+ when writing to my HTL file using this syntax.
    fprintf(fp,"<p class=MsoNormal><b style='mso-bidi-font-
    weight:normal'><span style='font-size:11.0pt;font-family:Arial'>
    %s<u5:p></u5:p></span></b></p>\n",x);


    when x is null teh spacing seems to change between the lines than when
    it has a value which screwes the layout on the labels and things go
    out of sync.


    Is there any solution for this ? that is to say , to be able to leave
    a gap of ceratin spacing when i know how many blank lines i have had
    and do his gap at the end before the start of the new label ?


    Thanks
     
    Saeed, Sep 30, 2008
    #1
    1. Advertisements

  2. Saeed

    rf Guest

    Did you make up these styles or did you scape them off a "microsoft word"
    document?
    if (x == "")
    x = "&nbsp;"
     
    rf, Sep 30, 2008
    #2
    1. Advertisements

  3. Saeed

    rf Guest

    Too much c# recently :)

    x is, of course, a string, not a char *.
     
    rf, Sep 30, 2008
    #3
  4. You just have to decide how to divide them on 5 lines then. The HTML side of
    the matter is fairly trivial, but you can either use <br> between lines, or
    you could - somewhat more structurally - wrap each line inside <div> markup.
    Even a table could be used, but I don't think there's a tangible benefit
    _unless_ you want to draw borders around the address, or use background
    color for it, and you want its width to be "shrink-to-fit".
    Quite an odd division operation, is it not? People in the "real programmers
    use FORTRAN" school would say that you have division by zero. Read my lips:
    the slash "/" is a wicked punctuation mark, intended to confuse both the
    reader's mind and the writer's mind.
    Does it matter how you write it? Shouldn't the main concern be what markup
    to use? _Then_ you can start worrying about how to generate it.
    Oh my... looks like trolling... but maybe it's just ignorance. There's
    really not single item in the markup that is correct. An address is not a
    paragraph, to begin with, and using <b> for bolding with a browser-dependent
    CSS rule suggesting that the text be _not_ bold is... is... sorry, ran out
    of words.
    Oh really? So you did not read the Ten Commandments for C Programmers, did
    you? "Thou shalt not follow the NULL pointer, since madness and chaos awaits
    at its end."
    Stop creating the problem.
    In fact, if you may have _blank_ lines in an address, maybe <pre> is best
    markup, despite its primitiveness. Just remember that it sets font face to
    something monospace, but you can easily override this, with the usual CSS
    caveats, using a single simple rule in CSS.
     
    Jukka K. Korpela, Sep 30, 2008
    #4
  5. Saeed

    dorayme Guest

    You need to migrate to Australia, you would have the words then.... You
    have the front already, it is just that little bit of cultural pull that
    you need to loosen the fine European sensibility.

    If you do not fancy coming over, see if you can get to see Question Time
    in our federal parliament on TV. (And, btw, they are named individuals
    speaking in public. So you will be chock full of respect for them).
     
    dorayme, Sep 30, 2008
    #5
  6. Saeed

    Saeed Guest

    The chunk was extracted out of a MS word HTML Document and modified to
    get the Job done.
    As long as It works , I dont really care if HTML used is legal or
    pisses some people off.

    Thanks to all those who has a positive contribution to this thread
    w'out being a smart A...
     
    Saeed, Oct 1, 2008
    #6
  7. Saeed

    dorayme Guest

    The whole point about the concern for legality around these parts, is
    that long term it gets not to work or to generally contribute to a
    culture where things do not work satisfactorily. There is nothing wrong
    with high standards and they are far from identical to pedantry.
     
    dorayme, Oct 1, 2008
    #7
  8. Saeed

    Neredbojias Guest

    Bull. "High Standards" usually (though not always) indicates an excess of
    pedantry or an attitude very much like it.
     
    Neredbojias, Oct 1, 2008
    #8
  9. Saeed

    dorayme Guest

    Well, maybe so. There are a few people around who use their own (Toby
    Inkster does!). Perhaps all those who do should publish theirs so we can
    all benefit. Earthlings are so selfish and secretive! When Toby Inkster
    and others get to the Gates, St Peter *will* ask pointedly whether they
    shared their own DTD and the outcome could be hellish.
     
    dorayme, Oct 1, 2008
    #9
  10. Maybe because it's called BLOCKquote? It's supposed to be for quoting a
    block of text, and a block of text would have at least one block level
    element in it. It's a wrapper for long quotations, as opposed to the q
    element for inline content that doesn't required paragraph breaks. It
    makes sense semantically. You could say:
    <div class="quotation">
    <p>This is paragraph one.</p>
    <p>This is paragraph two.</p>
    </div>

    But, that does not make any sense semantically where this does:
    <blockquote cite="http://example.com/reference/">
    <p>This is paragraph one.</p>
    <p>This is paragraph two.</p>
    </blockquote>
     
    Adrienne Boswell, Oct 1, 2008
    #10
  11. Because there is the ability to have one or more block level elements.
    Would you go
    <blockquote>something long</blockquote>
    <blockquote>some more long things on the same subject</blockquote>
    <blockquote>even more long things on the same subject</blockquote>

    or

    <blockquote>
    <p>something long</p>
    <p>some more long things</p>
    <p>even more long things</p>
    </blockquote>
     
    Adrienne Boswell, Oct 1, 2008
    #11
  12. Because blockquote has sematic meaning, and div does not.
     
    Adrienne Boswell, Oct 1, 2008
    #12
  13. Saeed

    dorayme Guest

    Think about this difference. Q is for short quotations and is (as we
    say) inline, whereas BLOCKQUOTE is for long ones (one or more). So what
    is the *semantic* difference? Nothing much really. The difference in
    tools here is greatly for presentational purposes. You can see this when
    you have something to quote that is not clearly short or long and could
    be done with either tool. There is no meaning difference - except in one
    subtle respect which we can leave out for now.
    But here you are case picking. Your argument looks not so strong when
    you compare

    <div class="quotation">
    <p>
    God is gives existence to the universe by...
    </p>
    </div>

    to the "possible"

    <blockquote cite="http://example.com/reference/">
    God is gives existence to the universe by...
    </blockquote>

    The latter BLOCKQUOTE is better semantically than the div, sure. But it
    is not any worse semantically than the over fussy:

    <blockquote cite="http://example.com/reference/">
    <p>
    God is gives existence to the universe by...
    <p>
    </blockquote>

    The difference between BLOCKQUOTE and Q is simply about presentation.
    The former is a good tool because it tells the browser to create a block
    on a new line, indent it or whatever. Very useful indeed. But, note how
    *this* has absolutely nothing to do with whether it should have the
    pesky further requirement that Ben is rightly irked by.

    (No idea if my efforts above to indent by use of the tab and return key
    are successful? Looks good here! <g>)
     
    dorayme, Oct 1, 2008
    #13
  14. Gazing into my crystal ball I observed dorayme
    No, it really has nothing to do with presenation. It has to do with
    sematics. If I were reading meanings out to you it might go something
    like this:
    arbpen: This is the main heading
    arbpen: This is a paragraph that contains content relavent to the
    heading.
    arbpen: This is a quotation from example.com
    arbpen: This is a paragraph from the quotation
    arbpen: This is another paragraph from the quotation
    arbpen: This ends the quotation
    arbpen: This is a second level heading
    arbpen: This is another paragraph the contains content relavent to the
    second level heading.
    Again, it's because the blockquote, like a div, can contain more than
    one paragraph. The big difference is that div is a container only, and
    has no semantic meaning, where blockquote does.
     
    Adrienne Boswell, Oct 2, 2008
    #14
  15. Saeed

    Neredbojias Guest

    I agree with you and can't even see why a(nother) container is needed in
    Probably not. However, my detering remark was meant to address the
    common, general meaning of "high standards", not the html/css-specific
    one. Those who propound such supposed "ideals" (even if they're right)
    are typically overfull of arrogance or smugness and totally full of you-
    know-what.
     
    Neredbojias, Oct 2, 2008
    #15
  16. Saeed

    dorayme Guest

    *What* exactly has nothing to do with presentation? The difference
    between BLOCKQUOTE and Q? The former is a tool for rendering long quotes
    that the author feels need presenting as a block, the latter for shorter
    ones, happily quoted inline. The matter is fairly subjective in many
    cases, the choice seems to be author preference depending on many
    factors and background conditions.

    But this has little to do with the main issue at hand and that is why it
    would have been wrong to allow loose text in a BLOCKQUOTE. The
    difference between a div and a BLOCKQUOTE is not suddenly erased because
    of the proposal to allow loose text in BLOCKQUOTE.

    You keep talking about divs and headings and other things. Talk about
    the difference between BLOCKQUOTE and Q. And then talk about why exactly
    BLOCKQUOTE would suddenly become a useless tool if one did not have to
    put in a block within it. You are doing none of these things at all, yet
    these are the only relevant things.
    I am sorry Adrienne, but all this is not relevant. No one is proposing
    This big difference is not the main concern. The main concern is would
    the difference magically disappear if a BLOCKQUOTE could legally contain
    a quotation unwrapped in a further element. You present no argumnent
    about this. It would, imo, simply not be affected at all.
     
    dorayme, Oct 2, 2008
    #16
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.