0

I am using PDFtron Webviewer to show .xod file in web browser. Since my document server is different than web server, I have enabled CORS in my document server.

I have also configured "xdomainProxyUrl" while rendering PDFTron.WebViewer.

$(function () {
    var viewerElement = document.getElementById('viewer');
    var myWebViewer = new PDFTron.WebViewer({
    type: "html5,Silverlight,flash",
    path: "../../WebViewer",
    xdomainProxyUrl: "https://www.documentserver.com/$root/proxy.html",
    initialDoc: "https://www.documentserver.com/$root/MyFile.xod",
    enableOfflineMode: false,
    fitMode: PDFTron.WebViewer.FitMode.Zoom,
    layoutMode: PDFTron.WebViewer.LayoutMode.SinglePage,
    streaming: true
    }, viewerElement);
});

But now the problem is, when I run this page its asking for Open/Save dialog for proxy.html.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Can you try setting the streaming option to false or not setting streaming at all. In this case the streaming option refers to streaming of a XOD conversion directly to the viewer which will cause the file to be downloaded in chunks, but it will download the entire file up front. When this option is false then WebViewer will only download the necessary parts of the file as it needs them. Also try going through the xdomain tutorial at https://www.pdftron.com/webviewer/demo/tutorials/xdomain.html – mparizeau Jan 16 '15 at 00:24
  • Thanks for your reply @mparizeau. i have referred same link which you have posted. Still no luck. – Madhukar Hiriadka Jan 19 '15 at 03:07
  • Have you tried setting the streaming option to false? – mparizeau Jan 22 '15 at 17:50

0 Answers0