Copy link to clipboard
Copied
I have a PDF with a dark grey-black blackground. And I'm putting it on a website with an orange color background using the IN_LINE mode. But there's a white-colored "gutter" that appears between the pages of my PDF. Is there an option anwhere to either change the "gutter color" or remove the gutter completely? Please advise; thank you!
Thanks for using View SDK. There is no way you can remove the gutter that appears between the PDF, although you can change the color by providing the hashcode of your desired color as shown below.
<div id="adobe-dc-view" style="width: 800px;"></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
...
Copy link to clipboard
Copied
Thanks for using View SDK. There is no way you can remove the gutter that appears between the PDF, although you can change the color by providing the hashcode of your desired color as shown below.
<div id="adobe-dc-view" style="width: 800px;"></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",
backgroundColor: "<HASH_CODE_FOR_COLOR>"
});
adobeDCView.previewFile({
content:{location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
metaData:{fileName: "Bodea Brochure.pdf"}
}, {embedMode: "IN_LINE"});
});
</script>
Copy link to clipboard
Copied
This works for me! Thank you, Shubhanshu!
Copy link to clipboard
Copied
Hi @Shubhanshu Dixit, I think this specific issue relates to my own submitted issue as well: https://community.adobe.com/t5/document-services-apis-discussions/view-sdk-in-line-container-size-in...
It seems like the viewer inserts a gutter even if there is only one page, which to me is incorrect behavior since gutters should only exist between two elements. Should/can I submit a bug report to address this issue?
Copy link to clipboard
Copied
Just want to mention the suggested solution just works if including the (older?) SDK:
https://documentcloud.adobe.com/view-sdk/main.js
and not the https://documentcloud.adobe.com/view-sdk/viewer.js mentioned in current docs.
It seems the backgroundColor variable has been unluckily dropped in this newer version.
I just wonder why, I was getting a white horizontal bar at the end of the PDF, and horrible white left and right margins in some high screen resolutions. With the backgroundColor we can at least control their color. I hope it will be restored.
Copy link to clipboard
Copied
In case anyone regularly reviews this thread. I also hope this will be restored. Embedding on colored backgrounds looks very poor right now.
If anyone knows a workaround it would be welcome.