Help printing a webpage where blocks of text are hidden?
November 26, 2021 7:53 PM   Subscribe

I need help printing a webpage where the text that appears in my browser appears hidden when I view in print preview mode or when I print the page.

I'm trying to print a webpage. The webpage has been somewhat locked down to prevent people from printing it. There are a few blocks of text that appear in the webpage that don't appear when I print preview or when I print the webpage. I suspect this is happening via css (although I'm not technologically knowledgeable enough to be sure). Is there any simple way I can force the webpage to print as it appears when I view the page and not to hide any blocks of text on the print window. I have to do this for many webpages, so I'm hoping there's a solution that scales well. Thanks.

I'm using Windows 10 with a Chrome browser, but I can use other browsers if that would help. Thanks!
posted by NoneOfTheAbove to Computers & Internet (12 answers total) 2 users marked this as a favorite
 
Ctrl-PrtScr copies your screen to the buffer. Open Paint, and Paste. Click the View tab, and zoom out so the whole web-page is visible. Then click the Home tab, Select; click and drag to select just the web page, and Crop. Then, still inside Paint, File and Print. The browser used to display the web-page doesn't really matter.
posted by Rash at 8:04 PM on November 26, 2021


I would play around with the browser developer tools (F12, or right click + inspect) to see where the print styles are coming from. If they are from a separate file (you can identify it as it will be tagged with "media=print") then it should be fairly straightforward to block it from loading in your browser.

You can block resources by going to the Network tab, refreshing the page, right-clicking on any resource you want to block, and clicking on "Block Request Url".
Then refresh the page again and see if it prints any better.
posted by Gomez_in_the_South at 8:43 PM on November 26, 2021 [1 favorite]


Take a screenshot and print it? For better results, don't use any "auto scale" or "fit to page" options, just do "Scale: 100%", otherwise the text may come out blurry.
posted by danceswithlight at 10:21 PM on November 26, 2021


I would try using the tool Print What You Like. It might not work but it's worth a shot.
posted by Athanassiel at 11:20 PM on November 26, 2021


There are various chrome extensions that will transform the entire page (not just the bit currently visible in your browser) into an image, which you could then print out. Or it’s possible this would work, without using an extension (I haven’t tried it).
posted by fabius at 5:23 AM on November 27, 2021


disregard.... sorry, I can see you would like "as it appears..." .

could you try using CTRL-A to select all the text and then copy&paste into Notepad or Word and print from there?
posted by alchemist at 6:12 AM on November 27, 2021


Does switching to reader view in the browser help?
posted by Thorzdad at 6:30 AM on November 27, 2021 [1 favorite]


If this is a publicly accessible web page, posting a link would help figure this out.
posted by flabdablet at 5:23 PM on November 27, 2021


Try pasting this into the console in the browser developer tools before printing; it'll attempt to remove any CSS rules specific to print:
for (let ss of document.styleSheets) {
    try {
        for (let i=0; i < ss.rules.length; i++) {
            if (ss.rules[i].cssText.indexOf("@media print") != -1) {
                ss.deleteRule(i);
                console.log("Deleting print-only rule");
            }
        }
    }
    catch {
        console.log("Couldn't access cross-origin stylesheet, sorry!")
    }
}
This unfortunately won't work if the website hosts its CSS on a different domain, for fairly ridiculous security-theater reasons (CORS rules apparently prevent manipulation of cross-origin css data, even though it's already been loaded in the browser!) but it's worth a shot.
posted by ook at 10:38 AM on November 28, 2021 [1 favorite]


Jeez, what a hassle -- just do a Print-Screen, like I said. The key's on every keyboard, isn't it? Just tested it and you don't even need to use the Ctrl key. I do this often to get the images from sites where the browser's right-click-Save As has been disabled, but it'll capture your text, too.

I realize Windows 10 defaults to Paint 3D (which I've never figured out) but Paint is still there, do a search.
posted by Rash at 1:58 PM on November 29, 2021


I’d expect print screen to result in blurry text in the print because you’re getting a raster image instead of the vector shapes. Maybe that’s acceptable for this case, maybe it’s not; just trying to provide more options.

And it’s not on every keyboard.
posted by ook at 9:15 AM on November 30, 2021


Screen captures are also not going to be very pleasant to work with if the web page is text-heavy and many screens long.

There are many, many ways to work around content blocking by web authors, and it really would be helpful to have a link to the troublesome page(s) to work out which is most appropriate in this instance.
posted by flabdablet at 9:23 AM on November 30, 2021


« Older Taking the next step at work while anxious   |   Visions of Sugarplums Danced in ONE Head Newer »
This thread is closed to new comments.