Hi,
I have a TextBoxField and I would like to get it’s structural layout attributes e.g. padding. How can I do this with Aspose.Pdf.Net 25.12 ?
Thanks
Hi,
I have a TextBoxField and I would like to get it’s structural layout attributes e.g. padding. How can I do this with Aspose.Pdf.Net 25.12 ?
Thanks
You want to retrieve padding layout attributes for a TextBoxField in Aspose.Pdf.Net 25.12, but the TextBoxField class does not expose a direct padding property . You can work with related properties like Margin, Border, and Alignment to manage spacing.
Here’s how you can approach it:
Margin property lets you define spacing around the field . Although this isn’t padding directly, it sets the space outside the field’s boundaries.// Example of setting margin
textBoxField.Margin = new Margin(5, 5, 5, 5); // top, right, bottom, left
Border property to see if there’s any border thickness affecting layout .textBoxField.Border = new Border(textBoxField) { Width = 1 };
TextHorizontalAlignment and TextVerticalAlignment to manage text alignment within the field, which can influence perceived spacing .In summary, while Aspose.Pdf.Net 25.12 doesn’t provide a dedicated padding property for TextBoxField, you can manage layout spacing using Margin, Border, and alignment settings .
Padding is a low level structural attribute of pdf elements. I am aware that this is not available through textboxfield properties. You should tell me how to retrieve the corresponding Aspose.Pdf.Tagged.LogicalStructure.AnnotationElement for a Aspose.Pdf.Forms.TextBoxField.
We need to investigate the feasibility of this requirement internally. Can you please share a sample PDF document for our reference? We will log an investigation ticket in our issue tracking system and share the ID with you.
Hi,
btw. we have license for Aspose.Pdf and others…