Generate Pdf from URL

A few days ago I needed to write a class to generate pdf file from a given url and then save it to server. It was easy for me cause http://www.pdfmyurl.com does all the dirty stuff 🙂

System.IO.Stream stream = System.Net.WebRequest.Create(string.Format(“http://pdfmyurl.com?url={0}”, “www.google.com”)).GetResponse().GetResponseStream();

Then you need to write this steam to server.

Advertisements
Posted in C#.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s