我使用getFileAsync()方法创建word文档的pdf:
Office.context.document.getFileAsync(Office.FileType.Pdf,
function(result) {
if (result.status == "succeeded") {
var myFile = result.value;
var sliceCount = myFile.sliceCount;
app.showNotification("File size:" + myFile.size + " #Slices: " + sliceCount);
// Now, you can call getSliceAsync to download the files, as described in the previous code segment (compressed format).
myFile.closeAsync();
}
else {
app.showNotification("Error:", result.error.message);
}
} );
有关详情:https://dev.office.com/reference/add-ins/shared/document.getfileasync
但是一旦创建了pdf,它就不会显示书签。 (当我们通过它的选项设置将单词转换为pdf时,需要像ms中的单词一样启用它)
我们是否有办法在办公室js方法中为pdf启用word文档的书签?