Browse Source

Add save as support for Firefox.

Brendan Dahl 12 years ago
parent
commit
3f4f056665
  1. 2
      extensions/firefox/components/PdfStreamConverter.js

2
extensions/firefox/components/PdfStreamConverter.js

@ -600,6 +600,7 @@ PdfStreamConverter.prototype = { @@ -600,6 +600,7 @@ PdfStreamConverter.prototype = {
onStartRequest: function(aRequest, aContext) {
// Setup the request so we can use it below.
aRequest.QueryInterface(Ci.nsIChannel);
aRequest.QueryInterface(Ci.nsIWritablePropertyBag);
// Creating storage for PDF data
var contentLength = aRequest.contentLength;
var dataListener = new PdfDataListener(contentLength);
@ -612,6 +613,7 @@ PdfStreamConverter.prototype = { @@ -612,6 +613,7 @@ PdfStreamConverter.prototype = {
.createInstance(Ci.nsIBinaryInputStream);
// Change the content type so we don't get stuck in a loop.
aRequest.setProperty('contentType', aRequest.contentType);
aRequest.contentType = 'text/html';
// Create a new channel that is viewer loaded as a resource.

Loading…
Cancel
Save