I try to print https://spring.io/guides/gs/maven/ into a pdf file using two ways:

  • used chrome browser by hitting ctrl-p,

  • used wkhtmltopdf with various options about javascript.

But I can only print the beginning part of the webpage (imagine the webpage is paginated, only the first page content is printed into the first page of pdf file, and the following pages are blank).

I wonder what is the reason that I can only print part of the webpage?

How can I print the entire webpage into a pdf file?


ps: I also would like to print the code snippets in the webpage with horizontal or vertical scroll bars in their entirety. But that is not the first priority at this moment. If necessary, I will ask in a future post.


I see what you mean. I tried printing it with bullzip pdf printer (Community Edition) and get the same result. But... if you first save it as web page (single page, HTML only) and then print as pdf it prints everything just fine - but you lose some minor markup.

|improve this answer|||||
  • PS: and when you mark/highlight the text you want to keep in the HTML - before printing - it also ignores the header & footer stuff. – Ragnar Von Lodbrok Jan 6 '18 at 20:29

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.