using sharepoint automation services; the administrator, developer, and user primer

23
using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

Upload: paula-cockman

Post on 30-Mar-2015

247 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

using SharePoint Automation Services;THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

Page 2: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

About me

Working with SharePoint since WSSv2

SharePoint Server MVP

SharePoint-Community.net rep

SharePoint MSDN/TechNet Forums Moderator

Nauplius Open Source Development

Deep-dive in SharePoint

http://thesharepointfarm.com

http://www.opensourcesharepoint.com

@NaupliusTrevor

Page 3: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

usingWord Automation Services;

CONVERTING WORD DOCUMENTS

Page 4: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

What is…?

Provides a service to convert Word documents (DOC, DOCX) from one file format to another…

… such as, PDF, XPS, JPG, PNG, RTF, XML…

Preserves embedded fonts and images during conversion

Contains Workflow support, making mass-automated conversion processes easy to perform

Or can be leveraged by any application running from the SharePoint server

Page 5: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Administration

Available with SharePoint 2010 and 2013 Standard or Enterprise

Service Instance [Word Automation Services]

Service Application

Central Administration

PowerShell (New-SPWordConversionServices)

Conversions executed by Timer Job, every 15 minutes by default

Configuration via Central Administration or PowerShell (Set-SPWordConversionServices)

Page 6: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Administration Cont.

Documents are kept in-memory during conversion, monitor memory usage

Large documents can have a significant processor impact

Document conversion occurs within WordServerWorker.exe

Account running Service Application Pool must be Farm Administrator

Page 7: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Administration Cont.

Extensive diagnostics support, but….

… not very useful.

Page 8: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Developer

Requires Full Trust Code; Server Side Object Model Only – Not Available in Office 365

Scott Hiller provides a REST endpoint (http://code.msdn.microsoft.com/office/SharePoint-2013-Convert-1e0578a1) … on-premises only

Provides a queue to add one or more documents to

Use the Microsoft.Office.Word.Server.Conversions namespace

Page 9: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Developer Cont.

Create a ConversionJob with Word Automation Services proxy and a UserToken

Set the Output file format

Give the job a Name

Add the input file and output file to the job using URIs

Start the job… and wait

Use ConversionJobStatus to monitor jobs

Page 10: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Developer Cont.Traditional Conversion Process

Page 11: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Developer – Instant Access

New “Instant” Conversions in SharePoint 2013, bypass the queue!

Page 12: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: Developer Cont.SharePoint 2013 “Instant” Conversions

Page 13: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

WAS: User

Let’s see how this actually works!

Page 15: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

usingPowerPointAutomation Services;

CONVERTING POWERPOINT DOCUMENTS

Page 16: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

What is…?

Provides a service to convert PowerPoint documents (PPT, PPTX) from one file format to another…

… such as, PDF, XPS, JPG, PNG…

Preserves embedded fonts and images during conversion

Contains Workflow support, making mass-automated conversion processes easy to perform

Or can be leveraged by any application running from the SharePoint server

Page 17: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: Administration

Available with SharePoint 2013 Standard or Enterprise

Service Instance [PowerPoint Conversion Services]

Service Application

PowerShell Only (New-SPPowerPointConversionServiceApplication)

Conversions executed immediately

No Database for Service Application

Configuration via PowerShell Only (Set-SPPowerPointConversionServiceApplication)

Page 18: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: Administration Cont.

Documents are written to disk on SharePoint server running Service Instance (C:\ProgramData\Microsoft\SharePoint\PowerPointConversion)

Large documents can have a significant processor impact

Document conversion occurs within pptworker.exe

Account running Service Application Pool must be Farm Administrator

Diagnostics are actually useful!

Page 19: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: Developer

Requires Full Trust Code; Server Side Object Model Only – Not Available in Office 365

There is no ‘queue’, documents are immediately converted

Use the Microsoft.Office.Server.PowerPoint.Conversion namespace

Page 20: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: Developer Cont.

Pass a valid SPFile Binary Stream into a PresentationRequest with a reference to the output SPFileStream and PresentationType

Conversions are Asynchronous. Use BeginConvert and EndConvert

Save output SPFileStream as SPFile to target location

No method available to monitor jobs

Can be leveraged by console applications or other Web Applications where the Server OM is available

Page 21: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: Developer Cont.Standard Conversion Process

Page 22: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

PAS: User

Demo x2!

Page 23: Using SharePoint Automation Services; THE ADMINISTRATOR, DEVELOPER, AND USER PRIMER

References

PowerPoint Automation Services in SharePoint 2013

Introduction to PowerPoint Automation Services in SharePoint Server 2013

Nauplius.PAS