WordPress.org

Ready to get started?Download WordPress

Forums

Print Friendly and PDF Button
[resolved] Overriding CSS? (9 posts)

  1. lifeundersun
    Member
    Posted 1 year ago #

    Hi guys,

    Thanks for this plugin. I'm having trouble using it as the CSS seems to be pulled in via your CDN and it's overriding my client's stylesheets. They can't have the font-families different on the PDF page than on the original page. Might you be aware of a way to prevent the plugin's CSS overriding the font families of the printed page? I could probably hack the plugin if not, but this would be a good feature for enterprise deployment.

    Thanks.

    http://wordpress.org/extend/plugins/printfriendly/

  2. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, this is possible. We haven't integrated into the plugin, but if you are comfortable editing your WordPress template you can add the button code direct.

    Get the standard website Print Friendly button code at http://www.printfriendly.com/button

    - You'll see an option for Custom CSS URL. Screenshot of options.

    Add the code directly to your template (single.php). Place above or below <div class="entry">

  3. mweeks@cruzio.com
    Member
    Posted 1 year ago #

    I am using the latest version of your plugin but pulling in the custom css is not working for me. I am putting the code in a widget.

  4. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    mweeks@cruzio.com

    What's the URL to your CSS file? I'm wondering if it's not an accessible file.

  5. kathrinh
    Member
    Posted 1 year ago #

    hi. great plugin!

    I have the same problem: my custom css file is not accepted by the plugin (latest version). I'm running wordpress blog on own server.

    Display button on: "Add directly to template" selected. Button added to sidebar by putting php code into Enhanded Text widget (another plugin).

    URL to custom css added in relevant field. I checked for accessibility of the file (i.e. public dropbox folder).

    Also tried to use the html button code from printfriendly.com with css url included. No success.

    I noticed that wit IE the Image style: align left is not working, but it is with Firefox. That's a different problem though, that I hope to change with the custom css anyway.

    Any idea what could solve my problem? Thanks!

  6. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks. I'll take a look, could you let me know the URL of a page I can observe the problem?

  7. kathrinh
    Member
    Posted 1 year ago #

    Thanks a lot.

    This is the URL: http://www.pointout-trainings.com/bike-training/
    and this the css: https://dl.dropboxusercontent.com/u/30443092/printfriendly.css
    (just the example file that I try to get accepted by the plugin)

    I have tried with and without the .class

    I also tried different css as my main aim is to align the thumbnail-box-images in the print version the same way as on the site. (I already managed to do it for the browser build-in print function)

    might just be s stupid mistake? I am not a programming expert at all :-(

  8. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    The cascade order is opposite. Try...

    #printfriendly .entry-content {
        font-family: Arial;
        font-size: 50px;
    }
    
     #printfriendly h1 {
    //or you could do #pf-title{
        color: Red;
    }
  9. kathrinh
    Member
    Posted 1 year ago #

    Thanks a lot for your support!
    It's working. Managed to align images.

    Just for info: not sure if it was still a file access problem, as I am now using exactly same code, as when I tried for the first time, not using the #printfriendly selector at all.

    Printfriendly is a great plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.