Rectangular HighlightAnnotation

Hi,

I want to create a simple rectangular highligh annotation; but what I get is something like ellipse, with round left and right sides.

Can you please advise on how to create a simple rectangular annotation with straight sides?

PS: I dislike posting such simple questions here, but the documentation about annotations objects are very hard to follow and does not have samples except a few "first look" ones. Additionally, object model is not well structured for some reason (properties have types such as string or object - and it takes too long time to find what to put there). For this reason, if you can provide assistance about the requirement, I would appreciate it.

Any news for me?

Hi there,


Thanks for your inquiry. I’m afraid, we have already noticed this issue in HighlightAnnotation and logged the issue in our issue tracking system as, PDFNEWNET-34497, for further investigation and correction. I’ve also linked your request to the issue. You will be notified via this forum thread as soon as issue is resolved.
Moreover, As a workaround you can use SquareAnnotation for the purpose. please check following code snippet for the purpose.

//create SquareAnnotation
SquareAnnotation squareAnnotation = new SquareAnnotation(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(200, 200, 250, 220));
squareAnnotation.Title = “Sample Annotation Title”;
squareAnnotation.Subject = “Sample Annotation Subject”;
squareAnnotation.Contents = “Sample contents for the Annotation”;
squareAnnotation.Color = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Yellow);
Border border = new Border(squareAnnotation);
border.Width = 0;
//add annotation in the annotations collection of the page
pdfDocument.Pages[1].Annotations.Add(squareAnnotation);

Please feel free to contact us for any further assistance.

Best Regards,

Ok, but the point is an "highlight" object would not be opaque; and lets the text under it to be seen. What you suggested totally hides what lies beneath.

Am I wrong? Any other suggestions please?

Can you please suggest any other type of annotation whose opacity works at this time? I really need a temporary solution for this; until the issue is solved on your side.

Hi,


Thanks for contacting support.

As per my understanding, you need to add a simple highlight annotations with transparent visibility and the contents beneath that should be visible. As a workaround, you may try using CreateMarkup(…) method of PdfContentEditor class but I am afraid it creates the annotation with curved sides rather than straight side. You may try using the following code snippet and see if it can fulfill your requirements.

For your reference, I have also attached the sample output generated with below specified code snippet.

[C#]

PdfContentEditor editor = new
PdfContentEditor();<o:p></o:p>

editor.BindPdf("c:/pdftest/Conversion_HelloWorld.pdf");

editor.CreateMarkup(new System.Drawing.Rectangle(80, 670, 100, 20),"", 0, 1, System.Drawing.Color.Yellow);

editor.Save(“c:/pdftest/HighLight_example_out.pdf”);


Any updates on this please? We are still waiting for a fix on this.

Hi,


Thanks for your patience.

As we recently have been able to notice the problem reported earlier, so the development team requires sometime to investigate and figure out the actual reasons of this problem. Furthermore please note that the issues reported under Enterprise and Priority Support have high precedence in terms of resolution as compare to the issues reported under normal support model and this issue will be resolved as per its schedule.

As soon as we have made some significant progress in terms of resolution, we would be more than happy to update you with the status of correction. Please be patient and spare us little time. We are sorry for this delay and inconvenience.

Can you please provide information about the status on this issue?

Thanks.

Hi there,


Thanks for your inquiry. I’m afraid your reported issue is still not resolved due to some other
priority tasks and it’s pending in the queue for analysis. However, I’ve
requested the team for ETA and as soon as I get a feedback I will update you
via this forum thread.

Sorry for the inconvenience faced.

Best Regards,

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””><o:p></o:p>

The issues you have found earlier (filed as PDFNEWNET-34497) have been fixed in Aspose.Pdf for .NET 7.9.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)