We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Image alignment issue inside textboxfield (form field)

Hi Team,

I am using ASPOSE.PDF API with DLL version

I have a very simple requirement to bind image path inside textbox form field.
Image type is JPEG.

Issue is before using ASPOSE.PDF we were using ACTIVE PDF API and render of JPEG image is as expected consider a left align.

Once we migrate code to adept ASPOSE.PDF API, image render inside txtbox form field but with center align.
I tried every possible approach using ASPOSE still not able to resolve the issue.

Kindly assist and suggest your solution.

Logic: we are using Aspose.Pdf.InteractiveFeatures.Forms.TextBoxField
// Open document
Document pdfDocument = new Document("input.pdf");
// Get values from all fields
foreach (Field formField in pdfDocument.Form)
  TextBoxField textBoxField= formField  as TextBoxField ;
textBoxField.HorizontalAlignment = HorizontalAlignment.Left;


Using this Image is rendered inside textbox field but as center aligned.

We are not creating PDF from scratch so Generator API not applicable, we are working on byte[] and after filling input fields of type TextBoxField, we send back byte[] to consumer application.

Thanks & regards,
Amit Bisht

Hi Amit,

Thanks for your inquiry. I have tested your scenario with using Aspose.Pdf for .NET 10.6.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39039 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
mso-bidi-language:AR-SA”>Best Regards,