I used the link given below for getting metadata in itext 5 using: Get and set metadata for itext pdf document
Currently, i can get metadata in itext7 too using the snippet:
PdfDocument pdfDoc = new PdfDocument(new PdfReader(src));
PdfDocumentInfo info = pdfDoc.getDocumentInfo();
info.getAuthor();
info.getCreator();
info.getProducer();
I don't know how to get custom properties using the same. I can set custom metadata using:
pdfDoc.getDocumentInfo().setMoreInfo("Test", "test");
How to get this value programatically without hard coding the key name? Also, is there a way to get these metadata values (including custom metadata) without actually writing:
getAuthor, getCreator, etc?