I have an app that displays me a website (uiwebview). In that website i have some LINKS that open me pdf s in webview. What do i want is... can i make, if i'm pressing on a link, pdf to download it instead of open it? Thank you.
Asked
Active
Viewed 144 times
0
-
Check out http://stackoverflow.com/questions/23825871/how-to-force-a-download-file-prompt-instead-of-displaying-it-in-browser-with-htm – donovantc Dec 09 '16 at 12:49
-
I don't think u understood my question.. :( – Just 4Fun Dec 09 '16 at 12:55
2 Answers
0
Could you perhaps put some code up? It might to understand your requirement a bit better

donovantc
- 151
- 2
- 10
-
So.. If I'm trying to open a .pdf file from my ios app, it will open a pdf, without a navigation control (no close/back button to my app - like in attached photo) https://postimg.org/image/8rtst9fv5/ – Just 4Fun Dec 09 '16 at 13:03
0
Cordova-PDFReader-IOS To install from command line:
cordova plugin add com.lesfrancschatons.cordova.plugins.pdfreader
Supported URI scheme: file For other schemes, please download it first with cordova plugin fileTransfer.
//Open a pdf
PDFReader.open('absolutepath.pdf', options, success, error);
//Available options
{
password: null,
flatUI: true,
showShadows: true,
enableThumbs: true,
disableRetina: false,
enablePreview: true,
bookmarks: true,
landscapeDoublePage: true,
landscapeSingleFirstPage: true,
toolbarBackgroundColor: null,
textColor: null,
enableShare: false,
page: 2
}
//Event when PDF Reader is closed
document.addEventListener('PDFReaderClosed', function() {console.log('closed');})
//Clear PDF Reader cache
PDFReader.clearCache(filePath, finishedCallback);

Hassan ALi
- 1,313
- 1
- 23
- 51