Skip to main content
Participant
December 15, 2021
Question

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

  • December 15, 2021
  • 2 replies
  • 949 views

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? 

 

This topic has been closed for replies.

2 replies

Raymond Camden
Community Manager
Community Manager
December 15, 2021

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

Raymond Camden
Community Manager
Community Manager
December 15, 2021

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

Raymond Camden
Community Manager
Community Manager
December 15, 2021

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>