Hallo Support-Team,
I found some strange results when converting a text-file.
Please see attached files:
1.) Original Textfile (packed as zipTestdatei.zip (820 Bytes)
)
2.) This textfile saved in MSWord as PDF
3.) Converted with aspose words V.22.5
What can I do?
Kind regards, GerdTestdatei.txt.aspose.pdf (47.6 KB)
Testdatei.txt.word.pdf (42.1 KB)
@GRein The problem occurs because Aspose.Words detect the input TXT file as Markdown document and loads it appropriately. To get the desired output you can specify load format explicitly:
LoadOptions opt = new LoadOptions();
opt.LoadFormat = LoadFormat.Text;
Document doc = new Document(@"C:\Temp\Testdatei.txt", opt);
doc.Save(@"C:\Temp\out.pdf");
out.pdf (27.3 KB)