• Resolved robkennedy

    (@robkennedy)


    Hello,

    I’m using a child version of Hueman 1.5.4 and have a custom style sheet for printing.

    My problem is that the image sizes when using the print.css I have created are all wrong. I have created several images of different sizes to see where this is going wrong and the smaller the original image the bigger it appears when printed!!

    This is a pdf print of my test document: https://myshare.box.com/s/epys7k1f7z0ohfe6utndzldvyeggkmcr

    This is the css I am using to get a printable version of the posts: https://myshare.box.com/s/7hgn2k8p44ikap6ruhcee167nk8dnlol

    This is an internal website so I cannot give you a link to a live page I’m afraid.

    What am I doing wrong??

    Many thanks,

    Rob

    PS the print.css contents were copied from various forums on printing WordPress sites – I did not come up with it myself as I’m way out of my depth here!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter robkennedy

    (@robkennedy)

    Right, I’ve had another look at this.

    This line in the CSS is resizing everything to 100% width:

    * {width: 100% !important;}

    So that includes the images, which explains why they are all 100% width.

    Fair enough, but if I remove that line, the printed page is blank. It has nothing on it at all . . .

    Which must be why someone else (from this post: https://ww.wp.xz.cn/support/topic/how-to-add-print-css/page/2?replies=49) suggested that CSS line.

    So my NEW question is, how can I see some text from my posts without having to rezize everything to 100% ???

    Though not perfect yet, I have had some success with printing by adding this to my child theme style.css:

    @media print {
    #header, #footer, #comments, .sidebar, .s1, .s2, .widget, .sharrre-container, .comments, .related-posts, .rtLibronix, .meta-single {
        display: none !important;
    }
    .main-inner, .entry.share {
        padding: 0 !important;
    }
    body {
        display: 100%;
    }
    }

    The body spec may not be necessary.

    Thread Starter robkennedy

    (@robkennedy)

    You’re a genius !!

    That works perfectly – thank you so much !!

    Rob

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Image size when printing’ is closed to new replies.