How to load a Single Page Application from a file? - html

I'm trying to build a single page application that can be viewed offline, and that can be packaged (preferably as an HTML page), and emailed out. It needs to be able to load from the file I email out, but not hit a server at all on load time. It can load JS libraries from their servers, but the page itself will not be hosted anywhere.
This seems like a simple problem, but I'm having trouble exporting my current spa site into a static format that can be emailed.
Currently the site is built in ASP.NET MVC 4 as a WebAppSPA. The application is a bunch of graphs built from data in a JSON file.
Thanks in advance for the help!

Related

RShiny Output as HTML or PDF

Originally, I built a shiny application that served as a dashboard for clients. However, my team later determined that, rather than having a live dashboard that clients can log into, we would simply send pdf reports. I have been trying to determine if there is a way to convert a shiny page into a static html file (or even better, directly as a pdf) in a fast and convenient programmatic way as there are hundreds of pages that need to be saved (one for each client).

Dynamic PDF Generation from Salesforce Data

I'm looking for some recommendations on a solution to build dynamic PDFs using salesforce object data. We currently have a layout designed in photoshop, that we're looking to import into Salesforce and fill in various snippets/images based on data that lies within an object. The final product should come out as a PDF
I started building this using Adobe XFDF. I exported the PSD as a PDF and created a fillable form from it. This was then populated from an XFDF file generated from Salesforce. This does work but the design issues with fillable forms, requirement for acrobat pro on every system that uses it and the lack of support for referencing file templates that are not local have killed this. One of these issues alone wouldn't be deal breakers, but all 3 combined are too much to overcome.
While this is mostly all sorted out on the Salesforce side, I'm not sure of the best way to proceed with this when it comes to PDF generation, here are a couple of ideas that might work, but I don't have enough experience to be sure:
Generate HTML/CSS File from PSD file, upload to salesforce, modify html file within salesforce, send to PDF generation API - adobe api looks promising for this, but can I send over html and css files together to generate a single PDF?
Use Salesforce PDF tools to generate PDF, will need to modify visualforce page to the same design as reference design in PSD.
Use some sort of third party PDF generator tool that will allow me to reference my current design as a template.
I'm open to any suggestions, Thanks!
In salesforce, PDF can be generated without using any app. Check out the official document by Salesforce.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm
A quick start guide How to generate PDF in Salesforce
It does not require any purchase or separate license. If you are looking specifically an App, it can be found on app exchange.
https://appexchange.salesforce.com/appxSearchKeywordResults?keywords=pdf%20generator

Is there a method to access hidden files from ASP.NET Server?

I'm trying to create a mobile application for my school's Gradebook system, as their current website design is quite unattractive. I don't want to scrape the information directly off the HTML in the website because it seems slow and inefficient, so I'm trying to figure out how to retrieve the raw data that the website retrieves before displaying it as HTML content.
The website will call something like https://.../RetrieveReport, and an HTML page will immediately be returned to the client side. I'm wondering if there is any way to peer into the handler on the asp.net side to understand where it is getting the raw data from. Please let me know if this is possible. Thanks in advance :)

PhoneGap store HTML Files on Device

I have to build an App for Windows Mobile and iOS. So I decided to create this with PhoneGap.
The app should only display HTML-Files.
These files are stored on a server and can change every day.
So I created already an API which delivers the files.
My solution would be:
In my PhoneGap-App I use AJAX to get the files (this is no problem and should already work...).
To the question:
How can I store the files on the device? Is this possible with PhoneGap?
The app have to work offline too (because of this I need to store the files)...
And if this is possible: It should sync only the differences (between device/app and server) --> keyword rsync??
Thank you for your help!
Emanuel :)
Have you checked here?
You can definitely store files locally on android platform.(I have already done that). However, I haven't done it on IOS.
So please investigate, if features I gave the link above, available for safari (IOS).
Synching only diff should be implemented on the server side and should be responsibility of your API.
Yes you can store files locally.
I would recommend the Phonegap File Transfer plugin for downloading files. It supports iOS and Windows phone 7 and 8 and can download and save the file locally. At the Cordova file plugin github you can see the paths where you can save the files for iOS, I haven't found a table for windows phone yet.
But I would not recommend you download the HTML files since they can be very big. You should dynamically create the mobile pages you need, since you would only need to download the displayed text and attributes for some HTML-tags.
The way you can do this is by having a server back-end where you can change the content of the pages. The plain HTML should then be saved in a database with a creation and modification timestamp(needed to check if you have the latest updates). You would then pull the data out of the database with your PHP and echo it as a JSON. Your app just has to make a AJAX-GET request to the server and save the data locally in a database. I would recommend the Cordova SQLite Storage plugin for the local database. Whenever a page is opened you should dynamically create a mobile page.
This way your app doesn't request huge amount of data from a server, which can be more appealing to your app users.

Generating a web site from xsn files

As we all know, the infopath forms service residing on a sharepoint server generates a web site each time we publish an inforpath form template to the sharepoint server.
Here is the question: how does sharepoint do that. Is there any way for us to do that programmatically via some kind of api provided by MS?
In fact, what I need to do is getting all the html, js, css etc. files and applying some kind of operations like deleting some divs or insert some html code into the particular web page. I have come up with two ways to do this.
Generating the web page via sharepoint api and apply those operations at the same time
Extracting the web page files from the IIS server and apply those operations
I am totally new to this kind of work. All in my mind is that each time we right click on a web page in the browser and choose to save the web page, the browser gets some of the files we need to render the web page and makes it possible for us to browse the web page offline.
httrack
WinWSD
and tools like that seems to work fine with extracting html files from online web pages but not that well with js, css files.
Now I am trying to dig into the chromium project for some kind of inspiration, although whether it helps or not is unpredictable.
Any kind of advice will be appreciated.
Best Regards,
Jordan
Infopath xsn files are just zip files with a different extension. you can rename the extension to .zip and extract out the files. you will find a number of files that make up the form. the two main ones are the .xml and .xsl files. the .xsl will have the html to generate when applied to the xml.