XpsSignatureDefinition.SpotLocation - 它是如何工作的?

发布于 2024-08-27 17:09:22 字数 945 浏览 10 评论 0原文

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();
....

How does the SpotLocation work? The following code will not display digital signature request(DSR) on the fixed page at the spot location. Should the DSR automatically appear at the spot location on the page, or do I have to define the signature picture, text, and the button and place it on the xps page?

...
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();
....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2024-09-03 17:09:22

Microsoft 的XPS Viewer 不支持将签名请求放置在特定位置(例如,由点ID 指定的位置)。

Microsoft's XPS Viewer does not support placing a signature request in a specific location, (e.g. the location specified by the spot ID).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文