I would like to get the date of creation of a PDF using iText7.
I am running into various problems doing so, so I would like to ask for a working solution.
So far, I have not found one.
Thank you.
CodePudding user response:
@mkl wrote the answer to my question. Thank you very much!
Dim pdfDoc As iText.Kernel.Pdf.PdfDocument
pdfDoc = New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(uPath))
Dim documentinfo As iText.Kernel.Pdf.PdfDocumentInfo = pdfDoc.GetDocumentInfo
Dim author As String = documentinfo.GetAuthor
Dim creator As String = documentinfo.GetCreator
Dim creationDate = documentinfo.GetMoreInfo("CreationDate")
Dim modificationDate = documentinfo.GetMoreInfo("ModDate")