Convert To PDF Error

  • 22 April 2016
  • 9 replies
  • 12 views

Badge +1

Hi

We are building a workflow that will take a word document and convert it into PDF Format.  The Nintex Action used is called "Convert Document" - the workflow runs fine but when it gets to the convert document step it throws an error: "Error converting document. There is no word services application proxy for this site collection". 

The Word Automation Service Application is working (service application was created and the service started and is online).

We are using Nintex Workflow Enterprise edition - current version is 3.0.8.0

Any clue on what else is missing to make it work properly?

Thanks

Avishay


9 replies

Userlevel 7
Badge +17

The first thing I always check is permissions. Can the user that initiated the workflow also use the Word automation services?

Badge +1

Thanks Andrew

What do you mean by "use the word automation services"?

It is a service application in the farm. Should we allow a named user who manages workflow to access services in Central Admin? there is probably a more general way to do that...

Please clarify.

Thanks!

Avishay

Badge +7

Hi Avishay,

Can you confirm that the document is .docx and not .doc? And have you checked to see that the Office Web Apps features for the site has been enabled under the site collection features?

Userlevel 7
Badge +17

Source files types for WAS:

  • Open XML File Format documents (.docx, .docm, .dotx, .dotm).
  • Word 97-2003 documents (.doc, .dot).
  • Rich Text Format files (.rtf).
  • Single File Web Pages (.mht, .mhtml).
  • Word 2003 XML Documents (.xml).
  • Word XML Document (.xml)
Userlevel 7
Badge +17

There are various ways you can prevent access to any service application, like the features Francois mentions or not having the proxy service setup under the word automation service application in Central Admin. A good way to test the service is using PowerShell if you had never seen WordAS work before. Here is example code.

# Input parameters for the script
$wordFile="
http://site/library/docxfileurl.docx"
$pdfFile="
http://site/library/pdffileurl.pdf"
# Get the Word Automation Service Proxy
$wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }
#Create the Conversion job
$conversionJob = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJob($wasp)
# Get the web url
$web = Get-SPWeb "
http://webappurl/"
# Set the credentials to use when running the conversion job.
$conversionJob.UserToken = $web.CurrentUser.UserToken
# Conversion Job Name
$conversionJob.Name = "ConvertDOCXtoPDF"
$conversionJob.Settings.OutputFormat = [Microsoft.Office.Word.Server.Conversions.SaveFormat]::PDF
$conversionJob.AddFile($wordFile,$pdfFile)
# Start the conversion job
$conversionJob.Start()

Badge +1

Thank you Andrew

Running the PowerShell script on a specific DOCX file works. I got a PDF version of the same file on the document library with no issues.

This means that the issue is either related to permissions or to Nintex settings. The person who has built the workflow has full permissions on the site. If you (or others) know about specific settings we need to change in order to make it work from a Nintex Workflow, I will be glad to hear.

Thanks

Avishay

Userlevel 7
Badge +17

Did you perform the powershell on the same site and same document? The only time I've seen this error come up was when the Word automation service was not configured to run on the specified Web Application in Central Admin.

  1. On the Central Administration Home page, click Application Management.
  2. On the Application Management page, in the Service Applications section, click Configure service application associations.
  3. On the Service Application Associations page, select Web Applications from the View drop-down menu.
  4. In the list of Web applications, in the Application Proxy Group column, click the name of the service application connection group that you want to change. Make sure the Word Automation Service is visible for your web application here.
Badge +1

Thanks

Indeed, the Word Automation Services Proxy was not selected in the default association group.

In order to fix that I added it using PowerShell:

$wordProxy = Get-SPServiceApplicationProxy | where {$_.TypeName -like "*word*" }

$WordProxyId = $wordProxy.Id

$G = Get-SPServiceApplicationProxyGroup -Default

Add-SPServiceApplicationProxyGroupMember $G -Member $WordProxyId

Once the association contained the proxy it all worked fine.

Thanks for your help Andrew!

Userlevel 7
Badge +17

No problem! Glad you're up and running. Like I mentioned, the first thing I always check is permissions/access. I keep a slogan "10 times out of 10, it's permissions!" when troubleshooting with SharePoint.

Reply