How to display a PDF document in a Microsoft Surface application?
Asked Answered
L

3

7

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.

enter image description here

Any idea how to enable scrolling in there?

Landers answered 16/2, 2011 at 20:8 Comment(4)
The non-Surface version scrolls just fine. What are the symptoms on Surface? Scrollbar doesn't work? What about other controls like Page Up Arrow and Page Down Arrow (next to "1" in your image)? Do they work?Cemetery
@Rick Sladkey Any button, scrollbar or similar inside the Adobe control is working on Surface.Landers
If the scrollbars work, what do you mean by "enable scrolling"? Never mind, you want to scroll with the finger on the document.Cemetery
@Rick Sladkey sorry there is a not missing in my comment. All these things are NOT working.Landers
E
6

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.

Eberhart answered 21/2, 2011 at 8:58 Comment(4)
Thanks for this hint. Creating images and displaying theme isn't a bad solution, but how do you create the images?Landers
I asked my colleague: he said two options exist. One is using Acrobat Writer. That options saves the margin as white space. As this takes away reading space and may well be better set up using WPF we usually don't use this option. We use photoshop - but that's because as a design agency there are lot's of macs and Adobe licences around here. A similar result can be achieved using Writer and a simple graphics program like Paint.Net.Eberhart
ah ok thanks. But I have to create the images from the pdf in the application programatically.Landers
Thanks to all posters. I will accept this as the answer, because I finally solved the problem by using Ghostscript to generate images from the PDF and then I display this Images with a control that I created by myself.Landers
C
3

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.

Carrot answered 18/2, 2011 at 15:33 Comment(0)
C
0

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

Copyholder answered 27/2, 2011 at 10:43 Comment(1)
The WPF Webbrowser control has the same problem: It's not build for accepting the Surface touch events...Eberhart

© 2022 - 2024 — McMap. All rights reserved.