I have demo project of PDFTron and also have Booking.pdf on same project location on my local.
I write following code for load PDF into PDFTron
<html>
<head>
<script src="jquery-1.7.2.min.js"></script>
<script src="lib/WebViewer.js"></script>
<style>
#viewer {
width: 1024px;
height: 600px;
}
</style>
</head>
<body class="page-reader">
<div id="viewer"></div>
</body>
<script>
$(function() {
var viewerElement = document.getElementById("viewer");
var myWebViewer = new PDFTron.WebViewer({
path: "lib",
type: "html5",
documentType: "pdf",
initialDoc: "Booking.pdf"
}, viewerElement);
});
</script>
</html>
Now Question is when I'm trying to load pdf/xod file from local directory it's working fine, But suppose I want to get PDF file from other server e.g : http://serverURL/Booking.pdf that time I include server path into initialDoc: "http://serverURL/Booking.pdf" then it's giving error to me.
Error is network error or not found.
How can I load external pdf/xod into pdftron?
I referred following links to resolve the issue but I am not able to resolved the error.
http://www.pdftron.com/webviewer/demo/documentation.html
http://www.pdftron.com/webviewer/demo/doc/WebViewer_Developer_Guide.pdf
Please help me to resolve this issue.