Sample integration of PDFTron WebViewer with Microsoft SharePoint

418 views
Skip to first unread message

Support

unread,
May 17, 2013, 8:51:24 PM5/17/13
to pdfnet-w...@googlegroups.com
Q:
 
I would like to integrate PDFTron WebViewer in my SharePoint solution in order to expose specific document libraries (containing PDF, Office, and image formats) via web browser.

Do you have any sample code showing how to integrate PDFNet ( the component that creates xod etc) with SharePoint?
 
---------------------
A:
 
You can download a sample WebViewer/PDFNet sample integration with SharePoint using the following links:

~~~
The sample shows how to integrate PDFNet and WebViewer controls in a SharePoint web parts in order to display documents hosted on a SharePoint server. 
 

 

SharePoint Sample Integration (Executable):  
     http://www.pdftron.com/downloads/SilverDox4SharePoint.zip 
 
SharePoint Sample Integration (Source):  
     http://www.pdftron.com/ID-f94ls2-edm0aqZ/S/SilverDox4SharePoint.zip 
     Note: The password to open the source archive is: 1sFdgjil38w9u

~~~

This above sample integrates with SharePoint and can make specific document libraries (containing PDF and MS Office files) viewable in any browser (via WebViewer). 

The project uses MS SharePoint Word Automation services (http://msdn.microsoft.com/en-us/library/ee558278(v=office.14).aspx) to convert DOCX, DOC, and other office formats to PDF which are then converted to web optimized XPS a.k.a. XOD using ‘pdftron.PDF.Convert.ToXod()’.

The sample integration has two main features. First is to be able to convert documents as they are uploaded to a SharePoint document library. The other feature is to display this converted documents using the PDFTron WebViewer. In order to achieve the conversion, an event receiver solution for SharePoint was created. This event receiver handles all events in a SharePoint web site. For this project, the event receiver developed handles three events: uploading of a new file, deleting of an existing file, and updating an existing file. The main goal is to capture these events and then convert the documents to the required format (i.e. WebViewer XPS a.k.a. xod).
 
----
 
Please note that the sample is referencing a bit outdated version of PDFNet SDK and the WebViewer (specifically it refers to WebViewer Silverlight clinet a.k.a. SilverDox), however a switch to the latest version of PDFNet and or latest HTML5 viewer should be relatively painless.


 
WebViewer4SharePoint.pdf

Support

unread,
Aug 6, 2013, 2:32:01 PM8/6/13
to pdfnet-w...@googlegroups.com
Note:
 
The links to the sample WebViewer (formerly known as SilverDox) + SharePoint integration are broken. The correct links are:
 
 

Jesus Sanchez

unread,
Apr 16, 2014, 8:34:43 AM4/16/14
to pdfnet-w...@googlegroups.com
El sábado, 18 de mayo de 2013 02:51:24 UTC+2, Support escribió:
> Q:
>  
> I would like to integrate PDFTron WebViewer in my SharePoint solution in order to expose specific document libraries (containing PDF, Office, and image formats) via web browser.
>
> Do you have any sample code showing how to integrate PDFNet ( the component that creates xod etc) with SharePoint?
>  
> ---------------------
> A:
>  
> You can download a sample WebViewer/PDFNet sample integration with SharePoint using the following links:
>
> ~~~
> The sample shows how to integrate PDFNet and WebViewer controls in a SharePoint web parts in order to display documents hosted on a SharePoint server. 
>  
>
>  
>
> SharePoint Sample Integration (Executable):  
>      http://www.pdftron.com/downloads/SilverDox4SharePoint.zip 
>  
> SharePoint Sample Integration (Source):  
>      http://www.pdftron.com/ID-f94ls2-edm0aqZ/S/SilverDox4SharePoint.zip 
>      Note: The password to open the source archive is: 1sFdgjil38w9u
>
> ~~~
>
>
> This above sample integrates with SharePoint and can make specific document libraries (containing PDF and MS Office files) viewable in any browser (via WebViewer). 
>
> The project uses MS SharePoint Word Automation services (http://msdn.microsoft.com/en-us/library/ee558278(v=office.14).aspx) to convert DOCX, DOC, and other office formats to PDF which are then converted to web optimized XPS a.k.a. XOD using ‘pdftron.PDF.Convert.ToXod()’.
>
> The sample integration has two main features. First is to be able to convert documents as they are uploaded to a SharePoint document library. The other feature is to display this converted documents using the PDFTron WebViewer. In order to achieve the conversion, an event receiver solution for SharePoint was created. This event receiver handles all events in a SharePoint web site. For this project, the event receiver developed handles three events: uploading of a new file, deleting of an existing file, and updating an existing file. The main goal is to capture these events and then convert the documents to the required format (i.e. WebViewer XPS a.k.a. xod).
>  
> ----
>  
> Please note that the sample is referencing a bit outdated version of PDFNet SDK and the WebViewer (specifically it refers to WebViewer Silverlight clinet a.k.a. SilverDox), however a switch to the latest version of PDFNet and or latest HTML5 viewer should be relatively painless.
>
>
>
>  

is there another possibility to integrate SharePoint with Web Viewer without Silverlight ??

Thanks

Support

unread,
Apr 16, 2014, 5:24:44 PM4/16/14
to pdfnet-w...@googlegroups.com

Yes, you should also be able to use HTML5, or Flash, or Universal WebViewer...

The primary purpose of SharePoint sample integration is to show how to automate conversion of SharePoint document library to XOD. You can view web friendly XOD files via any WebViewer viewer (the sample is using an older version of Silverlight viewer, but you could replace it with a newer version).

To 'list' all files from the document library on the client side you would need to call relevant SharePoint REST APIs. I guess this is the main change required to port the same to HTML5 or Flash viewer. Document viewing and conversion should be pretty much the same.
Reply all
Reply to author
Forward
0 new messages