I want to read the pdf file from my website directly.
I want to read the pdfs in my web site, with hide print, download ...etc. How can I do that?
Customer
-----------------------------------------
The first, your HTML code is contain APIKEY, please don't contain APIKEY into the HTML code, because this will public your APIKEY to others.
We suggest you may by following steps to solve this problem,
Step 1:
You can call following URL to download your PDF file to VeryPDF's file server,
http://online.verypdf.com/api/?apikey=XXXX-XXXX-XXXX-XXXX
&app=putfile
&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/BadFile1.pdf
You will get a new URL, like this,
[Output] http://online.verypdf.com/u/public/api/20140504-230842-0803179324.pdf
If you have already subscribed the VeryPDF Cloud API Platform, your PDF file will be placed to your personal folder, e.g.,
[Output] http://online.verypdf.com/u/1234/api/20140504-230842-0803179324.pdf
This is a permanent URL, your PDF file will be kept on our server forever.
Step 2:
You can use this new PDF URL to replace the PDF URL on your server, you can view this PDF file with following URL, this online viewer is hide some buttons,
http://online.verypdf.com/app/reader2/web/?url=http://online.verypdf.com/u/public/api/20140504-230842-0803179324.pdf
&noopen=1&noprint=1&nosidebar=1&nofullscreen=1&nodownload=1
&noviewbookmark=1&nofind=1&nomoretools=1
Step 3:
You can insert this new URL into a iframe, like following code,
<iframe style="border:medium double rgb(250,0,255)" height="475"
src="http://online.verypdf.com/app/reader2/web/?url=http://online.verypdf.com/u/public/api/20140504-230842-0803179324.pdf
&noopen=1&noprint=1&nosidebar=1&nofullscreen=1&nodownload=1
&noviewbookmark=1&nofind=1&nomoretools=1"
width="1000">
</iframe>
We hoping this way will useful to you, please to try.
-----------------------------------------
If you wish Use VeryPDF Online PDF Viewer to view the PDF files on your server directly, you need to allow Cross-origin Requests in the PDF hosting domain, so that it allows requests from the VeryPDF Online PDF Viewer domain.
If you can't do that, then you can't do Cross-origin requests, because of security concerns.
The PDF file is requested through a XMLHttpRequest so all the usual cross site scripting rules apply. There are a number of ways to get around this such as a proxy running on domainA see http://en.wikipedia.org/wiki/XMLHttpRequest#Cross-domain_requests for more options.
VeryPDF
Relevant Articles:
Enabling Cross-Origin Requests in ASP.NET Web API,
http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
http://en.wikipedia.org/wiki/XMLHttpRequest#Cross-domain_requests
http://enable-cors.org/server_aspnet.html
http://msdn.microsoft.com/en-us/magazine/dn532203.aspx
http://msdn.microsoft.com/en-us/library/dn535601.aspx
http://www.c-sharpcorner.com/UploadFile/2b481f/enabling-cross-origin-request-sharing/