Have problem with document that contains some strange invisible/non-printable characters. Posibly it’s document author’s error (copy paste result). But because Word does layout other way than Aspose.Words it’s much harder to find them and correct in large document.
Tested With Aspose.Words 11.5
public void Converts_Correct_Layout_Unprintable_characters()
string inputFile = @“TestData\GeneratePdf\Unprintable.doc”;
string outputFile = @“Unprintable.pdf”;
Document doc = new Document(inputFile);
var pdfDocument = new Aspose.Pdf.Document(outputFile);
Assert.AreEqual(1, pdfDocument.Pages.Count, “Incorrect layout. Wrong number of pages”);
- Click the File tab.
- Under Help, click Options.
- Click Display - Under Always show these formatting marks on the screen, clear the check boxes for any formatting marks that you do not want to show in your documents at all times.
System I’m working on is automatic document processing system. I’ using Aspose.Words to extract page numbers and content for some paragraphs. And when MS Word layout and Aspose.Words layout are not in sync links that system produces are leading to incorrect pages.
So question is are you able to fix it (make tak it behave same as MS Word) or is there anything I can do on Aspose.Words side to be in sync with MS Word layout.
Node chars = doc.GetChildNodes(NodeType.Run, true).ToArray();
foreach (Run r in chars)
r.Text = " ";