Aspose.PDF Line Spacing C# .NET

I have the following code to add a simple textboxfield i am adding to a pdf form. I have two issues, the first is I can’t seem to set the font to “CourierStd”, it doesn’t seem to find it when creating the DefaultAppearnce. The second issue is how do i set the line spacing to .96, that is critical in transitioning to using Aspose.PDF to replace the current iText implementation.

// Create a text box field
TextBoxField textBox = new TextBoxField(docList[sht].Pages[1], new Rectangle(xTopLeft, yTopLeft, width, height));

// Set the default appearance (font and color)
textBox.DefaultAppearance = new DefaultAppearance("Courier", 9.6, System.Drawing.Color.Black);

// Set multiline for text wrapping
textBox.Multiline = true;

// Set the text box content
textBox.Value = tmpCONTENT;

@david_j_meyer2_boeing_com

Are you sure that Courier font is installed in your system? Also, if possible, can you please share an expected output PDF that has all of these options that you want to achieve using Aspose.PDF?

I am less concerned about the font and more interested in how to set the line spacing so that all content put into the text field has a set line spacing of 1 for example.

I am unable to share the pdf, i would have to modify it to much to be representative.

This particular requirement needs investigation from our end and we need a sample document to understand the needs more clearly. Therefore, please take your time to gather and prepare a sample document so that we can log an investigation ticket in our issue tracking system and share the ID with you.

We are working a different solution. Thanks For you help

@david_j_meyer2_boeing_com

In case you are able to arrange some sample file for our reference, we’d be happy to log a feature investigation ticket in our issue tracking system.