使用给定的保护功能,我不可能以显示azure门户中定义的可视标记的方式保护文档(pdf,docx)。
通过使用Microsoft Information Protection (MIP) SDK,我能够读取标签并根据需要保护文档。如果我在azure门户中设置了‘页脚’、‘页眉’或‘水印’的视觉标记,并保存并发布它,则通过应用带有保护的标签生成的文档不会在受保护的文档中显示页眉、页脚或水印信息。即使我打印出来,也不会显示页眉、页脚或水印。为了在文档中显示在azure门户中定义的可视标记,这里需要如何进行保护?有没有办法从标签信息中读出“视觉标记”信息?
使用Microsoft.InformationProtection.File获取标签
labels = engine.SensitivityLabels;
通过以下方式保护文档
handler = CreateFileHandler(options,options.InputFileStream);
// Use the SetLabel method on the handler, providing label ID and LabelingOptions
// The handler already references a file, so those details aren't needed.
handler.SetLabel(options.LabelId, labelingOptions);
// The change isn't committed to the file referenced by the handler until CommitAsync() is called.
// Pass the desired output file name in to the CommitAsync() function.
var result = Task.Run(async () => await handler.CommitAsync(options.OutputFileStream)).Result;
// var result = await handler.CommitAsync(options.OutputFileStream);
options.FileName = handler.OutputFileName;保护起作用,但在受保护的文档中不会显示任何可视标记。
我希望受保护的文档具有在azure门户中为标签定义的页眉、页脚和水印信息。
发布于 2019-09-04 02:22:49
我是微软MIP SDK团队的成员。
虽然我们确实支持写入文件保护和MIP标签元数据,但我们目前还不支持在SDK中写入内容标记。
使用SDK将标签应用于Office文档时,下次在Office中打开并保存该文档时,将应用内容标记。对于PDF,这也是可能的,但这取决于消费应用程序是否支持MIP。
我们将来可能会看到这一点,但目前我们不打算添加超过上面列出的内容(使用AIP客户端在保存时应用)。
如果你想就此提交反馈,请访问UserVoice并提交一个想法!
发布于 2019-08-23 14:24:27
这些变化需要一些时间才能反映出来。此外,如果您使用的是O365,请确保在O365安全和法规遵从性中心Link中设置更改
https://stackoverflow.com/questions/57589567
复制相似问题