We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Words for Word - How can I force linefeeds without paragraph gaps (for poetry)

When formatting poetry, each line of poetry should start a new line, without intervening white space, but there should be a paragraph-like gap between stanzas. In Microsoft Word, this can be done with a "manual line break" at the end of lines, and a regular paragraph break after the last line of a stanza. Aspose Words for Word stand-alone converted files do not seem to distinguish between the two when viewed on my Kobo e-reader -- both show a gap between the lines.

Is there another way to format a MS Word document so poetry looks normal in the epub format?

Hi
Richard,


Thanks for your inquiry. Please follow up the code snippet to insert line break within stanzas:

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

Run runWithCRs = new Run(doc);

runWithCRs.Text = "text before " + ControlChar.LineBreak + "text after " + ControlChar.LineBreak + "more text after another";

Paragraph par = builder.InsertParagraph();

par.Runs.Add(runWithCRs);

doc.Save("d:/temp/Poetry1.docx");


In case of any ambiguity, please let me know.


Hi Richard,


Thanks for your inquiry.

Could you please attach a sample template here which demonstrates the issue? I will look into this and provide some further feedback for you.

Thanks,