How to hide Save button and Document name of PDF file viewed on web page using Embed API

New Here ,
Dec 15, 2021 Dec 15, 2021

Copy link to clipboard

Copied

Is there any way to hide Save button and Document name displayed for PDF file when it is loaded and shown on a web page using Adobe Embed API? 

AjayS_0-1639578425333.png

 

TOPICS
PDF Embed API

Views

84

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 ,
Dec 15, 2021 Dec 15, 2021

Copy link to clipboard

Copied

You can turn off annotations which is the only way to edit the PDF. That will remove this. If you want to remove download completely, you can turn off the download feature as well. Here's how that code could look:

 

<div id="adobe-dc-view"></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:{promise: "<FILE_BLOB_PROMISE>"},
			metaData:{fileName: "<FILE_NAME>"}
		}, {showAnnotationTools: false, showDownloadPDF: false});
	});
</script>

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 ,
Dec 15, 2021 Dec 15, 2021

Copy link to clipboard

Copied

Sorry I forgot about part of your question. Technically you can't hide the name part, and you can't pass an empty string to the name, but, you can pass a string of one blank space. This CodePen demonstrates it: https://codepen.io/cfjedimaster/pen/MWEpvME

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 ,
Dec 15, 2021 Dec 15, 2021

Copy link to clipboard

Copied

LATEST

I'm going to file an enhancement request to make this more "formally" supported.

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
Resources