230 likes | 747 Views
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
E N D
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
usingWord Automation Services; Converting word documents
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
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)
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
WAS: Administration Cont. • Extensive diagnostics support, but…. • … not very useful.
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
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
WAS: Developer Cont. Traditional Conversion Process
WAS: Developer – Instant Access • New “Instant” Conversions in SharePoint 2013, bypass the queue!
WAS: Developer Cont. SharePoint 2013 “Instant” Conversions
WAS: User Let’s see how this actually works!
References Estimate performance and capacity requirements for Word Automation Services in SharePoint Server 2010 Word Automation Services Architecture What's new in Word Automation Services for developers Nauplius.WAS
usingPowerPointAutomation Services; Converting PowerPoint documents
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
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)
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!
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.Conversionnamespace
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
PAS: Developer Cont. Standard Conversion Process
PAS: User Demo x2!
References PowerPoint Automation Services in SharePoint 2013 Introduction to PowerPoint Automation Services in SharePoint Server 2013 Nauplius.PAS