How to create xps file from web page using c#?
Any ideas?
How to create xps file from web page using c#? Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, buy a product that does this.
There is no simple conversion. XPS documents are based on WPF controls, not web controls. That means you have to somehow convert the web document into either 1) an image or 2) a valid WPF Visual.
No. 2 is going to be the harder route. Braver souls would use a transform to convert the webpage to xaml, but of course that wouldn’t work for any page that uses javascript to render content or one of probably a hundred other limitations. So, unless the webpage is very simple valid xhtml, 2 is right out.
The first option is the easiest, if you don’t think about the fact that the web is filthy with people asking how to convert a webpage to an image. But, if you can get past that hurdle, its relatively simple.
The algorithm would be: