PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 12:27 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jan 08, 2024 4:14 am 
Offline

Joined: Mon Jan 08, 2024 4:04 am
Posts: 2
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 16, 2024 9:14 pm 
Offline

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 36
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
                        }
                    }


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 17, 2024 4:02 am 
Offline

Joined: Mon Jan 08, 2024 4:04 am
Posts: 2
That does the trick. Thanks :)


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 15, 2024 7:37 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
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?

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 405 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group