Read XMP from existing PDF with iTextSharp

筅森魡賤 提交于 2019-12-11 02:16:09

问题


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


回答1:


I'm dangerously ignorant of itextSharp but this did the job for me:

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



回答2:


I'd encourage you to check out the iTextSharp.text.xml.xmp namespace.

I've never done what you're trying to do but the XmpReader class looks promising.



来源:https://stackoverflow.com/questions/1522101/read-xmp-from-existing-pdf-with-itextsharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!