文档查看器
doc-views
直接阅读文档,不离开当前页面。
在页面内预览 Word、PDF、PowerPoint 与 Excel 文档。
Word DOCX<figure class="document-block" aria-label="Word DOCX" data-edgepress-document data-document-src="/documents/doc-views/sample-document-medium.docx" data-document-title="Word DOCX" data-document-format="docx"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
Word DOC<figure class="document-block" aria-label="Word DOC" data-edgepress-document data-document-src="/documents/doc-views/sample-document-medium.doc" data-document-title="Word DOC" data-document-format="doc"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
PDF<figure class="document-block" aria-label="PDF" data-edgepress-document data-document-src="/documents/doc-views/sample-document-5-pages.pdf" data-document-title="PDF" data-document-format="pdf"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
PPT<figure class="document-block" aria-label="PPT" data-edgepress-document data-document-src="/documents/doc-views/sample-document.ppt" data-document-title="PPT" data-document-format="ppt"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
PPTX<figure class="document-block" aria-label="PPTX" data-edgepress-document data-document-src="/documents/doc-views/sample-presentation-10-slides.pptx" data-document-title="PPTX" data-document-format="pptx"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
Excel XLSX<figure class="document-block" aria-label="Excel XLSX" data-edgepress-document data-document-src="/documents/doc-views/sample-spreadsheet-100-rows.xlsx" data-document-title="Excel XLSX" data-document-format="xlsx"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
Excel XLS<figure class="document-block" aria-label="Excel XLS" data-edgepress-document data-document-src="/documents/doc-views/sample-spreadsheet-100-rows.xls" data-document-title="Excel XLS" data-document-format="xls"><div data-document-mount><p>正在加载文档…</p></div><noscript><p>暂时无法预览。请检查文档地址、访问权限及 CORS。</p></noscript></figure>
正在加载文档…
暂时无法预览。请检查文档地址、访问权限及 CORS。
文档查看器<div class="project-demo" data-project-demo data-animation="/images/previews/c5083728ae2e943e369c677c9efbdd1eb45751d03250aa100bcd0e7f91ef5958.mp4" data-play="播放演示" data-resume="继续播放" data-pause="暂停演示" data-replay="重新播放" data-loading="正在加载演示…" data-error="演示暂时无法加载,请重试。"><div class="project-demo-media"><img src="/images/responsive/5a473711c31b8f2819c7a6cc872beec579e6f7cb1249645054d786f6e609016d.webp" alt="文档查看器" loading="lazy" decoding="async" data-original="/images/previews/doc-views-zh-sg.6722d217e0dc0a53.webp" srcset="/images/responsive/5a473711c31b8f2819c7a6cc872beec579e6f7cb1249645054d786f6e609016d.webp 400w, /images/responsive/2f98aa0189f04a07105b8ec1e0c3a92713bef6632c9850d05a8b37e66ada9c45.webp 800w, /images/responsive/63d974005b854f077828ef249767fc2cd31e14d4369c004458f162cb817efbf7.webp 1200w" sizes="(max-width: 620px) calc(100vw - 32px), (max-width: 900px) calc((100vw - 72px) / 2), 560px" width="400" height="250"><video muted playsinline preload="none" hidden aria-label="看看文档预览如何操作"></video></div><button type="button" data-demo-toggle aria-pressed="false" aria-label="播放演示: 看看文档预览如何操作">播放演示</button><input name="edgepress-demo-seek-1" class="project-demo-seek" data-demo-seek type="range" min="0" max="1" value="0" step="0.1" disabled aria-label="演示进度: 看看文档预览如何操作"><span class="project-demo-time" data-demo-time>0:00 / 0:00</span><span class="project-demo-status" role="status"></span></div>
0:00 / 0:00

看看文档预览如何操作
使用提供的示例,展示 Word DOC/DOCX 视口内工作区和缩放图标、PDF 八页连续分页、PPT/PPTX,以及 Excel XLS/XLSX 单元格定位和标签切换。Summary 演示包括计算结果、拖拽列宽、铺满视口和恢复原列宽。隔离 Chromium 桌面真实录制,点击播放。
!document[示例报告](/documents/report.docx)
[
{
"columns": 1,
"cells": [
[
{
"type": "document",
"title": "Report",
"src": "/documents/report.pdf"
},
{
"type": "media-viewer",
"title": "Photos and video",
"items": [
{
"type": "image",
"src": "/images/photo.webp",
"originalSrc": "/images/photo-original.webp",
"alt": "Detail of the project interface"
},
{
"type": "video",
"src": "/videos/walkthrough.mp4",
"poster": "/images/poster.webp",
"label": "Project walkthrough",
"captions": "/videos/walkthrough.en.vtt",
"captionLanguage": "en"
}
]
}
]
]
}
]