PDF SharePoint Cumulative Update 1 just introduced packaging PDF form templates as sandbox WSP solution. We can say with confidence that this was the most requested feature from PDF SharePoint customers in enterprise environments.

Let’s start with a little preamble: PDF SharePoint is a SharePoint 2010 solution that allows you to work with PDF forms in SharePoint 2010. It allows you to create new PDF template and then deploy it as a Content Type.

Originally PDF SharePoint consisted of major 3 components:

  • PDF SharePoint Service Application: Provides core methods for integration between design and runtime of PDF SharePoint and SharePoint 2010.
  • PDF SharePoint Core: Forwards requests from Adobe Reader (or Adobe Acrobat) to PDF SharePoint Services. Also provides framework for synchronization of PDF data fields with SharePoint columns.
  • PDF SharePoint Designer: A SharePoint Site Feature, which provides HTML5 designer where users can design and manipulate PDF template (.xdp) files.

As we understand a PDF document live cycle starts from PDF SharePoint Designer. When PDF template is completed, designer could deploy PDF template as SharePoint Content Type. Then this content type is attached to SharePoint Document Library. From this moment on, users can create new instance of PDF documents, modify fields in PDF documents, etc. Here is a simple diagram:

PDF Form Livecycle
Figure 1: PDF Form Livecycle

This article will dive deep specifically in “Deploy PDF Template” action. If you want to skip WSP overview, you can continue reading with section “What is PDF SharePoint WSP Deployment Option?

Original Deployment as Content Type

PDF SharePoint always had functionality to deploy PDF template as Content Type. For this process to work, you would need PDF SharePoint Designer feature enabled on the site you are working. Then designer would open PDF template in PDF SharePoint Designer and click “Generate Content Type” button. While this process is a very straightforward it caused few questions from our clients. Here are a couple of questions as example:

1. How can we deploy PDF template on production server? We don’t want PDF SharePoint Designer to be enabled on the production server; or

2. Our company don’t allow SharePoint end-users (even designers) to create Content Types. This is a centralized process and should be controlled. What options of deployment do we have?

To address needs of our clients, PDF SharePoint product team added “WSP Deployment” option.

What is WSP Deployment Option?

Before we begin a step by step tutorial how to use WSP Deployment functionality of PDF SharePoint, let’s address the following questions:

  • What is a WSP package?
  • What are benefits of WSP packages comparing to other means of deployment?
  • How does SharePoint 2010 handle custom WSP packages?
  • What is PDF SharePoint WSP Deployment Option?

What is a SharePoint WSP package?

Here is what Microsoft MSDN says about WSP packages:

Microsoft SharePoint Foundation has its own system for installing solutions on a SharePoint Foundation farm that is different from other Windows applications and platforms. There is no MSI file or ClickOnce technology involved.

The system provides a way to bundle all the components of a SharePoint Foundation extension into a single new file, which is called a solution package. A solution package has a .cab-based format but a .wsp file extension.
Ref: http://msdn.microsoft.com/en-us/library/aa543214.aspx

So, it is a unified solution that is applicable for Microsoft SharePoint framework. WSP file contains definition of solution elements, instructions how to deploy these element in SharePoint environment, security descriptions, and other artifacts.

Even PDF SharePoint product comes in 2 WSP packages: PDFSharePoint.Services.wsp and PDFSharePoint.Designer.wsp.

It is important to emphasize that not all solutions are the same. There are two types of solutions: “farm solution” and “sandbox solution”. Farm solutions require a Farm Administrator to deploy them, while “sandboxed solutions” are considered user’s solutions and therefore a site collection administrator can deploy a sandboxed solution. MSDN has more information about differences between Farm and Sandboxed solutions: http://msdn.microsoft.com/en-us/library/ee536577.aspx

It is important to understand differences between Farm and Sandbox solution if you plan to deploy PDF templates as WSP packages.

What are benefits of WSP packages comparing to other means of deployment?

The WSP solution framework provides the following advantages:

  • A unified approach for deploying solutions. This makes it easier for administrators to control what is deployed and how.
  • Integrated deployment. Solutions enable administrators to easily install files on the front-end Web servers in a server farm.  Deployment of new solutions and upgrade of existing solutions across the server farm in one action instead of having to separately install to each server on the farm.
  • Monitoring. In case of sandboxed solutions, WSP content must conform to certain hard limits on the system resources that it can use. All of the sandboxed solutions in a specific site collection, taken collectively, also must conform to certain resource restrictions.

Another interesting fact is that SharePoint 2010 changed the way it saves sites as template. If you worked with SharePoint 2007 you definitely remember a “weird” STP file extension. There are no longer .STP files for site templates in SharePoint 2010.  Instead, site templates are packaged in .WSP files just like web parts and features. No longer is there a “Site Template Gallery”, instead there is a “Solutions Gallery” in SharePoint 2010.  It is very likely that more and more export/import features will be transitioned to WSP packages.

How does SharePoint 2010 handle custom WSP packages?

As we mentioned earlier, there are two major types of WSP solutions: farm solution and sandboxed solutions. Since PDF SharePoint creates a sandboxed WSP packages during the deployment, we shall review how SharePoint handles sandboxed solution deployment.

Site collection administrators have the authority to upload, activate, delete, and manage sandboxed solutions using the Solution Gallery, which is a repository of sandboxed solutions. You open the Solution Gallery, shown in Figure 2, by first clicking Site Settings on the Site Actions menu. Then, on the Site Settings page, click Solutions under the Galleries section.

SharePoint 2010 Solution Gallery
Figure 2: SharePoint 2010 Solution Gallery

Deploying a sandboxed solution to the site collection is as simple as uploading the .wsp file to the gallery and activating it. Clicking the Upload Solution button gives you the option to upload a single .wsp file or multiple files. When the upload document form opens, browse for the location of the .wsp file or files you want to deploy.

Next, you are prompted to activate the solution. When you activate a solution, site-collection-scoped features are automatically activated as well.

If you want to copy a solution from one site collection to another, save the .wsp file to disk and upload it to another Solution Gallery.

What is PDF SharePoint WSP Deployment Option?

PDF SharePoint Designer now allows you to create a sandboxed WSP package, which will contain PDF template and all necessary deployment instructions. This WSP package can be saved as .wsp file, moved to another environment and deployed there. The easiest example would be the following scenario:

Designer creates PDF template in his development environment, verifies that everything works, then create WSP package using PDF SharePoint WSP Deployment Option and gives this package to QA team.

QA team uploads WSP package to the environment where PDF SharePoint is installed (with or without PDF SharePoint Designer). They activate PDF template WSP package and test that functionality passes all necessary tests. Later the same WSP package can go to production environment.

As we just shown, users of PDF SharePoint product can follow Microsoft SharePoint Best Practices for solution deployment in a format of WSP packages.

Now we would return back to our figure of PDF Form Live Cycle and show how different deployment options fit into the picture.

PDF Form Livecycle with WSP Deployment Option
Figure 3: PDF Form Livecycle with WSP Deployment Option

PDF SharePoint allows reusing SharePoint 2010 Solution Gallery features: to activate WSP sandboxed solutions, download and move .WSP files to another environment, and to monitor resource usage.

NOTE: It is important to emphasize that while PDF SharePoint Designer is not required for activation of PDF templates as WSP solution files, PDF SharePoint Core and PDF SharePoint Services are required to be activated in the SharePoint Site Collection.

Step by Step tutorial how to use PDF SharePoint WSP Deployment option

We start by creating a simple PDF template.

  • Open site when PDF SharePoint Designer is deployed and activated
  • Navigate to “PDF Forms Templates” Document  Library.
  • Use SharePoint Ribbon tab “Documents” and click button “New PDF Template”

  • Enter template name in popped up dialog window. Click Next

  • Once form is opened in PDF SharePoint Designer, let’s drag and drop Text Field to the canvas. Give field a meaningful name, leave all other settings by default, and click Ok.
    Note: Default settings will also create new PDF data field and “auto-create” SharePoint column.

  • Now, drag and drop button on the form canvas. We will use default “Save” button.
  • You form should look something like this:

  • It is time to save the form. Use Ribbon tab “Home” and button “Save”.

The simple PDF form template is created and saved, so we shall continue with the deployment.

  • Start Deployment wizard. Use Ribbon tab “Home” and click button “Deploy”

  • Select option “Create Solution Package” and click Next button.

  • Assuming there are no issues with the template, next screen shows that validation passed without errors. Click Next

  • Once package is created, the dialog window will show you a path to WSP package in Solution Gallery of current site;

Let’s leave PDF SharePoint Designer and navigate to SharePoint 2010 Solution Gallery.

  • Click Site Settings on the Site Actions menu. Then, on the Site Settings page, click Solutions under the Galleries section.
  • Here you should see “PDF Forms Template – {your form name}.wsp” package.

Now you have an option to activate the solution right here or copy WSP package. If you want to copy WSP package, then you should just click on WSP document and browser will offer you to save the file.

You can use saved .WSP package to upload it on another site collection or even on another SharePoint and activate it there. Of course, we still have to have PDF SharePoint Core and PDF SharePoint Services installed for forms to work currently.

Let’s activate our solution. You can select solution document and click button “Activate” on the ribbon. New dialog window will appear where you have to confirm your decision to activate this WSP package.

Click “Activate” button to confirm your decision.

Once page is refreshed, Solution Gallery will show that the solution is activated.

We can easily verify that activation was successful by checking if Content Type was created.

  • Click Site Settings on the Site Actions menu. Then, on the Site Settings page, click Site Content Types under the Galleries section.
  • Review Content Type Group “PDF Forms Content Types” and verify that your content type is created.

Now you can follow standard SharePoint 2010 procedures and add this content type to your document library (if you need help, you can follow this article from MSDN: http://office.microsoft.com/en-us/sharepoint-server-help/turn-on-support-for-multiple-content-types-in-a-list-or-library-HA010378236.aspx).

We hope you will like PDF SharePoint WSP Deployment feature. If you have any feedback or comments, you would like to hear from you.

Below we included a little Troubleshooting section based on feedback from our QA department 😉

Thank you!

PDF SharePoint Team

Troubleshooting Hints:

  1. When activating the solution, “Activate” button is disabled. This happens usually if user solutions are not enabled or “Microsoft SharePoint Foundation Sandboxed Code Service” service is not running. You can check both cases in your Central Administration pages.
  2. During the last step of deployment, PDF SharePoint Designer shows an error message “Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa“. If this error may happen first time you use WSP Deployment option after upgrading PDF SharePoint. Solution: do iisreset one more time. Alternatively you can follow Kasper de Jonge’s article: http://www.powerpivotblog.nl/sharepoint-2010-beta-error-retrieving-the-com-class-factory-for-component-with-clsid-bdeadf26-c265-11d0-bced-00a0c90ab50f-failed-due-to-the-following-error-800703fa

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.