diff --git a/extensions/firefox/content/PdfStreamConverter.jsm b/extensions/firefox/content/PdfStreamConverter.jsm
index 35e6a6ca3..3a80620e8 100644
--- a/extensions/firefox/content/PdfStreamConverter.jsm
+++ b/extensions/firefox/content/PdfStreamConverter.jsm
@@ -1013,6 +1013,14 @@ PdfStreamConverter.prototype = {
 
     // Keep the URL the same so the browser sees it as the same.
     channel.originalURI = aRequest.URI;
+//#if MOZCENTRAL
+    channel.loadInfo.resultPrincipalURI = aRequest.loadInfo.resultPrincipalURI;
+//#else
+    if ("resultPrincipalURI" in aRequest.loadInfo) {
+      channel.loadInfo.resultPrincipalURI =
+        aRequest.loadInfo.resultPrincipalURI;
+    }
+//#endif
     channel.loadGroup = aRequest.loadGroup;
     channel.loadInfo.originAttributes = aRequest.loadInfo.originAttributes;