WordPress.org

Ready to get started?Download WordPress

Forums

Print Friendly and PDF Button
[resolved] text-align:center not centered on pdf (6 posts)

  1. ArjanT
    Member
    Posted 1 year ago #

    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/

  2. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    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;
    }

  3. ArjanT
    Member
    Posted 1 year ago #

    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!

  4. ArjanT
    Member
    Posted 1 year ago #

    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... :-(

  5. printfriendly
    Member
    Plugin Author

    Posted 1 year ago #

    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;
    }

  6. ArjanT
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic