Another way to display an XPS document using WPF - wpf

I would like to ask if there are any other alternatives, aside from DocumentViewer, for displaying an XPS document in a WPF application? A ready-to-use control or class in .NET if possible.
This is because DocumentViewer is a little slow when you are scrolling through the pages.
Thanks!

No, unless there are any third-party controls that I'm unaware of.

Use NiXPS to convert your XPS document to PDF and use any PDF viewer for WPF out there. This way you will get better performance than you do with DocumentViewer.

Related

Images gallery in WPF with filters

Looking to present a batch of images (about 10,000) with multiple characteristics to filters. I wish some of the closest thing PivotViewer Silverlight.
I find no free or paid component that this kind of thing in WPF.
Unable to transform the Silverlight component WPF and I do not think to insert silverlight in a WPF application is a good thing.
Would you have a solution?
Thank you
You can try some of these:
http://jmcspot.com/JMC_Photo_Gallery/Default
https://wpfimagegallery.codeplex.com/
If you use a VirtualizingStackPanel as the container, you can theoretically display immense amounts of data without running out of memory.

Silverlight PDF Viewer

I want to be able to show PDF docs within my Silverlight 4 application. I know there is no native support for this and the only real way to do this is to use a third party control. I’ve looked around and found what looks to be a couple of good options, but they are expensive and somewhat limited. I don’t know much about PDF docs, but it seems that most of these controls are converting PDFs to something else; such as XOD or XPS.
I am considering writing my own PDF Viewer for my needs, but not sure where to start on something like this. What would be the best format to convert PDFs to for Silverlight and WPF? If I could convert to RTF, I could use existing controls to display the document.
I’m assuming since there is such a lack of PDF for Silverlight controls out there that this will not be easy. Any help or guidance is greatly appreciated.
Thanks,
-Scott
You do have one more option besides re-implementing a pdf control.
With a bit of javascript and silverlight's DOM bridge, you can render your PDF in the browser's native pdf plugin and display it in a 'window' over the top of your silverlight application.
This is how many of the 3rd party "web browser" controls for silverlight work as well.

What controls should I use on a Silverlight website for loading textual content?

I am embarking on development of a Silverlight based website. I am the lone developer and am doing it on my own (ie, not for any company).
Now I want to load a lot of textual content on the website along with animations and rich user interfaces that can be created using Silverlight. The text content may change from time to time and when that happens, I don't want to do a lot of rework. So I m thinking to load the text from a Word/text file into controls and whenever new content arrives/existing content is modified, I just have to append it to the Word/text file.
This way the application itself remains untouched, only the file contents keep changing. Silverlight doesn't support FlowDocument. RichTextBox doesnt have a Load or LoadFile property. So how do I go about this? Should I make use of Frame, Downloader and similar other controls as well? What do you suggest? What would be the best approach to this?
The RichTextBox does have a Xaml property so you could download Xaml files containing the restricted set of textual elements that RichTextBox supports. You could also create a Silverlight editor around which you could create and upload this Xaml text content.
However have you considered whether Silverlight is the right platform to deliver primarily textual content? HTML is pretty good at that and with frameworks such as JQuery you can create quite interactive experiences that work well across browsers.

wpf documentviewer to view different file formats?

I have a wpf application where the user can upload files with different formats (for now only pdf). I want to use document viewer to let the user see what's been uploaded. Is this possible? If this is not possible, can you suggest an alternative? If this is possible, is this a good solution for this?
Thanks,
Angela
I am currently looking for the same thing : a way to display a pdf document in WPF. DocumentViewer seems targeted on displaying XPS documents. It may display other kinds of documents, but it looks like we should supply our own Document class for that purpose.
So I am going to try displaying my documents using an old workaround : displaying them in an embedded web browser. It is not a good solution in my opinion. Especially for we can not access much document properties using that method (document pages count, pages size, ...). But I do not find any other readily available solution.

Displaying PDFs in Silverlight

I want to make a PDF document reader, and the only thing I've found to help me is "Amyuni PDF Suite" that will turn the PDF into XAML and stream that. Are there any other controls for displaying PDFs in Silverlight? Or could I add an IFrame into Silverlight and let the client render it?
Cheers
Nik
Or could I add an IFrame into Silverlight and let the client render it?
Silverlight doesn't really have that capability. You can make your Silverlight control transparent, and have an HTML div block that sits above your Silverlight control, which you could then load a PDF in, but as for displaying a PDF within Silverlight, I think you're out of luck.
Edit:
This question has some info on how to accomplish transparent Silverlight controls, I hope it helps!
If you're ok with buying the pdf converter you can do something like this:
CanvasObject.Children.Add(XamlReader.Load("xaml string from pdf converter"));
And the pdf should be rendered inside your CanvasObject.
I really think you'll get the best result with some type of conversion to XAML. I imagine it can't be that hard to write the converter yourself, I might be wrong though.
Looks like First Floor Software has a solution but it's still in preview.
http://firstfloorsoftware.com/blog/pdf-for-silverlight-preview/
What we are actually trying to do is convert the PDF to SVG, then use something like: http://www.codeplex.com/XamlTune to then go to Xaml
you can use server side conversion of PDF say into set of bitmaps or as mentioned above SVG and return by WCF service to Silverlight client.

Resources