Prevent Extra Border Line from Appearing near Header when Converting DOCX to PDF (C# .NET)

Hi,

When converting a DOCX to PDF, I noticed an extra line appeared at the top.

Code:

var doc = new Document(@".\test1.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(@".\out.pdf");

If I convert the DOCX to PDF manually using ‘save as’, the line doesn’t appear.

I’ve attached my test files and screenshot for your reference. Could you please help me check this?

test.zip (42.3 KB)
image.png (26.0 KB)

Thanks,

@ServerSide527,

We have logged this problem in our issue tracking system with ID WORDSNET-22196. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.