You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Adobe PDF Embed API批注功能在Android平板Chrome中无法使用

Adobe PDF Embed API Android平板Chrome批注工具无法弹出问题

我基于Adobe PDF Embed API实现批注功能,官方文档显示FULL_WINDOW模式下支持平板端Chrome和Safari浏览器,但所有Android平板的Chrome浏览器中批注工具均无法弹出。已在多台Android平板的Chrome上测试,均出现此问题;而普通PC、iPad Pro及Surface平板上,批注工具可正常显示。请问是我的实现存在问题,还是文档不准确,Android平板Chrome并不支持批注功能?

嵌入脚本

<script src="https://acrobatservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
    const previewConfig = {
            embedMode: "FULL_WINDOW",
            showDownloadPDF: false,
            showPrintPDF: false,
            showAnnotationTools: true,
            enableAnnotationAPIs: true,
            includePDFAnnotations: true,
            showFullScreenViewButton: true
        };
    const saveOptions = {
            autoSaveFrequency: 0,
            enableFocusPolling: false,
            showSaveButton: true
        };
    
    document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
        var adobeDCView = new AdobeDC.View({clientId: "HIDDEN FOR SECURITY", divId: "adobe-dc-view"});
        adobeDCView.registerCallback(
            AdobeDC.View.Enum.CallbackType.SAVE_API,
            function(metaData, content, options) {
                var uint8Array = new Uint8Array(content);
                var blob = new Blob([uint8Array], { type: 'application/pdf' });
                formData = new FormData();
                <<FORM INFORMATION I SEND>>;
                fetch("https://my.url/i-use-for-saving",{
                    method: 'POST',
                    body: formData,
                })
                    .then(
                        function (response) {
                            if (response.status == 200) {
                                console.log(response.body);
                            }
                        }
                    )

                return new Promise((resolve, reject) => {
                    resolve({
                        code: AdobeDC.View.Enum.ApiResponseCode.SUCCESS,
                        data: {
                            metaData: {
                                fileName: "PDFFILE.pdf",
                                id: "fancy-id"
                            }
                        }
                    });
                });
            },
            saveOptions
        );
        adobeDCView.previewFile({
            content:{location: {url: "https://originalpdffile.pdf"}},
            metaData: {
                fileName: "THEPDF.pdf",
                id: "fancy-id"
            }
        }, previewConfig)
            .then(adobeViewer => {
                adobeViewer.getAnnotationManager().then(annotationManager => {
                    annotationManager.setConfig({downloadWithAnnotations: true})
                    annotationManager.startAnnotationMode('shape',{
                        defaultColor: "#000000",
                        cursor: "crosshair",
                        strokeWidth: 2
                    });
                    annotationManager.registerEventListener(
                        function(event) {
                            annotationManager.startAnnotationMode('shape',{
                                defaultColor: "#000000",
                                cursor: "crosshair"
                            });
                        }, {
                            listenOn: [ AdobeDC.View.Enum.AnnotationEvents.ANNOTATION_MODE_ENDED ],
                            enableAnnotationEvents: true
                        }
                    );
                });
            });
    });

</script>

补充说明

  • 页面已包含标准的adobe-dc-view DIV元素
  • 测试截图情况:
    • 三星Galaxy Tab:无批注工具显示
    • iPad Pro:批注工具正常显示

欢迎提供建议。

内容的提问来源于stack exchange,提问作者WindyJMusic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 07:31:17