PdfFreeTextAnnotation Content and Location Issues

Hi Syncfusion Team,
Thank you for your excellent products.

I have two issues with the PdfFreeTextAnnotation

1) The annotation incorrectly uses the text of the annotation as the author, even when the correct author is specified
2) The annotation location does not take into account transformations done on the Page.Graphics. Even when page graphics rotation or translation transformations are applied, the annotation still renders on the same place when added to the page.

Your help would be much appreciated. If you need further information, please let me know.

6 Replies

SK Surya Kumar Syncfusion Team May 1, 2018 05:56 AM UTC

 
Hi Code Recipes, 


Thank you for contacting Syncfusion support. 


Please find the response for your queries below: 

Query 
Response 
The annotation incorrectly uses the text of the annotation as the author, even when the correct author is specified 
This issue has been fixed in our recent release and the latest version of assemblies can be downloaded from below link: 
 
 
The annotation location does not take into account transformations done on the Page.Graphics. Even when page graphics rotation or translation transformations are applied, the annotation still renders on the same place when added to the page. 
Changing the graphics of the page(like setting rotation or translate transform) will not reflect on the annotation which is added to the same page, since the annotation is added as a separate dictionary and it is not added directly to the graphics of the page. 



Please let us know if you need any further information in this. 


Regards,
Surya Kumar  




CR Code Recipes May 1, 2018 05:59 AM UTC

Hi Surya, 

Thank you for your prompt answer. 

Just one last question. 

Given the annotations are independent of the Page.Graphics, where is the origin of their coordinate system? 


SK Sasi Kumar Sekar Syncfusion Team May 2, 2018 11:48 AM UTC

Hi Code, 
 
Thank you for your update. 
 
In PdfDocument we are considering the top left corner is a starting point (0,0).  
  
Regards, 
Sasi Kumar S. 



CR Code Recipes May 2, 2018 02:29 PM UTC

Hi Sasi,

I must not be understanding something correctly.

When I collect the annotation's location I do the following. Keep in mind that the page is in "landscape", that is, rotated 90 degrees to the right.

var myDoc = new PdfLoadedDocument(filePath);
var ann = (PdfLoadedFreeTextAnnotation)myDoc.Annotations[0];

var X = ann.Location.X;
var Y = ann.Location.Y;

The X and Y variables collected above are clearly referenced to the top-right corner of the page, not the top-left.

When I use these X and Y variables to create the annotation in a new document, the annotation is now referenced to the top-left corner and is rotated 90 degrees, with the text sideways, rather than left to right like the rest of the document.

I could send a couple of sample files if that'll make it easier.


SL Sowmiya Loganathan Syncfusion Team May 3, 2018 01:04 PM UTC

Hi Code, 

We are able to reproduce the behavior and currently we are validating the same. We will update the further information on May 7, 2018. If possible kindly share the sample files to replicate the issue. It will helpful for us to provide a precise solution. 

Regards, 
Sowmiya L 



SL Sowmiya Loganathan Syncfusion Team May 7, 2018 12:34 PM UTC

Hi Code, 

We confirm that the issue with “The annotation bounds are not preserved properly when adding annotation to PDF document with rotation” is a defect and we have logged a defect report. The fix will be included in our Volume 2 Service pack1 release which will be available in month of June, 2018. 

Regards, 
Sowmiya L 


Loader.
Up arrow icon