Stamp Annotations created with Aspose break if rotated in Adobe Reader

If I create a stamp annotation with Aspose then open the document and try to rotate the stamp in Adobe Reader, the layout of the annotation is broken and replaced by a black cross. (See the attached PNG)

What I have found is if I export this annotation in xfdf and try to import it in Adobe Reader with the “Import Data File…” feature I have the exact same behavior. (attached “broken.xfdf” in xfdf zip )

However, I can fix this xfdf file simply by adding the “icon” property in the stamp tag. I can put anything as an icon name as long as it is preceded by the # character. I have put icon="#JohnDoe" in the fixed.xfdf file and it work.

Unfortunately, If I use Aspose to read the fixed xfdf file and add stamps to my doc, I am back to the same bad behavior in Adobe Reader when I try to rotate. So it is just a useless workaround for me.

I hope this information can help you to fix this annoying issue.

Regards

(Sorry for double post, log in troubles…)

StampAnnotation_rotation.png (26.6 KB)
xfdf.zip (115.3 KB)

@louis.a

We will surely look into details of this issues. However, can you please also share a sample code snippet that you are actually using to add a stamp annotation in the first place? We will perform investigation accordingly and share the ticket ID with you.

Hello,
Here is a VS 2022 sample projects to help replicate this issue.
AsposeRotateSample.zip (10.8 KB)

And here is the code :

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        using var doc = new Document();
        using var asposePage = doc.Pages.Add();

        var asposeRect = new Rectangle(20, asposePage.Rect.Height-60, 120, asposePage.Rect.Height-40);

        var stampAnnotation = new StampAnnotation(asposePage, asposeRect);
        stampAnnotation.Name = Guid.NewGuid().ToString();
        stampAnnotation.Popup = new PopupAnnotation(asposePage, asposeRect);

        asposePage.Annotations.Add(stampAnnotation);
        var image = new FileStream(@"reject.png", FileMode.Open);

        stampAnnotation.Image = image;

        doc.Save(@"cannotrotate.pdf"); // Will not be able to rotate if opened in Adobe Reader

        doc.ExportAnnotationsToXfdf(@"importinadobe.xfdf"); // Same problem if imported in adobe from this file

        // But if you add the "icon" parameter in the xfdf file with any name preceded by # like bellow it works fine
        // <stamp page="0" flags="print" name="dfbcb8ab-7480-4c86-833e-8709b9397bc8" rect="20,782,120,802" icon="#dudule">

    }

@louis.a

An investigation ticket as PDFNET-52632 has been logged in our issue tracking system for this case. We will surely look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.