Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A technique I've used in the past that usually works well:

Right-click the page and hit "Inspect Element". Scan through elements, looking for the ones that only refer to the header or footer stuff you don't want. Click them and hit "delete" on your keyboard.

Find the container that defines the width of the content you're viewing. Use the style editor to reset it to 100% (often, it's just disabling whatever width setting they're using, rather than explicitly setting it to 100%).

You should be able to CTRL+P from there and get yourself a PDF out of it. Then you can do whatever you want to the PDF. I think you could also just save the raw HTML, and the browser will preserve your edits.



This is a brilliant idea. Thank you.


If you are using Firefox, you can also use the Add-on "HackTheWeb" [1] that automates the suggestion by moron4hire.

Right-click on the page, and select "HackTheWeb". Whatever page element you hover your pointer over will be given a red border, and then you use hotkeys to perform actions.

To do the same thing as the example above, it would be: right-click on page, select HackTheWeb, point mouse at the content you want, hit "w" (widen) until you have the whole section you want, and then "i" (isolate) to remove everything else. From there you're ready to print to PDF.

For some reason I had to be viewing the actual README.md file, not looking at GitHub's auto-readme-display.

HackTheWeb also lets you view the element's javascript, show the xpath of element, and convert text to black on white (very useful for content whose text and background colors don't work well together).

I've used it for several years, and wouldn't want to give it up. It's based on the old Aardvark add-on that did the same kind of thing, but Aardvark wasn't updated as Firefox matured and eventually no longer worked.

[1] https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&c...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: