We are building an application that must insert form fields, and then fill them, in documents that have a mix of portrait and landscape forms on the same page (see attached). The portrait form fields are not a problem, but when we try to set the FormFieldFacade.Rotation = 90 on a form field it doesn’t seem to have any effect. Do you have any code samples we can look at that use this property? We have been unable to find any.
Hi Scott,
smunn:
but when we try to set the FormFieldFacade.Rotation = 90 on a form field
Document pdfDocument = new Document(dataDir + “jac_dispo_back.pdf”);
TextBoxField textBoxField = new TextBoxField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(95, 95, 115, 175));
textBoxField.PartialName = "textbox1";
textBoxField.Value = "Text Box";
Pdf.Annotations.Border border = new Pdf.Annotations.Border(textBoxField);
border.Width = 5;
border.Effect = Pdf.Annotations.BorderEffect.Cloudy;
border.Dash = new Pdf.Annotations.Dash(1, 1);
textBoxField.Border = border;
textBoxField.Characteristics.Background = Color.AliceBlue;
textBoxField.Characteristics.Rotate = Rotation.on270;
// Add field to the document
pdfDocument.Form.Add(textBoxField, 1);
dataDir = dataDir + "rotatedformfield.pdf";
// Save modified PDF
pdfDocument.Save(dataDir);
You may check the further information regarding DOM in "Working with Aspose.Pdf" section of our API documentation. In case if you need any further assistance please feel free to contact us.
Best Regards,