Copied to clipboard

Flag this post as spam?

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


  • andles 44 posts 64 karma points
    Nov 10, 2010 @ 02:57
    andles
    0

    Newlines in HTML source code

    I'm generating a PDF via Umbraco API's, plain sailing for the most part. However, what I am seeing is that in my PDF the paragraphs are only about a fifth of the page long - and this is because it is picking up newlines (\n) in the content being pulled from Umraco.

    Loading the content in a web browser and viewing the source shows that there are newlines every 12 words approx. Obviously these have no effect in the HTML page - but my PDF picks them up, making for some very skinny and odd looking paragraphs.

    I could strip them easily enough, but it may be a bit more complicated than this in some cases, and given the volume I'm worried about performance.

    Does anybody know where these newlines are coming from as they do not appear in the source view of the Umbraco rich editor, and they don't seem to appear in the underlying ContentXML in the database either. It's as if there is a loop occuring in some Umbraco code that reads in the content in certain sized chunks and introdcues the newlines at this point??

    Ok - any advice would be very much appreciated. Thanks in advance,

    Andles...

     

Please Sign in or register to post replies

Write your reply to:

Draft