Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

How can I view the image which have several file in a folder? I have convert my XPS to bitmap. And how to load the file to picturebox/any better tools? I not found the exact way to view the XPS file into winforms thought I convert each page to an image. Now I'm stuck on how to load all the images in the winforms. 1 image is not a problem, but problem is multi images.

Any link for this? Or suggestion for viewing XPS file?
Posted

1 solution

Several paths you take here; these two options would remove the task of converting your XPS file into Images:

1. Use the WPF DocumentViewer to display the XPS file in a WinForm. There's a CodeProject article will show you how to that: [^].

2. Put a WebBrowser Control in your WinForm and have it display the XPS file.

If you use your converted Images, then you need to say more about how you want to present the Images in your WinForm:

1. one at-a-time ? ... or, all ? or, multiple ? in an animated sequence ?

2. each Image on a separate TabPage in a TabControl ?

I'm going to assume that if you can convert an XPS file to a series of Images, then you know how to get all the files of a given type (or name) from a Directory and load them on demand, but if that is a problem for you, then just say so.
 
Share this answer
 
Comments
Luiey Ichigo 4-Feb-15 0:49am    
Yeah..it's work! I'm converting the image to bitmap and when saving, I stream each images as byte and save to mysql. And to display it back, I get all images byte and stream it to file to location and read it from there(method to display is same as converting to images and display it)..thanks
BillWoodruff 4-Feb-15 2:25am    
That's good that you have found a way to achieve what you want !
Wendelius 5-Feb-15 0:31am    
Nice answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900