PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

PdfSharp Annotations - read annotation creation timestamp
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4531
Page 1 of 1

Author:  Freeda [ Mon Jan 08, 2024 4:14 am ]
Post subject:  PdfSharp Annotations - read annotation creation timestamp

Is it possible to read the timestamp of when an annotation was created using PdfSharp?

I can see this information when I open up a pdf file using Acrobat, but can't figure out how to extract this using PdfSharp.

Thanks

Author:  (void) [ Tue Jan 16, 2024 9:14 pm ]
Post subject:  Re: PdfSharp Annotations - read annotation creation timestam

Example with the current version (6.1.0):
Code:
                    var annot = document.Pages[0].Annotations[0];
                    if (annot.Elements.ContainsKey("/CreationDate"))
                    {
                        if (annot.Elements["/CreationDate"] is PdfString dateString)
                        {
                            var dt = new PdfDate(dateString.Value);
                            // dt.Value is a DateTime object
                        }
                    }

Author:  Freeda [ Wed Jan 17, 2024 4:02 am ]
Post subject:  Re: PdfSharp Annotations - read annotation creation timestam

That does the trick. Thanks :)

Author:  TH-Soft [ Thu Feb 15, 2024 7:37 am ]
Post subject:  Re: Compatibility issue between versions 1.5 and 6.0.

GeorgeFlolO wrote:
Is it possible to create a time-traveling PDF document that seamlessly transitions between PDFsharp versions 1.5 and 6.0, allowing users to experience the different features and functionalities of both versions simultaneously?
Is it possible that you are a forum spammer?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/