【问题标题】:XpsSignatureDefinition.SpotLocation - How does it work?XpsSignatureDefinition.SpotLocation - 它是如何工作的?
【发布时间】:2011-02-04 22:14:39
【问题描述】:

SpotLocation 是如何工作的?以下代码不会在现场位置的固定页面上显示数字签名请求(DSR)。 DSR应该自动出现在页面的现场位置,还是我必须定义签名图片,文本和按钮并将其放置在xps页面上?

...
XpsSignatureDefinition newSign = new XpsSignatureDefinition();
newSign.Intent = "I am the author of this document.";
newSign.RequestedSigner = "Jonnie ";
newSign.SigningLocale = "Richmond";

newSign.SpotLocation = new SpotLocation();
newSign.SpotLocation.PageUri 
    = PackUriHelper.CreatePartUri(new Uri(@"/Documents/1/Pages/1.fpage",UriKind.Relative));
newSign.SpotLocation.StartX = 30.00;
newSign.SpotLocation.StartY = 30.00;

newSign.SignBy = DateTime.Now + new TimeSpan(10, 0, 0, 0);
Guid g = System.Guid.NewGuid();
newSign.SpotId = g;

XpsDocument document = new XpsDocument(package);
IXpsFixedDocumentSequenceReader docSeqReader = document.FixedDocumentSequenceReader;

docSeqReader.FixedDocuments[0].AddSignatureDefinition(newSign);
docSeqReader.FixedDocuments[0].CommitSignatureDefinition();
....

【问题讨论】:

    标签: xps xpsdocument xpsviewer


    【解决方案1】:

    Microsoft 的 XPS 查看器不支持将签名请求放置在特定位置(例如,由现场 ID 指定的位置)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-26
      • 2011-03-18
      • 2015-06-16
      • 2012-08-31
      • 2012-07-13
      • 2012-05-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多