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

Free Support Forum - aspose.com

Iam unable to assign the html text to annotaion’s contents of aspose pdf in .net

How to add the HTML text to Contents of annotations to open the popup with html text in aspose pdf document

Ref:
string HTMLText = HTMLToText(WebUtility.HtmlDecode(s.annoateComment));
var pageRectangle = document.Pages[s.pageNumber ?? 0];
//var rectRectangle = new Rectangle((double)xValue, (double)yValue, (double)(width - xValue), (double)(height - yValue));
var rectRectangle = GetRectangle(document, (float)xValue, (float)yValue, (float)(width), (float)(height), (float)CHeight, (float)CWidth, s.pageNumber ?? 0, pageRectangle.Rotate);
var rectAnnotate = new SquareAnnotation(pageRectangle, rectRectangle)
{
Title = UserName + “-” + “PD” + “:” + DateTime.Now.ToString(),
Color = Aspose.Pdf.Color.Red,
InteriorColor = Aspose.Pdf.Color.MistyRose,
Contents = HTMLText.ToString(),
Opacity = 0.5,
Popup = new PopupAnnotation(pageRectangle, rectRectangle)
};

                    Border border = new Border(rectAnnotate);
                    border.Width = Convert.ToInt32(s.strokeWidth??2); ;
                    rectAnnotate.Border = border;
                    rectAnnotate.Color = Aspose.Pdf.Color.Parse(s.strokeColor);
                    pageRectangle.Annotations.Add(rectAnnotate);

Note: unable to show the HTML text in popup of aspose pdf document

@Lavanya_Jujjavarapu

Did you try to achieve this using Adobe Reader? Were you able to do so in Adobe Reader? If yes, would you please share the expected sample PDF for our reference? We will further test the scenario in our environment and address it accordingly.

Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Anything else you want to add to your query before I forward it to our support department.
PDFNET: No
Assistant: PDFNET, one last thing before I move forward. Please provide an appropriate subject line for your support ticket.
PDFNET: Hi
Assistant: Welcome to Aspose, PDFNET!
Assistant: How may I help you today?
PDFNET: unable to assign the html text to annotaion contents of aspose pdf
Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Do you want to include any more details before I generate a support ticket for you.
PDFNET: How to add the HTML text to Contents of annotations to open the popup with html text in aspose pdf document
Assistant: Hello, PDFNET! This is Aspose Assistant.
Assistant: How can I help you?
PDFNET: How to add the HTML text to Contents of annotations to open the popup with html text in aspose pdf document
Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Do you want to include any more details before I generate a support ticket for you.
PDFNET: No

Assistant: PDFNET, one last thing before I move forward. Please provide an appropriate subject line for your support ticket.
PDFNET: Please create ticket
Assistant: Almost done, generating support ticket for you.

Assistant: Please let me know how can I help you today?
PDFNET: Hi
Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Anything else you want to add to your query before I forward it to our support department.
PDFNET: HI
Assistant: :wave:, PDFNET! This is Aspose Assistant.
Assistant: Please let me know how can I help you today?
PDFNET: just now got this link Please create ticket - Aspose Assistant conversation with customer on Thursday, September 23rd 2021, 6:38:22 am
Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Anything else you want to add to your query before I forward it to our support department.
PDFNET: Hi
Assistant: Welcome to Aspose, PDFNET!
Assistant: May I know what are you looking for?
PDFNET: How to add the HTML text to Contents of annotations to open the popup with html text in aspose pdf document
Assistant: Thanks for asking question. I’ll be forwarding your query to our technical support department.
Assistant: Anything else you want to add to your query before I forward it to our support department.
PDFNET: No
Assistant: PDFNET, one last thing before I move forward. Please provide an appropriate subject line for your support ticket.
PDFNET: Iam unable to assign the html text to annotaion’s contents of aspose pdf
Assistant: Almost done, generating support ticket for you.