Intersoft ClientUI中的XPS Document Viewer示例 [英] The XPS Document Viewer Sample In Intersoft ClientUI

查看:71
本文介绍了Intersoft ClientUI中的XPS Document Viewer示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经在 http://www.intersoftpt.com [ http://live.clientui.com/#/DocumentViewers/XPSDocumentViewer/MultiplePageXPS [ ^ ]

Hi
I have seen a XPS Document Viewer sample in the http://www.intersoftpt.com[^],it''s perfect.

How can I get the source code of this sample?
Thanks.

The sample address: http://live.clientui.com/#/DocumentViewers/XPSDocumentViewer/MultiplePageXPS[^]

推荐答案

该代码示例仅是几行代码.您可以在MSDN帮助页面的社区内容"部分中的类System.Windows.Xps.Packaging.XpsDocument的末尾找到它:
http://msdn.microsoft.com/en-us/library/system.windows.xps.packaging.xpsdocument.aspx [ ^ ].

别忘了:您需要添加对与.NET Framework v.3.5和更高版本捆绑在一起的程序集"ReachFramework.DLL"的引用,因此请从添加引用"窗口的".NET"选项卡中添加它. .

这个想法是:
This code sample is just few lines of code. You can find it here, at the very end of the MSDN help page on the class System.Windows.Xps.Packaging.XpsDocument in the section "Community Content":
http://msdn.microsoft.com/en-us/library/system.windows.xps.packaging.xpsdocument.aspx[^].

Don''t forget: you need to add the reference to the assembly "ReachFramework.DLL" which is bundled with .NET Framework v.3.5 and later, so add it from the ".NET" tab of the window "Add Reference".

The idea is:
//assuming this is the file name of some XPS document:
string fileName; //assign appropriate path name to it, from file dialog, for example

System.Windows.Controls.DocumentViewer viewer; //should be initialized and inserted in UI

//...

System.Windows.Xps.Packaging.XpsDocument doc =
    new System.Windows.Xps.Packaging.XpsDocument(fileName, System.IO.FileAccess.Read);
viewer.Document = doc.GetFixedDocumentSequence(); //viewing it!


它可以正常工作,经过测试.

—SA


It works, tested.

—SA


这篇关于Intersoft ClientUI中的XPS Document Viewer示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆