How to display a PDF document in a Microsoft Surface application?

馋奶兔 提交于 2019-12-10 13:02:23

问题


I want to display a PDF document in my Microsoft Surface application. I did some searching and found a lot of possibilities, but all of the seem to have a little drawback if used in Microsoft Surface.

This insteresting approach seems nice, but I have trouble to check how to enable scrolling.

Any idea how to enable scrolling in there?


回答1:


In our application we have the need to display a lot of content that is provided as PDF from our customers. Instead of directly displaying the PDF we create image files (one for each page) and created a control to change pages, scroll, resize and whatever needed to display the data.

There are drawbacks: no PDF forms or buttons, I won't list more. But this features are kind of business logic in a document, and that should be represented with a multi-touch alternative in your application, really.

It's sometimes a requirement to display large volumes of text, but if it is possible you should really minimize it, as the Surface table isn't designed to provide the best reading experience.

Edit: You could try to send window messages to the PDF viewer control when a specific gesture is made. The BING map's control was used that way AFAIK. Nevertheless, I don't think this adds to a good experience.




回答2:


You could try this: http://weblogs.asp.net/israelio/archive/2004/07/20/188664.aspx.

But even if you solve it, this is a really really lousy user experience. Hyperlinks in the PDF won't work, buttons from Adobe won't be clickable, the scrollbars wont actually work, etc. In other words, you're going to end up with a really lousy Surface app. I strongly recommend putting effort into figuring out how to render content as native WPF content that you can make play nicely with WPF & multitouch.




回答3:


One approach might be to use the WPF WebBrowser control in combination with Google Docs Viewer.



来源:https://stackoverflow.com/questions/5021545/how-to-display-a-pdf-document-in-a-microsoft-surface-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!