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
Asked
Active
Viewed 1,983 times
0
-
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. – Jeff Zeitlin Jun 20 '17 at 15:41
-
You need to show your working on this, we are here to help, but we won't do it for you. http://lmgtfy.com/?iie=1&q=html+to+pdf – Lelantos Jun 20 '17 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 – Joseph McNamara Jun 20 '17 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 – Joseph McNamara Jun 20 '17 at 15:49
-
1You 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. – music2myear Jun 20 '17 at 16:14
-
OK, you mentioned "browsers", not that you'd also tried Word or any other word processor. – Jeff Zeitlin Jun 20 '17 at 16:33
-
Is the html file so large due to base64 inline'd images maybe? Example: `
` – Edi Jun 20 '17 at 19:12
1 Answers
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.
slhck
- 223,558
- 70
- 607
- 592
-
Hi! This still looks like an answer to me, no need to think that it should be a comment. – slhck Jun 20 '17 at 16:10