I'd like to save an exact replica of a webpage in vector-graphics form, so I cannot use a screenshot technique (since that stores the image in a rastor-graphics form).

I've tried 'print to pdf' and 'save as pdf' through Safari, Chrome, and Firefox. This works most of the time. However, the pdf saved is not an exact replica for all webpages. For example, try saving this webpage as a pdf, and note how the upvote/downvote icons are not included in the saved pdf.

I've also tried saving as a WebArchive with Safari. Problem here is that I need to crop the resulting file, and I do not know how to crop a WebArchive, since Preview cannot open it, and it simply opens up in Safari (back to square one).

I've also tried web browser plugins that provide a one-click solution to save the webpage as pdf (vector-graphics form). This works better (exact page is saved) and almost solves the problem, except that these programs work by sending the page url to a cloud-based program to query and then save the page. This means that this technique will not work for https sites that need my credentials to login.

So I'm in a corner. I'm trying to save an exact vector-graphics replica of a webpage that needs my login credentials to view. How can I do this?