How can I use PDF viewer as part of a web application?

Q:
Has your PDF viewing component ever been used as part of a web
application (i.e. to be deployed through a browser), or can it only be
used as part of a thick client?
----
A:

PDF viewer from PDFNet SDK (http:/www.pdftron.com/net) can be used in
various deployment scenarios. For example:

- As stand-alone PDF Viewer application (.NET, Win32 or MFC, Linux,
etc). This type of application is similar to PDFView sample project
(http://www.pdftron.com/net/samplecode.html#PDFView).

- As .NET or ActiveX control embedded in the web browser. In this case
you would use PDFView class to implement a custom user control that
would be loaded within IE. To implement .NET control you would be
using 'PDFNet for .NET'; to implement custom ActiveX control you would
be using 'PDFNet for C++'. The following are some links related
hosting of .NET controls in IE (hosting of ActiveX controls is well
documented in MSDN):

http://windowsclient.net/articles/iesourcing.aspx
http://www.15seconds.com/issue/030610.htm

http://blogs.msdn.com/andrewdownum/archive/2006/01/10/ControlInBrowserIntroduction.aspx

In this scenario the control can be also deployed via "one click
deployment".

- As a web-based AJAX application. In this case the web application
would serve rendered images (PNG or JPEG) of PDF documents and the
application would consist from JavaScript and server based logic (e.g.
similar to googlemaps).

In this case you could use PDFDraw class to rasterize PDF page that
can be served as JPEG or PNG in the browser. As a starting point you
may want to take a look at PDFDraw sample project (www.pdftron.com/net/
samplecode.html#PDFDraw). Converting a PDF page to JEPG is as simple
as the following code:

PDFNet.Initialize();
PDFNet.SetResourcesPath(...);
PDFDraw draw = new PDFDraw(92);
PDFDoc doc = new PDFDoc("my.pdf");
doc.InitSecurityHandler();
draw.Export(doc.PageBegin().Current(),"my.png");
doc.Close()
draw.Dispose();

Other PDF information (such as Bookmarks, annotations, etc) can be
similarly extracted using corresponding PDFNet classes for
presentation in AJAX controls.