Print and Download not shown

New Here ,
Apr 21, 2020 Apr 21, 2020

Copy link to clipboard

Copied

Hi,

when I upload the files to server (https) the download and print buttons are not shown. Same settings on localmachine (http, own credentials of course) show the buttons along with the legal notices. No errors in the console. Any ideas?

 

TOPICS
View SDK

Views

162

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

Hello,

 

Thank you for using View SDK. If I understand correctly, you are trying out View SDK from your local machine. When you pass the PDF file path of a https server you see different behavior and when you pass http path you observe different behavior. If that's the case, could you share the code snippet of your application?

 

You should see same UI regardless of PDF location.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

Sure. Below snippet shows download and print buttons on localhost but not on production server.

 

UPDATE: I know why it "works" on localhost. It also works on production server but only on desktop browsers. When I switch to mobile mode an reload the buttons are missing on both localhost and production. Is this on purpose? I mean mobile phones do have the ability to print via air printers and store data locally or in cloud drives.

 

 

import React from "react";

export default class Document extends React.Component<any, any> {
    constructor(props:any) {
        super(props);
        const script = document.createElement("script")
        script.src="https://documentcloud.adobe.com/view-sdk/main.js"
        document.addEventListener("adobe_dc_view_sdk.ready", () => {
            var adobeDCView = new AdobeDC.View({clientId: "<creds>", divId: "adobe", locale: 'de-DE'});
            adobeDCView.previewFile({
                content:{location: {url: props.url}}, // e.g /assets/pdf/example.pdf
                metaData:{fileName: props.title}
            }, {embedMode: "SIZED_CONTAINER", showDownloadPDF: true, showPrintPDF: true,
                showFullScreen: false});
        })
        document.head.appendChild(script);

    }


    render () {
        return (
            <div className={"wrapper"}>
                <div id="adobe"></div>
            </div>
        )
    }

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

LATEST

Thanks for confirming that the issue is only on mobile, we have some known limitations which are already documented here. We appreciate your feedback and will try to provide mobile support in the future releases. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines