Hi Team,
I am using ASPOSE.PDF API with DLL version 10.5.0.0.
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;
textBoxField.addImage(System.Drawing.Image.FromFile(filepath));
}
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.