• I’m using the File Block to embed a PDF within a page. It works great!

    I’d LIKE to be able to hide the Save button on the PDF toolbar.

    I can identify the CSS selector I need to set to “display: none” — Getting as specific as I can, the selector would be:

    #toolbar > div > div > div > div.c0155.c0158 > div > div > div.c0138 > div.c0134 > div:nth-child(2)

    But anything I put into the site’s custom CSS bounces off the file block’s magic WordPress forcefields. The block is getting its CSS from somewhere else, and I’m not sure how to force my tweaked CSS into it.

    • This topic was modified 2 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Well, it depends of the PDF library.

    Recently I faced the same issue, and I had to modify the actual viewer file like this:

    <button id = "download" class = "toolbarButton download" title = "Download" style="visibility: hidden;"></button>

    I think that if you remove the download button, the library will crash.

    Dear ClayRobeson,

    I hope you are doing well today.

    There is a possible solution to your problem. Here are some steps you may take to resolve the issue of removing the download pdf option from your page.

    1. Download the pdf and host in your media( by uploading media /wp-admin/media-new.php) instead of directly embedding it from any external URL

    2. Download a plugin named 3d flipbook Dflip book https://www.ads-software.com/plugins/3d-flipbook-dflip-lite/

    3. Upload your PDF as shown through the plugin option (/wp-admin/plugin-install.php)

    4. Create the post/page of your pdf

    5. Add the mentioned code in the additional settings through the customizing option of additional CSS

     .df-ui-btn.df-ui-more.ti-more-alt {
        display: none; !important;
    }
    

    6. Please note that the above line CSS line will hide the download option only. In case you want to hide the entire option of the toolbar then, please add the mentioned code.

    .df-ui-wrapper.df-ui-controls {
        display: none; !important;
    }

    Please revert back in case you need more clarity or have any other queries.
    Note: I have checked this option several times and was successfully able to hide and unhide the options without any errors or issues.

    Thank you,
    Have a great day

    • This reply was modified 2 years, 8 months ago by asuperlifestyle. Reason: correction in formatting reply
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hiding the PDF Save button in file block’ is closed to new replies.