PDF嵌入API

2022-11-24

以下示例是关于Whatever中包含PDF嵌入API用法的示例代码,想了解PDF嵌入API的具体用法?PDF嵌入API怎么用?PDF嵌入API使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。

[英]:PDF Embed API源码类型:Whatever
<div id="adobe-dc-view" style="height: 360px; width: 500px;"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
  document.addEventListener("adobe_dc_view_sdk.ready", function(){
    var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});
    adobeDCView.previewFile({
      content:{ location: 
        { url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf"}},
      metaData:{fileName: "Bodea Brochure.pdf"}
    },
    {
      embedMode: "SIZED_CONTAINER"
    });
  });
</script>

本文地址:https://www.itbaoku.cn/snippets/806017.html