What's the best method for downloading a PDF from a sapUI5 App? - pdf

I need a 'Download PDF' feature for my SAPUI5 app which contains Viz charts (SVG's) as well as other more standard HTML elements.
I've already looked into jsPDF, html2canvas etc.
What is the recommended method?
It needs to work both as a Web app and also as a packaged Cordova app.

This has been somewhat answered here: Save Web page directly to PDF using JS
This method should work both in web app and as a Cordova app.
As mentioned there the best choice would still be to popup the "print to PDF" window (just as pressing ctrl+p in most browsers) and letting the user save it.
Cheers.

Related

Website template popup feature doesn't work after downloading

I am looking at a website template with themewagon. There is a modal feature using magnific-popup that works on the live web version to display a video in a modal.
https://themewagon.github.io/videograph/
However, when I download the template and open the index file from my browser, the video modals do not function properly.
Can anyone explain why this may be the case?
I used the theme online, but when I downloaded it, the functionality was not there.

How to prevent file sharing with Quick Look PDF viewer

I am using the QuickLook framework to display PDFs in my app. The pdfs are downloaded and stored in my apps sandbox, in the Application_Support directory.
Basically, I open the PDF in my app, no problems and then close my app.
Now if I open the Adobe App on my device, the pdf I was viewing with my app is available in
the Adobe app.
Is there any way of preventing this sharing of my pdf between my app and the Adobe App
Any help will be much appreciated
j
One solution would be to hide the right navigation button on the Quick Look Viewer nav bar.

JavaFX WebVIew - PDF on popup window

I have posted some other smaller questions regarding the problem I describe below and got some feedback but now I will try to explain it in more depth hoping to get through the problem.
I built a desktop application using JavaFX 2.2 which uses a WebEngine to access a website built using Oracle ADF Pages. The application tracks the users actions on the pages and stores data to a database. All fine so far until the point where I need show a PDF file on a user click.
On the actual website the user clicks a button and a new popup window opens up that displays the PDF.
My problem is that due to the lack of PDF support in JavaFX I cannot display the pdf. The actual link to the PDF is dynamic and it doesn't have a .pdf at the end of it so I can't use the actual URL to send it to an external bowser or something to display it. Additionally the connection is secure so I can't open the URL with Chrome for example.
Possible solutions I thought about are to read the binary data of the response from WebView and create the PDF file locally and then open it using Adobe of Chrome or something. Is that possible at all?
Another solution I thought about (while I am writing this question) is maybe to open the URL which the users default browser but how can I go about sending the secure connection cookie from the application to the browser.
Is any of the above even possible? Am I missing something?
Any help, clues, links, ideas would be very much appreciated.
Thanks
I think the best way to do what you want is to download the PDF and display it locally.
Downloading using WebView sounds like it could work but I'm not familiar with the user experience. As an alternative try using curl or wget. You can pass in the authorization cookie to those tools and use them to download the file

How to embed an office document in a Metro App?

Is it possible to embed an office document in a Metro app without having to parse it manually?
I'm thinking about a preview or even a the possibility to make small changes to it. I'm not asking about starting it externally but using it directly in a Metro app.
You cannot embed directly into a Metro style app. It may be possible to do something with the Skydrive API and embedding documents, but more research would be required. Here is an example on using the Live SDK from a Metro style app.
I would just use webview controller and open the document from Skydrive with it.
That way you can open the document as editable or just show it.

PDF and Titanium SDK

I'm trying to make a app which is able to display PDFs. It should be possible to click web links within the document and dynamically load new PDFs into the app.
The file download and REST/JSON communication shouldn't be a problem but the PDF part looks kinda hard. Is there a way to display PDFs via the Appcelerator Titanium SDK?
This is app is targeting the iPad and iPhone.
You can show pdf files using Titanium.UI.WebView