1

So let me start from the beginning from what I'm trying to do.

I use WP Engine, and I'm trying to download a copy of the Monthly Reports they provide in the dashboard.

The issue is that I have like 15 installs, each with a lot of traffic, and the monthly reports include stats for all of your sites, broken down daily. So, the page is massive, like almost a million lines.

I'm trying to figure out the best way to save this page as a PDF. When I go to Print the page and select "Save as PDF" it basically times out because the page is way too large.

What are my options here? Is there some way I can strip out all unnecessary info (like CSS) to try to slim down the page before saving to a PDF? Can I highlight a certain part of the page and export that selection as a PDF?

I'm looking for a slick way to export some of this data to a PDF.

1
  • Try a different web browser. Try installing a "PDF printer", like CutePDF, and then just use browser's normal "Print" functionality to send to the printer. A browser should be able to handle this, theoretically. This ought to be pretty straightforward, but the reality is that sometimes the complexity of the web page's internal structure, and possibly combined with certain browser limitations/bugs/behavior, can make this not work too well. In theory, though, your browser can get the info and show it on the screen, so software should be able to download it and get into a PDF. Just mightBwork
    – TOOGAM
    Mar 14, 2016 at 19:08

2 Answers 2

0

If it's not a complex document, you could open in a text only browser, like lynx and just save the text

I'm pretty sure you can do that with command line switches

2
  • Good suggestion, but there are tables that I need to keep, that's mainly the only HTML I need. This would work if it didn't strip the tables.
    – Corey
    Mar 14, 2016 at 19:38
  • Lynx used to make a good attempt to make tables work last time I tried it. Maybe a huge table might break it if lynx had to go back and figure out the right maximum column width after thousands and thousands of rows.
    – infixed
    Mar 14, 2016 at 19:49
0

Alternate workflow.

fetch the html with wget or curl.

open the html file with LibreOffice

save as PDF

idea stolen from here

Whether it works probably depends on how much js and css is in it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .