How to save screen shot of a web page? - macos

I want to save screen shot of a web page.But I don't know how.Just like the app delish.In delish ,when i add a bookmark ,the app capture the website and save it such as p5.delish.I guess the screenshot comes from the file of the ".delish".How can i produce this file? or some one has some samples like this app? Thanke you very much!

This might help you: http://allseeing-i.com/ASIWebThumbnail/
ASIWebThumbnail is:
A command line tool for generating thumbnails from web pages
An API to use an embedded version of the tool in your Cocoa applications
ASIWebThumbnail uses the WebKit framework built-in Mac OS X to render web pages. As such, it should support any content that WebKit supports, including HTML/XML + CSS, SVG, content rendered by Javascript (Canvas, AJAX, DOM etc), Java, as well as Flash and other plugins.

Related

Phonegap and windows phone native frame transition

I'm trying to find some docs to learn how to make phonegap app for windows phone, using native frame transition for HTML pages, but I cannot find such a plugin or code or any helpful doc.
What exactly I want to do is:
when I try to navigate to other page in HTML code using javascript code:
window.location.href = "newpage.html";
I want my app to navigate to different page like native app is doing transition effect, for example when app start we can see this page/frame transition effect.
How to do that transition effect for HTML pages ?
You should look at using jQuery Mobile to build HTML pages for a Phonegap app.
http://jquerymobile.com
It's useful because it has a built-in router, which can detect when you try to change to another HTML page. (either programatically or via a user clicking on links)
It then can hijack that event and make it load the next page asynchronously (which in the case of a Phonegap app, is pretty fast since the pages already exist on the device). It then applies the transitions you speak of when it displays the new page (slide, fade, etc).
It's quite customisable, and most of the behaviour is configured by just creating simple HTML markup and adding data attributes. E.g.
next page
I also like it because if you decide you want to go down the "single page app" route - you can do that too. I personally like the combination of Phonegap + jQuery Mobile + Backbone.js, where Backbone.js is dynamically generating my HTML jQuery Mobile pages, and Phonegap is wrapping them up in an app.

How to handle downloads in mobile site

How does one handle image downloads in a mobi site - using jquery mobile and asp.net mvc 3 and have a requirement to allow a user to download wallpapers to their mobile.
Can you trigger a download or is best to simply simple the image to them and let them handle the saving?
Any input appreciated.
Typically, you can force the download of content on standard browsers by setting headers
"Content-Disposition", "attachment; filename=\"LicenseAgreement.pdf\""
on the return. This SO shows how to return a PDF file but theoretically, you could do the same with an image.
How can I present a file for download from an MVC controller?
However, it is questionable if every browser that is supported by jquery mobile would even respect that and give any kind of a save prompt or just open the image in a new window. Give it a shot but test it on iOS, Android, WinPhone 7.5+, and (gagging) Blackberry 6+ and see what happens because they're probably going to all behave a little differently.
Were it me, I'd simply link directly to the image either on the current page or with a target="_blank" and let them save it however they usually save images.

WebKit shell browser for internal web application

I am creating an in-house web application that I want to run in a WebKit shell browser on the Mac. I searched and came up empty. Basically, I want the site rendered and shown in a window with no chrome for navigating to other pages, bookmarks, etc. Seems to me that there should be a relatively easy way to get something like that up and running in Xcode, but alas I don't know how. The more barebones the better. Anybody know the answer?
Not sure if this is what you're looking for, but you could use a WebView. The content is rendered by Safari/WebKit.
As for chrome, if you just put the view, that's all you'll have. You can shape the rest of the User Interface however you'd like.
Apple's documentation has a couple of examples using WebView... Should this solve your problem.
Did you take a look at the phonegap mac project.
Its a full screen webkit without any chrome in which you can put your html / css / javascript to run:
https://github.com/callback/callback-mac

opening swf files using WebKit framework

Can any one tell how can i open an swf file using WebKit framework. Please specify the link which specify instructions to do the same.
You can't open an SWF with WebKit.
If the Flash plug-in is installed on the system, a SWF file can be loaded by the Flash plug-in if an HTML page which contains the appropriate embed tags is loaded into a WebView. If all you want to do is display Flash content, you should construct an HTML page that contains the appropriate HTML tags and load it into your WebView.
Note that because the Flash plug-in is not garbage-collection supported, the plug-in won't work if your application uses garbage collection.
If you actually need to open and manipulate the contents of an SWF file you'll need to do it yourself.
If you want to play Flash content without a WebView you can use the commercial FlashInApp framework, but again it won't work with garbage collection.

WebView PDF Page Jump

I have a WebView that displays a local pdf file. The file is 230 pages long and loads fine etc. I need a way for the user to jump to a specific page if I can. For instance if they look at the table of contents of the pdf and they want to jump to page 120, they can do it? Any ideas on getting this done?
You're asking questions about using the Cocoa Touch APIs in the iPhone SDK, but you're tagging them "Xcode." Xcode is the development tool, not the platform or the API; you will probably find a better audience for your questions if you add the "iphone-sdk" or "cocoa-touch" tags.

Resources