Alex E.
asked on
PDF Embed pdfobject.js local path problem regular ASP
We have this simply html regular asp page:
And the script can´t find the pdftoview.pdf to embed. If we put like this works:
Why is not accepting local routes with c:/... or how can be modified the code to accept local routes?
The problem we have is because that kind of code will be a part of a IIs application and if we use the ../ way to call we are limited to the path of the virtual directory of the IIs application and wee need to go to other directories outside the virtual path of the application of IIs. That is the reason. And create a web html to call the files we can´t do for security because the links will be exposed of where are exposed the contents.
Or if there is a technique to embed PDF to call via local directories no matter if it is asp.net c# or regular asp.
Thank you
<script type="text/javascript" src="pdfobject.js"></script>
window.onload = function (){
var pathcomplete = "C:/inetpub/wwwroot/pdf/pdftoview.pdf"
var success = new PDFObject({ url: pathcomplete}).embed("pdf");
};
And the script can´t find the pdftoview.pdf to embed. If we put like this works:
<script type="text/javascript" src="pdfobject.js"></script>
window.onload = function (){
var pathcomplete = "../pdf/pdftoview.pdf"
var success = new PDFObject({ url: pathcomplete}).embed("pdf");
};
Why is not accepting local routes with c:/... or how can be modified the code to accept local routes?
The problem we have is because that kind of code will be a part of a IIs application and if we use the ../ way to call we are limited to the path of the virtual directory of the IIs application and wee need to go to other directories outside the virtual path of the application of IIs. That is the reason. And create a web html to call the files we can´t do for security because the links will be exposed of where are exposed the contents.
Or if there is a technique to embed PDF to call via local directories no matter if it is asp.net c# or regular asp.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.