I am currently working on an IOS app that allows users to view docx files within the app. These files have links inside them that link directly to outside sources, such as youtube videos.
The issue is that when any of these links inside the file are clicks, it gives this error and does nothing. Error Image
However, if you load up a file, press and hold the link, click the "share" button, and then click cancel, the links will work fine after that.
To load in the files, i'm using the Document Controller class.
Is there any way to dynamically detect when links inside a file are clicked, and then perform an action (such as open the associated url)?
Related
How to directly download and save a file by button click using Splash Lua?
Example page and the download button:
Conditions:
The download URL is generated dynamically upon button click
Clicking the button will open a "Save As" prompt window to save the Excel file
I am using a Splash docker service on localhost:8050. I write Lua script directly on the page.
I have searched the official docs about binary download, but the closest things I have managed to find were html:jpeg, html:png and response.body, which didn't quite seem to hit the mark. I also found no explicit examples or tutorials on Youtube.
Note: Please do not give workarounds such as using Selenium. I am only interested in how to do it with Lua.
My Edge extension creates PDF files. What's is the best approach to provide a download capability for these files in my extension? I tried:
window.navigator.msSaveOrOpenBlob()
create link dynamically and assign data URI to the HREF field
this approach: http://html5-demos.appspot.com/static/a.download.html
None of these ways seem to work. The "Downloads" API is not available at the moment. Using the Flash script to download the file is not the best solution (it requires Flash to be enabled).
Ideal scenario is: user clicks a "Download" button, and a "Save as" dialog appears. So how do I do that in my Edge extension?
I need to individualize documents within an iOS-App. I could provide the origin-documents as DOCX, PDF, PPT etc. The output-format has to be PDF.
My minimun requirement is to fill some text-fields. Nice to have would be to replace an image, too.
I´m quite used to generate PDFs programmatically using UIGraphicsBeginPDFContextToFile etc. But in my current case I don´t want to create the whole document programmatically, I just want to replace some content.
Any hints / tipps?
Thank you in advance.
DOCX is a zip - format file so you can process the contents programmatically and the reconstruct the zip file. PPT is a binary format though newer versions of PowerPoint might also construct zip-oriented versions that you can programmatically process. You mentioned though that you need don't want to programmatically process these documents - which I would probably also do only as a last resort.
For your DOCX origin/source documents (or doc,odt,rtf but not ppt/pdf) you could use Docmosis cloud services if your app can have the external dependency. You would upload your DOCX origin documents with placeholders for text-fields or images as a one-off/occasional task. Your iOS app then calls Docmosis sending instructions and data to create the output PDF and either stream it back to the app or email/store it or both.
The upside is it takes all the load and coding away from the iOS application (there is an SDK). The downside is it is an external depdendency. Please note I work for the company the created Docmosis.
Hope that helps.
Why not just load a page in a webView modal that points to a URL of a page you create? The main parts of the page would be static, and then the fields you need to customize would be populated via Javascript or PHP.
For example, we have a contact form in our app that gives you an option to view the details of your completed form after you submit. When the user clicks on the button to view the Contact Confirmation, it loads example.com/confirmation.php in a modal view within the iOS App.
On the confirmation.php page (on the web), I use PHP to pull in $_GET variables from the URL parameters which then populates the page with my static content, and their customized information that they entered into the form.
I do have a UIWebview inside one of my UIViewControllers. The destination URL to be displayed within the WebView is a page on my server (therefore I have access to make changes on it).
That page basically has a list of PDFs to be downloaded (imagine an un-ordered list of hyperlinks each pointing to a PDF file).
I need a way to tell my App that whenever a file is downloaded from that WebView by clicking on one of the links, I need it to be saved inside my application folder instead of the iPhone/iPad memory.
Is there any way I can achieve that? Are there alternatives?
You can allow UIWebView to call your Objective-C delegate function. This link provides an overview of how to do it: http://dblog.com.au/iphone-development/iphone-sdk-tip-firing-custom-events-when-a-link-is-clicked-in-a-uiwebview/ Basically, the delegate function will be called on all requests from the UIWebView. You can examine if they are for links to a pdf files, and if so, write your own objective-c code to download the file and store it in your Application directory. You'll probably want to add some UI to let the user know what is happening. Otherwise you let the request go on as normal and it will be displayed in the web browser.
I've been using Indesign to create some brochures. I export them as SWF to display them as a flip book.
The next step I want to take is to put hyperlinks on each product in my brochure so that when a user clicks them the item gets added to their shopping basket, or something similar.
First I tried using a hyperlink value of ?product=code, but as there's no http://, whenever you open this link it just opens a blank tab.
Secondly I tried a hyperlink value of http://linktosite.com/flipbook.php?product=code. This worked fine but as the users may want to order several products from the catalogue they're going to click on a lot of the links, which will in turn open up loads of new tabs in the browser.
My question is: Is there a way of passing hyperlink values through the same page the SWF is on? I don't want the links to open a new tab everytime.
How can I achieve this?
Indesign cs5.5 has new feature called 'web viewer'in windows/extensions/overlay creator. This let you browsing another website in indesign file.