Answered by:
Convert word to pdf using word automation Services Bookmarks not working in PDF

Question
-
Hi Team,
My requirement Convert word(MSOffice2010) to pdf from sharepoint2016. I have used WordAutomationService and ConversionJob. The word document contains External Hyperlinks,Meta Data and Bookmars. I am getting PDF's after convert. But I am facing an issue with Bookmarks. When I click on Bookmark link its not firing.But its working same functionality in SP2010 and its not working SP2016. Please help me on this.
- Moved by Dave PatrickMVP Friday, August 3, 2018 1:02 PM not reporting forums application issues
- Edited by Bala_Sharepoint Friday, August 3, 2018 1:55 PM Subject change
Friday, August 3, 2018 12:55 PM
Answers
-
I'd ask for help over here.
https://social.technet.microsoft.com/Forums/en-US/home?forum=SP2016
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Friday, August 3, 2018 1:05 PM
- Marked as answer by Richard MuellerMVP, Banned Friday, August 10, 2018 1:34 PM
Friday, August 3, 2018 1:04 PM
All replies
-
I'd ask for help over here.
https://social.technet.microsoft.com/Forums/en-US/home?forum=SP2016
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Guido Franzke Friday, August 3, 2018 1:05 PM
- Marked as answer by Richard MuellerMVP, Banned Friday, August 10, 2018 1:34 PM
Friday, August 3, 2018 1:04 PM -
I tried these posts..But no luck.. Can you please help me if you got some other in mind.
this is the code I have used.
SPUser user = spSite.RootWeb.EnsureUser(Constants.PublishingAccount);
SPList destinationLibrary = web.TryGetList(Constants.DestinationLibrary);
SPFile file = web.GetFile(fileUrl);
string destinationFileUrl = SPUtility.GetFullUrl(spSite, GetDestinationFileUrl(file, destinationLibrary));
if (!string.IsNullOrEmpty(destinationFileUrl))
{
SPFile dfile = web.GetFile(destinationFileUrl);
if (dfile.Exists)
{
var ditem = dfile.Item;
ditem.Delete();
}
var job = new ConversionJobSettings();
job.UpdateFields = true;
job.OutputFormat = SaveFormat.PDF;
ConversionJob pdfConversion = new ConversionJob("Word Automation Services", job);
pdfConversion.UserToken = spSite.UserToken;
string sourceUrl = SPEncode.UrlDecodeAsUrl(Convert.ToString(file.Item[SPBuiltInFieldId.EncodedAbsUrl]));
SPLogger.LogInfo(702, string.Format("Converting file {0} to {1} using word automation service", sourceUrl, destinationFileUrl));
pdfConversion.AddFile(sourceUrl, destinationFileUrl);
pdfConversion.Start();Friday, August 3, 2018 1:58 PM -
This is "where is" forum for direction on where best to ask questions. I'd ask for help in these forums.
https://social.technet.microsoft.com/Forums/en-US/home?forum=SP2016
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.Friday, August 3, 2018 2:00 PM