• Resolved neotrope

    (@neotrope)


    Hi
    other than de-enqueuing the plugin stylesheet (*pdfprnt_stylesheet-css”), there does not seem to be way to disable the plugin css loading in head of all pages/posts. Even with “Use the theme stylesheet or plugin default style” set to > current theme stylesheet. Since we combine and minify our stylesheet to one document, we don’t need this added to every page head:

    <link rel='stylesheet' id='pdfprnt_stylesheet-css' href='sitenameurlhere/plugins/pdf-print/css/style.css' type='text/css' media='all'/>

    Also, the addition of filter in the functions.php to append something like site credit and URL, or link to the article (the link to the story really should be option by default to add to footer of the generated PDF). Using explicitly this example: https://bestwebsoft.com/products/pdf-print/faq

    add_filter(
        'bwsplgns_get_pdf_print_content',
        function( $content ) {
            $my_content   = "Story originally published on my sitename and URL go right here.";
    
            /* if you want add some data after the main content */
            return $content . $my_content;
    
        }
    );

    Happy to get the PRO version, but the above would need to be addressed for our use. We only need the PDF function, and are making custom on page button using Font Awesome icon to match the rest of the elements.

    Thanks for any response ??

    https://www.ads-software.com/plugins/pdf-print/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    These styles are required for correct displaying of plugin buttons, and plugin functionality doesn’t provide their disabling. The option “Use the theme stylesheet or plugin default style” has been implemented for adding styles to PDF/Print pages versions. If you want to disable styles on all pages, you can change plugin’s code. To do so, please open “pdf-print.php” file (which is located here – [your_wp_root]/wp-content/plugins/pdf-print), find lines 726-727 and comment them out:

    if ( ! is_admin() || $is_plugin_options )
         wp_enqueue_style( 'pdfprnt_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );

    Please note that after updating all changes will be lost.

    2) The functionality presented in the free plugin version is quite sufficient for the most part of our users. The basic principle that we follow when creating our plugins is ease of use of our products, and if we add all functionality which all our users would like to have – this will lead to the fact that our products no longer convenient to use due to a large number of settings. We implement additional filters and hooks with instructions for those people who need more. However, we’d like to note that there is an ability to create templates for PDF/Print pages versions in PDF & Print Pro – https://bestwebsoft.com/products/pdf-print/.

    Sincerely,
    BestWebSoft Support Team

    Thread Starter neotrope

    (@neotrope)

    Thank you.

    I was able to remove the style class in head with simple enqueue function in my functions.php file.

    Adding a hook/filter to append info to bottom of PDF would be nice.

    Or, perhaps simply a commented area in plugin, to paste in something like a copyright notice, or perhaps link to the content being “printed.”

    Thanks ??

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    Thank you for your kind offer. We will consider it, and if we deem it necessary, we will make the necessary changes to the plugin.

    Sincerely,
    BestWebSoft Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove CSS from the head filter not working’ is closed to new replies.