vendredi 26 décembre 2014

Unable to convert the document to pdf using word automation service



I have created custom action in which the document is converted to .pdf file. To do so, I am using Word Automation Services to convert document from .docx to .pdf.


My code is as per below.



using (SPSite site = new SPSite("http://"))
{
using (SPWeb web = site.OpenWeb())
{
FileStream fileStream = null;
string filePath = @"C:\converted.pdf";
string destFilePath = @"C:\1 - Copy.docx";
using (FileStream wordContents = new FileStream(destFilePath, FileMode.Open))
{
using (MemoryStream pdfContents = new MemoryStream())
{
// Initialise Word Automation Service
SyncConverter sc = new SyncConverter("Word Automation Service Application");
sc.UserToken = web.CurrentUser.UserToken;
sc.Settings.UpdateFields = true;
sc.Settings.OutputFormat = SaveFormat.PDF;
// Convert to PDF
ConversionItemInfo info = sc.Convert(wordContents, pdfContents);
if (info.Succeeded)
{
fileStream = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite);
pdfContents.WriteTo(fileStream);
}
else
{
}
}
if (fileStream != null)
{
fileStream.Close();
}
wordContents.Close();
}

}
}


If document contains .emf file then the error occurred with the error-code 65545. When I remove the .emf file and try to convert the document using above mentioned code then it converts document successfully. Is there anything that the word automation services does not convert the document if .emf file is there or am I missing something in my code?






jeudi 25 décembre 2014

Sharepoint Site doesn't open on Safari 8.0.2



I upgrated my software and Safari 8.0 installed with the update. My sharepoint site can open in Safari 8.0. But I upgrated Safari 8.0 to Safari 8.0.2. But my sharepoint site can't open.


I searched this issue on the net. The problem stems from the windows authentication.


Should I need to make an amendment to the SharePoint side? Have you any information the issue?






Cannot logon with credentials obtained from Secure Store Provider



I was able to set all the required permissions through the central administration and create external content types. Every thing was working fine and all the users were able to view the external lists as well. But all of a sudden I get this error while accessing the external lists "Cannot logon with credentials obtained from Secure Store Provider". Can anyone please help me understand this error and resolve it. Thanks






Transfer the text box values of one web part to another web part through programmatically in share point 2013



how should i Transfer the text box values of one web part to another web part text boxes through programmatically in share point 2013






SharePoint online - login issue with designer



I am trying to open SharePoint Online site with my designer but i am getting below error:


"there is a problem with your account please try again later".


Can anyone please let me know the possible cause of this issue.


Thanks,






How can I filter a list view to allow a supervisor to only see the items created by their direct reports?



I have a SharePoint 2010 list, and would like to create a view that would allow a supervisor to see items created by members of their team only. I have already created a view that filters Created By = [Me]. I am hoping there is an equally simple way to filter for a supervisor based on the Created By field.






SP Foundation 2010 - programmatically set custom master page in site template



I created a site template from a one page site that uses a custom master page for the front end, the default master for the back end. When a new site is created from the template, the front end page reverts to the default master page and I have to manually correct it in SP Designer. Is there a way to switch the template for (any) site pages to the custom master without any manual interaction? This is the part that needs to change:



<%@ Page language="C#" MasterPageFile="~masterurl/custom.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>