Bug found on Conversion of multiline text document into pdf

Hi,

I observed the following bug in the Aspose.Words component.

When I save a multiple line text document opened in Aspose.Words into pdf file.

The multiple line content is converted to a single line content in the converted out put file.

Note: The input txt file and out put pdf files are attached.

Kindly us know when we will have a fix for this bug.

Regards,

Robert

Hi Robert,

Thanks for your inquiry. Aspose.Words does not directly support loading text files through the use of the Document constructor. This feature is however planned. Please read supported features of plain text (txt) import/export from here:
https://docs.aspose.com/words/net/load-in-the-plain-text-format/
https://docs.aspose.com/words/net/save-in-the-plain-text-format/

However, you can use following code snippet to achieve your requirements. Please let us know if you have any more queries.

// Read whole txt file into string.
string txt = File.ReadAllText("in.txt");
// Insert string into document.
DocumentBuilder builder = new DocumentBuilder();
builder.Write(txt);
// Save output.
builder.Document.Save("out.pdf");