How do I open a remote PDF file (using URL)?

How do I open a remote PDF file (using URL)?

The following code throws an exception:

PDFDoc pdfdoc = new PDFDoc("");

You are attempting to open a remote document (i.e. a URL) to PDFDoc
constructor, but PDFDoc cinstrucotr currently (i.e. v.3.6) accepts a
file path (not a URI).

If you would like to open remote PDF Documents you can use
standard .NET Framework API (or some other API is you are developing
in C++) to fetch the file.

You can either download file locally:

WebClient client = new WebClient ();
client.DownloadFile("", my_temp_path +

More commonly, you will want to read remote file in memory (i.e.
without saving the file to disk). In this case, you use the OpenRead
() method, Which returns a stream reference. You can then simply
retrieve the data from the stream.

WebClient Client = new WebClient ();
Stream strm = Client.OpenRead ("");
Read stream data to 'data' buffer...
byte [] data = ...;

// Then open the buffer containing PDF document as
// illustrated in PDFDocMemoryTest:

PDFDoc doc = new PDFDoc(data, data.Length);
doc.InitSecurityHnadler(); ....

'System.Net.WebClient' class (from .NET framework) is a very high-
level and simple to use. There are many other (and more powerful) ways
to accomplish the same thing. This should be documented on MSDN or
other .NET developer sites.