0

I have a fairly large .htm file, 100 MB which doesn't fully load in any browser I've tried (the page stops rendering after a certain point), so I want to try converting the file into a .pdf file so that I can view the entire document. Since a browser cannot fully render the file, which software/program out there can convert this large .htm file, if a browser cannot load the entire file in one go? Maybe some sort of software/program that can load the file in chunks at a time and then in the end, put them all together? Or converts the file on-the-fly without having to load the entire file before processing it? (I am on Windows 7) Thanks

7
  • HTML files should never get that big. However, if you have Word 2010 or later, you can load the HTML file into word, then Save As... PDF. Commented Jun 20, 2017 at 15:41
  • You need to show your working on this, we are here to help, but we won't do it for you. lmgtfy.com/?iie=1&q=html+to+pdf
    – Lelantos
    Commented Jun 20, 2017 at 15:43
  • @JeffZeitlin I've already tried that, but it crashes every time it tries to open it. I can open it with a text editor like Sublime just fine, though Commented Jun 20, 2017 at 15:49
  • @DavidGolding None of those work because they either can't handle large files, or they incompletely render the page before converting as I already stated in my post Commented Jun 20, 2017 at 15:49
  • 1
    You should probably use those text editors to check the HTML for problems that might be causing the crashes. It takes a lot of text to get to 100MB, and it really makes me wonder what the heck this file is that requires that much text, and if it can be reduced at all. Commented Jun 20, 2017 at 16:14

1 Answer 1

0

Pandoc has no hard limit on how much memory it can use. You can invoke from the console after installation with this command:

pandoc -f html -t pdf yourfile.html

Unfortunately, to correctly convert a 100MB file, you will probably need at least 64GB of RAM.

I have successfully converted a 50MB html file with pandoc using about 20GB of RAM on my desktop computer.

1
  • Hi! This still looks like an answer to me, no need to think that it should be a comment.
    – slhck
    Commented Jun 20, 2017 at 16:10

You must log in to answer this question.

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