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

Free Support Forum - aspose.com

Adding Rich text box to PDF

Hi there can anyone give me any guidance on how to add a new rich text box to a pdf.


I know how to add a normal multiline or single line text box and can see how i can retrieve a rich text box from an existing pdf but cannot see how to add a new RICH text box to a new pdf?

Kind Regards
Graeme

Hi Graeme,


Thanks for your inquiry. I’m afraid the requested feature is not available in current version of Aspose.Pdf for .net. But we have a good news for you, adding rich text box will be possible from coming release of Aspose.Pdf i.e 7.8.0. A sample code snippet for the purpose would be as following.

Document doc = new
Document(“Input.pdf”);

//add new rich text box field to document:

RichTextBoxField rt = new RichTextBoxField(doc.Pages[1], new Rectangle(50, 600, 250, 650));

rt.PartialName = "rt";

doc.Form.Add(rt);

doc.Save("Output.pdf");


Please feel free to contact us for any further query.

Best Regards,