Change default font size convert text to pdf

But the number are remove, it’s possible only remove the Indent.

@jechevarria,

Thanks for your inquiry. Please ZIP and attach your input and expected output Word documents here for our reference. We will then provide you more information on it along with code.

ProblemListWithNumberList.zip (32.4 KB)
Input: ProblemList.txt
OutPut with method RemoveNumber : ProblemListRemoveNumber.pdf
Output without method RemoveNumber : ProblemListWithNumberList.pdf

I would like the result output to be the closest to the input file text. It’s possible? in the second output with numberlist.pdf the problem is that symbol “?” is not recognise as the list then indentation isnot the same.

@jechevarria,

Thanks for your inquiry. You can create list with list label “?”. Please check the following code example. Hope this helps you. We have attached the output PDF with this post for your kind reference. 18.2.pdf (18.7 KB)

Dim opt As New Aspose.Words.LoadOptions()
opt.AllowTrailingWhitespaceForListItems = False
Dim doc As Document = New Document((MyDir + "ProblemList.txt"), opt)
Dim list As Aspose.Words.Lists.List = doc.Lists.Add(ListTemplate.NumberDefault)
Dim level1 As ListLevel = list.ListLevels(0)
level1.NumberFormat = "?"
For Each para As Paragraph In doc.FirstSection.Body.Paragraphs
    If Not para.IsListItem Then
        If para.ToString(SaveFormat.Text).StartsWith("?") Then
            para.Range.Replace("?", "", New FindReplaceOptions)
            para.ListFormat.List = list
        End If

    End If

    para.ParagraphFormat.FirstLineIndent = 0
    para.ParagraphFormat.LeftIndent = 0
Next
doc.Save(MyDir + "18.2.pdf")