Professional Web Applications Themes

Bad Text Wrapping with CFDOENT - Coldfusion - Advanced Techniques

I am having a text wrapping problem with CFDOENT. I am using ColdFusion MX 7 with hotfix 3 applied on Linux. I have a long line of text which wraps too early. This seems to happen with any line of text which gets wrapped. Take a look at the example code I have included. When I request that page, I get back a PDF as I expect. But the lines of text all wrap at about the 6 inch mark on the page (from the left side), leaving about 1.5 inches of white space on the right side. Am I ...

  1. #1

    Default Bad Text Wrapping with CFDOENT

    I am having a text wrapping problem with CFDOENT. I am using ColdFusion MX 7
    with hotfix 3 applied on Linux.

    I have a long line of text which wraps too early. This seems to happen with
    any line of text which gets wrapped. Take a look at the example code I have
    included. When I request that page, I get back a PDF as I expect. But the lines
    of text all wrap at about the 6 inch mark on the page (from the left side),
    leaving about 1.5 inches of white space on the right side.

    Am I missing something here?




    <CFDOENT FORMAT="PDF" NAME="sTmpPDFOutput" PAGETYPE="letter" MARGINTOP="0"
    MARGINBOTTOM="0" MARGINLEFT="0" MARGINRIGHT="0">
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Test of Text Wrapping in CFDOENT</TITLE>
    <STYLE TYPE="text/css">
    .norml { font: 8pt Times-Roman; text-align: left; }
    </STYLE>
    </HEAD>
    <BODY>
    <TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD CLASS="norml">This is a test of a very long line of text to see where
    the ColdFusion CFDOENT tag will wrap it. On my server, CF begins the wrap
    too early, leaving a bunch of white space to the right of all my lines of
    text.</TD>
    </TR>
    </TABLE>
    <BR><BR>
    <SPAN CLASS="norml">Here is a second line of very long text outside of the
    TABLE tag from above, just to make sure the same thing happens.</SPAN>
    <BR><BR>
    <P CLASS="norml">Here is a third line of very long text outside of the TABLE
    and SPAN tags from above, just to make sure the same thing happens.</P>
    </BODY>
    </HTML>
    </CFDOENT>
    <CFCONTENT TYPE="application/pdf" VARIABLE="#sTmpPDFOutput#">

    Zamboni1138 Guest

  2. #2

    Default Re: Bad Text Wrapping with CFDOENT

    I executed the attached code and it worked perfectly fine. I wonder why it
    could be happening at your end. Did you run the exact same code as attached
    one?
    What happens with flashpaper?

    Rupesh




    rupeshk Guest

  3. #3

    Default Re: Bad Text Wrapping with CFDOENT

    Yes, the attached code is an exact copy of what I was using. For fun I even
    copied it back out of my post, made a new file and got the same results.

    When I switch to FlashPaper the wraps occur at the same point in the text, but
    the text takes up the entire line, wrapping at the correct position on the
    page. But the only reason this is happening is because the font is noticeably
    larger in size.

    Is your ColdFusion running on a Windows box, or a Linux box? I?m using Linux,
    and I have yet to test this with a Windows box. On the client end I?ve viewed
    it with Windows and Linux and they look the same.

    I will send you a private message with the URL of what I?m looking at, and an
    URL for a JPEG screenshot of what I am seeing on my end.


    Zamboni1138 Guest

  4. #4

    Default Re: Bad Text Wrapping with CFDOENT

    I set up a Windows 2003 Server box with ColdFusion MX 7 + hotfix 3 and then
    executed the same code as attached above.

    The result was a PDF, with correct wrapping, that appeared to be using the
    correct font and size, 8pt Times-Roman. The difference between the PDFs from
    the Linux server and the Win2k3 server are quite noticeable.

    I believe the problem is with the font support for CFMX7 on Linux. On Windows,
    my Font Management screen has about 20-25 different fonts, most of them
    TrueTypes which can be used in PDFs or FlashPaper. On a Linux machine the Font
    Management screen only has 6 fonts, all type ADOBE-BUILT-IN and all for PDFs
    only.

    Although I am using the correctly listed font face ("Times-Roman") in my code,
    ColdFusion does not seem to be obeying the size.


    Zamboni1138 Guest

  5. #5

    Default Re: Bad Text Wrapping with CFDOENT

    Any word on this font problem with CFDOENT and Linux?

    I checked my webserver logs and I can see that you never went to those URLs I sent in the private message, which demonstrate the problem.

    Zamboni1138 Guest

  6. #6

    Default Re: Bad Text Wrapping with CFDOENT

    somehow I never recieved any private message. Anyway, I had missed out the
    point that you were running it on linux and I was able to te it on
    linux. I will log a bug for the same and get back to you after yzing this.

    Thanks & Regards,
    Rupesh.

    rupeshk Guest

  7. #7

    Default Re: Bad Text Wrapping with CFDOENT

    I have the same problem.

    Config:
    ColdFusion MX 7 with hotfix 2
    Windows 2003 Server with IIS
    CoolFreak Guest

  8. #8

    Default Re: Bad Text Wrapping with CFDOENT

    So this didn't get fixed in Updater 1?

    I don't even see it listed under the known issues in the release notes.

    What is the bug number for this issue, and why isn't it listed in the known issues?
    Zamboni1138 Guest

  9. #9

    Default Re: Bad Text Wrapping with CFDOENT

    hmm.. The reason it happens is that IText that we use for pdf creation, works
    with only "true type fonts" and there are no true-type fonts installed on your
    machine that can render this content. If you can install true type fonts and
    use that to render the content, it would all work.


    rupeshk Guest

  10. #10

    Default Re: Bad Text Wrapping with CFDOENT

    What about all of these fonts listed in Font Management?

    They all say ADOBE-BUILT-IN, and all are marked as "Useable In PDF".

    Is this problem related to those fonts?
    Zamboni1138 Guest

  11. #11

    Default Re: Bad Text Wrapping with CFDOENT

    I copied a TrueType font file (arial.ttf) from a windows machine to my linux box and added it as a "User Defined Font".

    The text stil wraps too early.
    Zamboni1138 Guest

  12. #12

    Default Re: Bad Text Wrapping with CFDOENT

    Was there ever a solution to this? I am having the same problem. I am using TTF
    installed on a Linux box and it seems to be adding extra space to the end of
    the line. The added space seems to increase as the length of the line
    increases.

    Any suggestions?

    vshadow Guest

  13. #13

    Default Re: Bad Text Wrapping with CFDOENT

    No. I have yet to hear back anything about this. Never got a bug number either.
    Zamboni1138 Guest

  14. #14

    Default Re: Bad Text Wrapping with CFDOENT

    Well, I am going to make the conclusion that it is merely a CF issue. I
    actually had a little fun this morning using IText (the java backend that makes
    cfdoent possible). I looped through the registered fonts in IText and spit
    them out to a PDF... they all lined up and had no extra space. I tried using
    cfdoent and only got a couple of fonts to work (Courier, Helvetica, and
    Times) and all had added space (in variable amounts). I have a lot more fonts
    installed on Linux (TTF) so it should work. It actually did work previous to
    the 7.1 update. I wonder what happened.

    Let me know if anyone figures something out or this is fixed. We're paying a
    lot of money for both Coldfusion licenses and Flex licenses which might both
    need to be refunded if we have to go to using another technology.

    vshadow Guest

Similar Threads

  1. Text Wrapping Issues
    By jhgd143@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 5
    Last Post: October 4th, 01:58 PM
  2. Wrapping Text
    By charliee3 in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: August 16th, 11:05 AM
  3. Help!!!! text wrapping only outside of the page!!
    By Paul_Welk@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: June 25th, 02:49 PM
  4. Combo Box - Wrapping Text
    By Colella webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: January 30th, 04:45 AM
  5. Wrapping text around an object
    By SKB in forum Macromedia Fireworks
    Replies: 2
    Last Post: August 14th, 03:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139