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?
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.
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>
)
}
Copy link to clipboard
Copied
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.