本文介绍了在Adobe中显示xmp元数据值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我没有Acrobat阅读器,但需要查看元数据值的位置,似乎根据所有问题等答案,将会有一个元数据选项卡,其中一个可以看到标签和占位符值。 br />


我的问题是,如果不是这样的话,是否有人知道我可以从哪里获取这些值并查看它们的位置以便在C#中我可以使用itext #setField方法填充正确的字段。



我试图谷歌它甚至试图向adobe reader注入一个javascript以显示这些值但没有运气到目前为止...



如果有人有办法解决这个问题,我们将非常感激



谢谢

If I do not have Acrobat reader but need to see where the meta data values is it seems that according to all the questions etc answers there would be a meta data tab where in one can see the tags and there placeholder values.

The question I have is if that is not the case, does anybody have any idea where I can get these values from and see where they are so that in C# I can populate the correct fields with the itext# setField method.

I have tried to google it and even tried to inject a javascript into adobe reader to show these values but no luck so far...

If anyone has a way to work around this it would be deeply appreciated

Thanks

推荐答案

// pdfTemplate is the string value of the pdf template
PdfReader pdfReader = new PdfReader(pdfTemplate);
// newFile is where the newly created pdf would be
PdfStamper pdfStamper = new PdfStamper(pdfReader, new FileStream(newFile, FileMode.Create));;
AcroFields pdfFormFields = pdfStamper.AcroFields;

// See all values
foreach (KeyValuePair<string, AcroFields.Item> item in pdfFormFields.Fields)
{
   pdfFormFields.SetField(item.Key, item.Key);
}


这篇关于在Adobe中显示xmp元数据值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 16:35