Reading XMP from existing PDF with iTextSharp

How can I read XMP from an existing PDF file using iTextSharp?

+2


source to share


2 answers


I am dangerously unaware of itextSharp, but this helped me:



    PdfReader pdf = new PdfReader(fileName);
    string metadataXml = System.Text.Encoding.Default.GetString(pdf.Metadata);

      

+4


source


I would suggest you check the namespace iTextSharp.text.xml.xmp

.



I've never done what you're trying to do, but the class XmpReader

looks promising.

+1


source







All Articles