8

I'm trying to save a PDF of a page from the dailymail.co.uk website. When I open the print dialogue (in Safari and Chrome) the page loses all its formatting to become a stripped back printable version. I can see the benefit of this, however I'm wondering how to bypass this feature as I want to save a PDF of the entire page as it appears on the site.

Here is an example article (randomly selected from the home page)

Is there a line of code I can delete from the page (using Chromes Dev Tool) that will let me print the full page?

7

Most likely there will be a line like this in the head tag:

<link ... media="print" ... />

Just remove it through the Chrome Inspector by right clicking it and deleting it. If that does not fix it, there is most likely another one. The problem with doing this however is that sometimes it still will not render as the other ones are most likely media="screen" which are hidden on print.

Keep in mind the fact that comments are no longer hidden and therefore you can end up with >100 pages sometimes.

With this particular website, there is a print CSS, however all the other ones are media="screen" and you would need to go through and change all those to remove that attribute. (A bit pain in the @$$):

the print stylesheet

You mention you are using Chrome, so I would use the Webpage Screenshot extension and print the image as a draft (so it doesn't do photo quality).

  • ah so browsers will disregard all SCREEN items on print? good to know - thanks! – OrangeBox Aug 17 '12 at 6:35
  • @OrangeBox, see this W3Schools article for more info on CSS media types. – Alex Aug 17 '12 at 10:27
  • 1
    @Alex see this W3Fools article for more info on why you shouldn't use W3Schools. – Cole Johnson Aug 17 '12 at 19:32
  • 1
    Has anyone written a Chrome Extension that does this? I would pay a bounty (and more) if it would do a complete job. – TomOnTime Jan 28 '16 at 12:08
3

Open the Chrome dev tools and force the CSS media type to screen as explained in this Stackoverflow answer.

Keeping dev tools open, print preview will now use the screen styles.

  • Careful, though.. if you want to archive a page satisfactory, make sure to check the print preview for overlay popups or information banners (often appear near end of page, or when hovering over particular regions or links) which would be removed by the print-specific CSS.. Sometimes takes some random messing around to make them go away. – eMPee584 Jul 10 '15 at 20:50
0

Is there a PrintScreen (PrtScrn) button on your keyboard? If there is, then push this button to put a picture of the current screen in your computer's memory. Or you can hold down ALT and then push the PrintScreen button to just take picture of the currently-selected window.

Then paste (Ctrl/V) the image into Word (etc) and save as PDF from there.

Failing that, there are any number of screen capture tools.

(Granted this will give you a PDF of an image, not of indexable text. But since you're taking it from a newspaper site, I guess you're not so worried about having search-engines index it. And since it's just one page, the PDF browser text-search probably isn't so imporant.)

0

Microsoft Edge

I know the OP asked for a Google Chrome solution, but Google directed me to this page anyway, and given the high viewcount, I think sharing solutions for other browsers is fine.

  1. Click on the "take notes" button built-in in Edge:

    screenshot showing the "take notes" button in Edge

    (For reference the official documentation: Add notes to sites in Microsoft Edge)

  2. Click on the export button, with which you can share the screenshot of the whole site to other apps, e.g. Mail.

    screenshot showing the export button

  3. You might want to install an alternative "receiving" app if Mail isn't your favorite next step to deal with your screenshot. I had success with the following:

    1. Get the app Clipboard.
      It copies the data you share to it to the clipboard.
    2. Share the screenshot to it via step (2) above and then paste it in MS Paint and save it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.