I'm writing a Google Chrome Extension, and I need a way of saving the contents of the current page, whether it's an HTML page or a PDF page.
For HTML, I can use chrome.pageCapture.saveAsMHTML, however, this does not work if the current page is a PDF document. I've been searching for a way to dump the PDF from Chrome's PDFViewer, but I've found absolutely no information on it.
The one requirement I have is that I can't issue a second request, as the PDF is the response from a form submission, and a second request would re-submit the form causing duplicate data. This system is out of my control, so I can't change the behavior.