0
SharePoint 2010 이벤트 수신기에서 작업하고 있습니다. 이 이벤트 수신기를 특정 목록에서 실행하고 특정 조건에서 라이브러리의 단어 문서 복사본을 만들고 동적 값을 사용하여 해당 속성을 편집 한 다음 Word 자동화 서비스를 사용하여이 라이브러리를 동일한 라이브러리의 PDF로 변환합니다.SharePoint 2010 Word 자동화 서비스 및 이벤트 수신기
내 단어 문서가 단어 문서 안에 삽입 된 필수 문서 속성으로 올바르게 작성되었습니다. 코드가 제대로 실행되지만 문서가 PDF로 변환되지 않습니다.
using (SPSite spSite = new SPSite("http://MySharePoint Site"))
{
SPServiceContext serviceContext = SPServiceContext.GetContext(spSite.WebApplication.ServiceApplicationProxyGroup, SPSiteSubscriptionIdentifier.Default);
var wordAutomationProxy = (WordServiceApplicationProxy)serviceContext.GetDefaultProxy(typeof(WordServiceApplicationProxy));
//Defines a collection of settings for all conversions within a single conversion job.
ConversionJobSettings jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;
//Represents a collection of file conversions (of single files or entire libraries) that share a common set of conversion properties and are logically tracked as a single unit.
ConversionJob pdfConversion = new ConversionJob(wordAutomationProxy, jobSettings);
// Set the credentials to use when running the conversion job.
pdfConversion.UserToken = spSite.UserToken;
pdfConversion.AddFile(DocFilePath, PDFFilePath);
pdfConversion.Start();
}
빠른 답변을 얻기 위해 어떤 상황에서 "긴급한"또는 다른 유사한 문구를 추가 할 수 있습니까?] (// meta.stackoverflow.com/q/326569) - 요약하면 자원 봉사자를 대처하는 이상적인 방법이 아니며, 아마도 답을 얻는 데 비생산적입니다. 이 질문을 귀하의 질문에 추가하지 마십시오. – halfer