• Resolved Trebly

    (@trebly)


    Hi,

    Into my content I have elements which have style="display:none;" attribute.

    The print of this content deletes the style, then print hidden elements.

    This produces that those contents which are normally reserved for admin to display these contents to debug are printed (these contents are of several type : traces in hexa code for checking particular elements, indication of content references : templates id and refs used).

    With this problem “printfriendly” is not usable.

    Best regards

    Trebly

    • This topic was modified 6 years, 11 months ago by Trebly.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Solution: Add class=”print-no” to the elements.

    Many sites/pages have one-page design using display:none which needs to be included. We understand that doesn’t work for your particular situation.

    Thread Starter Trebly

    (@trebly)

    Hi,

    Thanks for the answer.

    There are many <span style=”display:none” or class=”…”> which class have attribute display:none.

    Evermore there are current plugins (that I do not control) which uses elements hidden using display:none.

    There are scripts which hide elements dynamically using (JQuery) display:none;

    It is not possible to change everything in these pieces of code to fit your specifications.

    I think that the solution should be inverted, there should be three cases :

    • any element with display:none is not printed by default
    • an element which is not displayed normally at screen would have either :
    • a class with an attribute display:<something> into a @device print {}containing the right display attribute
    • print can be forced by class “print-yes” class
    • an element which is displayed normally at screen can be hidden to print either
    • using class “print-no”
    • by block @device print {} containing the right display attribute

    So, in my opinion, your solution is crippling for a normal and standard usage.

    Best regards

    Trebly

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A “bug” with style “display:none” elements which are printed’ is closed to new replies.