Print dialog being displayed by default on loadDocument

62 views
Skip to first unread message

Alex Storey

unread,
Aug 17, 2015, 5:55:57 PM8/17/15
to PDFTron WebViewer
WebViewer 2.0.0

I have unexpected / unwanted behavior when loading an XOD file.
The Print dialog appears by default when a document is loaded.
I've tried this with multiple documents and multiple browsers and the behavior is identical.
I've found no way to stop this behavior.

How do I stop this behavior?
I just want the document to be displayed without the print dialog appearing when the document is loaded.

I created a simple HTML file to test the issue (see below);

<!DOCTYPE html>
<html>
    <head>
        <title>WebViewer Test</title>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <script src="http://code.jquery.com/jquery-1.7.2.js" type="text/javascript"></script>
        <script src="lib/WebViewer.js"></script>

        <style>
            html, body {
                height: 99%;
            }

            #viewer {
                border: 1px solid blue;
                overflow-y: auto;
                height: 98%;
            }
        </style>
    </head>
    <body>
        <div id="viewer">
        </div>

        <script type="text/javascript">
            $(function() {
                var viewerElement = document.getElementById('viewer');
                myWebViewer = new PDFTron.WebViewer({
                    type: "html5",
                    path: "lib",
                    documentType: "xod",
                    streaming: true
                }, viewerElement);

                $(viewerElement).on('ready', function() {
                    myWebViewer.loadDocument("newsletter.xod");
                });
            });
        </script>
    </body>
</html>

Matt Bojey

unread,
Aug 28, 2015, 1:10:00 PM8/28/15
to PDFTron WebViewer
Hi,

Unfortunately, we are unable to reproduce the issue with the HTML file you have provided.  Are you able to reproduce the issue in an unmodified version of the WebViewer?

Matt
Reply all
Reply to author
Forward
0 new messages