WordPress.org

Support

Support » Plugins and Hacks » [Resolved] text-align:center not centered on pdf

[Resolved] text-align:center not centered on pdf

  • If I use the WYSIWYG editor to center my text, the following html tag is used: <p style="text-align: center;">. This centers the text in the browser. Regretfully in the Print Friendly and PDF plugin the text is NOT centered. However, if I change the html tag to <p align="center"> then the text is centered in the PDF. Is this correct behaviour of the plugin?
    Thanks, for the rest, this plugin is great!
    example: http://tanka-kyoka-sedoka.com/?page_id=518
    When using PDF button, first part okay, last part not centered.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author printfriendly
    Participant

    @printfriendly

    To work reliabely, you’d need to use the custom print.css option available in the latest plugin (3.1.6).

    How to article for custom css styles in PrintFriendly.

    It requires you link the button to a stylesheet that includes the styles you want us to use.

    #printfriendly p{
    text-align:center;
    }

    Hi Printfriendly, Thank you for yr suggestion. I have tried it and managed to get the functionality working. However, it does not suffice for me. I have noticed it changes style of ALL text. (I also experimented with the font size and header color). Regretfully, although perfect for printing the poems, the other text on the site, like announcements and other papers etc, are getting the same css. And usually those text do not like to be centered. So,is there any other suggestion you might have? Thanks in advance for thinking with me! I appreciate your help!

    Why the <p style="text-align: center;"> command is not recognized by the default css? This would really help a lot. I have 200 pages with poems to edit if no overall solution available… 🙁

    Plugin Author printfriendly
    Participant

    @printfriendly

    We’ve had unintended consequences with inline styles in the past. For example a website on a dark background having <p style="color:white;">.

    Try being more specific in your css. You could ask a class/id to poems if not already there and specify like… Can be done with other elements as well.

    `#printfriendly div.poem{
    color:blue;
    }

    Hi Printfriendly, okay, you have a point there. I will investigate the suggested class id solution. Thank you for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] text-align:center not centered on pdf’ is closed to new replies.