Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1465 posts 1887 karma points
    Oct 27, 2011 @ 17:57
    Gordon Saxby
    0

    How to make carriage returns work

    I have a multi-line textbox but the carriage returns (linefeeds?) are not being replicated in the PDF - how can I make them appear (the line feeds)?

     

  • Gordon Saxby 1465 posts 1887 karma points
    Oct 27, 2011 @ 18:04
    Gordon Saxby
    0

    Aha!!! Figured it!

    I copied the "P" template and made it match "br". I then used

    PDF:RteToHtml(umbraco.library:ReplaceLineBreaks($currentPage/eventDetails))

    and it worked :-)

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Oct 27, 2011 @ 18:10
    Darren Ferguson
    0

    I love self resolving issues :)

  • Lee 1130 posts 3088 karma points
    Apr 07, 2012 @ 09:43
    Lee
    0

    Ahhh I have been trying to figure this out myself, thanks this should help - I'm using a Razor template though

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Apr 07, 2012 @ 09:49
    Darren Ferguson
    0

    Hi Mate,

    Have a look at ~/App_Code/Pdf.cshtml

    It has a Razor helper called RenderRichText if you wrap up your RTE in that then it should parse paragrah tags.

    If you want to parse a break (br) you'd just add another helper for it and add to the case statement in ParseElement

    Hope this helps.

     

     

  • Lee 1130 posts 3088 karma points
    Apr 07, 2012 @ 10:32
    Lee
    0

    Exactly what I did :) Thanks bud, seems to be working perfectly! See you Wednesday.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies