Note that there are some explanatory texts on larger screens.

plurals
  1. PORe-formatting free-text to fixed format text (C#)
    primarykey
    data
    text
    <p>I have a problem that seems quite straight forward, but I cannot find a clean and simple solution.</p> <ul> <li><p>I have some freely formatted text. This text can be quite long and contains lines of various length (> 120 characters), paragraphs and empty lines.</p></li> <li><p>I need to present this text in a fixed format (say 120 characters pr. line and 25 lines pr. page). But keeping the original formatting in paragraphs and empty lines.</p></li> </ul> <p>A page break should not be in the middle of a word. Ideally a page break should be placed so that we avoid single lines of a new paragraph on the bottom of a page and rather move the whole paragraph to the next page etc.</p> <p>Simplified sample (input text):</p> <pre><code> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at magna at tellus vehicula eleifend. Vivamus at est erat. Phasellus eget tincidunt tellus. Integer ultrices dolor a magna congue imperdiet. Duis est sem, aliquet id fermentum sed, mollis nec metus. Phasellus porttitor porttitor sodales. Aliquam tincidunt convallis massa, sed tempus erat ornare in. Sed scelerisque, lorem accumsan imperdiet accumsan, mauris turpis molestie augue, vehicula egestas tellus quam ac nulla. In porta augue ac dolor imperdiet semper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacus neque, tempor nec feugiat sed, posuere sed lorem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla metus neque, volutpat vitae pharetra rutrum, malesuada in dolor. </code></pre> <p>"Fixed" width formatted with page breaks (output of program):</p> <pre><code> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at magna at tellus vehicula eleifend. Vivamus at est erat. Phasellus eget tincidunt tellus. Integer ultrices dolor a magna congue imperdiet. Duis est sem, aliquet id fermentum sed, mollis nec metus. Phasellus porttitor porttitor sodales. Aliquam tincidunt convallis massa, sed tempus erat ornare in. Sed scelerisque, lorem accumsan imperdiet accumsan, mauris turpis molestie augue, vehicula egestas tellus quam ac nulla. [pagebreak] In porta augue ac dolor imperdiet semper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacus neque, tempor nec feugiat sed, posuere sed lorem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla metus neque, volutpat vitae pharetra rutrum, malesuada in dolor. </code></pre> <p>Anyone have any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload