Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Michael Nelson

    (@mnelson4)

    HI @fiberlyone, I have a pretty good guess about what’s going on: your webpage has CSS code that hides the title when printing, but not when viewing it from a webpage.
    Can you please pass the URL of the webpage where you’re having the issue? I can give you some custom CSS to fix it.

    Thread Starter fiberlyone

    (@fiberlyone)

    Here’s a post you should be able to see. It seems to be the same for all the posts.

    https://www.columbiariversewing.org/community-service-update-july-2020/

    Thanks, @mnelson4

    Plugin Author Michael Nelson

    (@mnelson4)

    Hmmm when I try printing that page with Print My Blog it’s stuck on “Initializing…”. It’s doing that because the request to wp-json/wp/v2/ is responding with a 403 error like this: https://i.imgur.com/mJV5G5A.png

    Do you have any security plugins that might be interfering?

    Thread Starter fiberlyone

    (@fiberlyone)

    The error occurs for not-logged users on my public site. I have a staging site, where it the page renders logged in or out (still no title on printing/pdf).

    I compared that all the plugins are the same on both.

    Security is WP-Cerber. I seem to recall this was an issue before and I added print-my-blog in allowed namespaces.

    What else should I look at/compare?

    • This reply was modified 3 years, 11 months ago by fiberlyone.
    Plugin Author Michael Nelson

    (@mnelson4)

    Ah ok. Yes I see WP Cerber has some security settings to restrict access to the REST API which you should probably loosen. I’d suggest you open access to the REST API completely to get it working. If you’d like to tighten up a bit, use Print My Blog to print a page, then use WP Cerber’s watch what requests it makes, then whitelist only those routes. Here’s a video I just made showing how to enable the REST API within WP Cerber. Notice at the end I show the links which show the logs of REST API requests.

    Once that’s working I can help with the missing titles.

    Thread Starter fiberlyone

    (@fiberlyone)

    Okay. REST API has been enabled. I was able to render the PDF without logging in.

    Plugin Author Michael Nelson

    (@mnelson4)

    Great, thanks. I can now see the problem, and it’s just the AMR-users plugin’s CSS that thought it should hide the title when printing.

    I think this custom CSS should do the trick:

    
    .pmb-posts .entry-header{
    display:block;
    }
    

    Do you know how to add that custom CSS to your theme?

    Thread Starter fiberlyone

    (@fiberlyone)

    Thanks, Michael.

    The custom CSS did the trick!

    Plugin Author Michael Nelson

    (@mnelson4)

    Super! Thanks for bringing the issue up. I’ll probably add that CSS to the plugin itself too, cone to think of it, in case other plugins and themes are similarly hiding that content in printouts.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Rendered and Print/PDF not the same’ is closed to new replies.