Printing without print screen - google-chrome

I am trying to create a custom web app that will be run from specific locations. I would like to print without any preview and preset screens (basically all the settings need to be saved beforehand on the browser / in the code) so that the user clicks on "Print" and no windows are opened, but the paper gets printed. How could I do that?
I was thinking of using an iPad as the hardware but am open to other solutions.
Thanks a lot in advance!!!!

Related

How to open a the kiosk mode through a link on a website

i have a problem. I want a page to open in a Firefox Kiosk mode through a link on a website. I am creating a website for schoolchildren through which it should be possible to take exams. The test pages for this should only be opened in kiosk mode to prevent cheating.
I hope someone has an idea.
Greetings
Nothing inside a webpage can trigger Kiosk mode.
(It would be pretty awful if it was possible as any website could lock users into the browser and prevent them from quitting or using any other application!)
If you want to prevent students from using other applications (or webpages), then launch the browser in kiosk mode from the desktop.
If you want to prevent students from accessing data built into the webpage that would enable them to cheat (such as "This is the correct answer" values on checkboxes) then don't put that data into the page in the first place. Use tokens (such as "answer number 1") and resolve them server-side.

When designing website is opening new tab as bad as a popup window

My web application is mimicing the UI of my desktop application, flow is as follows
Select Task in browser window
Change any Options and then start
Show Progress in same browser window, the progress bar goess back to server every 5 seconds checking progress.
When task has completed we show report in new tab
and go back to Select task Window,
this is done by running following Javascript in progress page
window.open('/start','_self'); window.open('/reporturl','_blank');
This works fine on my PC but when trying on Safari on OSX and on Android phone and iPad one of two things happen
The progress page becomes the start page but the report page is not opened in tab
The Progress page becomes the report page
My question is does opening window in new tab with _blank have all the problems of using popup windows. If so should I modify my prcoess so that at stage 3 it just displays report page, and then add a back button or navigable footer to the report to allow user to get back to start page ?
I can think of some options you could use instead of new tab.
Modal with Ajax
-- With jQuery it is posible to open modal
dialogs they can be populated with html (or other data) fetched with ajax (async). I am a big fan of these and use them all over my projects. Users will not be annoyed with pop-up warning messages, etc. Once the content is read (or whatever) the user can simply close the dialog. (If I had to make your app I would certainly implement this).
Besides the jQuery dialogs, other modal/dialog scripts are out there. Check out Bootstrap Modal if you like it modern.
Serve report as download
-- Depending on what the user can/will do with the report, it might be interesting to write the report page in a way that it sends back a .pdf file, or another type of file, as download. Loading the URL in a new tab will now always start a download. Triggering this from JS without user interaction might be a problem though (same as with pop-up / new tab). Adding a button to trigger the download on complete will solve this.
I know the question was about the use of tabs.. But try to avoid it. Browsers handle it all in their own way. And many users get confused when suddenly stuff is opening in tabs when they did not ask for it. In case of pop-ups, it is possible for users to turn them of or convert into opening a new tab from within the browser settings. If they have been fiddling with browser defaults, you'll have troubles of keeping the 'flow' of the app the same for all users (and cross browser).

Java - Libgdx : Save & Load a screen

my game is about stories, you make choices and it will lead you to other screen like a novel in which you are the hero, I realised I need a save system, I want to save the last screen a player was on and load it when he click on load button in main menu :
like this
I found the class FileHandle but I don't know how to link it with my gamescreens. How am I supposed to code "save the last screen the player is on" and "load the last screen the player was on"
Thanks for your knowledge sharing
You should have a look at the libGDX wiki.
Specifically:
File Handling
and
Preferences
If you only need to save the last page the user was on, Preferences might be your best option. You can easily save primitive data types, such as the index of the last screen, or the title, or however you have your content set up.
use the Preference to save the game state in libgdx . which will store the data in devices internal memory. by using the preference you can save anything say example the score of the player. I have answered for the same kind of question in below link .please go through it once. I hope you will get the solution.
Creating an Android save file on the local storage of the device?

Can I run different versions of my website based on detection of mode

I would like to create one website. This website will have behave differently if I am viewing it at a specific event via a kiosk. The kiosk, will just be an iPad. I believe I can figure out how to lock down the iPad to act like a kiosk and just show my website based on this http://www.webascender.com/Blog/ID/447/How-to-Setup-Kiosk-Mode-Lock-Your-iPad-to-Just-One-App#.U9Fx3oBdVX4
But what I am asking is, in code, is there a way to detect that I am in 'kiosk' mode and show different pages? For example, if you are at home(or anywhere that is NOT the event) you should be able to hit my website to find out all about my company and to view your existing profile. You should be able to see these same pages on the 'kiosk'(the iPad while at an event) but you will now see additional pages such as pages dealing with the specific event and payment pages. Vice-versa you might be able to see additional pages on the website while at home that you will not see while in 'kiosk' mode.
I do not know if the solution is tools/language dependent as we have not settled yet on all tools/languages/frameworks we will be using to build the site and so I am open to all but we will definitely have some javascript/css/html.
I believe you will need to write a native app in order to detect whether you are in 'guided access' aka 'kiosk' mode.
Taken from Detect or react to Guided Access?
NSLog(#"Accessabilitiy enabled: %#", UIAccessibilityIsGuidedAccessEnabled() ? #"YES" : #"NO");
if (!UIAccessibilityIsGuidedAccessEnabled()) {
// show something since I'm not in guided access
}
If you want to know when it changes...
[[NSNotificationCenter defaultCenter] addObserver:self selector:#selector(guidedAccessChanged) name:UIAccessibilityGuidedAccessStatusDidChangeNotification object:nil];
- (void)guidedAccessChanged
{
// do something when guided access changes
}
If you must work with a website then what you can do is write a native app that embeds a UIWebView. This class allows you to show websites within a native app. So, what you could do with this method is pass along the guided access setting to your website so that it can adjust itself accordingly.
If you know the IP address you can direct views using PHP (and probably a host of other programs). Or you can lock the iPad to only open a specific URL (http://mysubdomain.mydomain.com) and only have pages that you want viewed by the kiosk. I'm sure there are a mess of other ways too.

html5 save edited content as image or pdf

(I'm new to this)
I want to create a html5 page/application with text boxes to be filled out.
My objective is that once the user has completed filling out the empty fields they can hit one button on the webpage to save the content (including all pictures, texts, and the fields they completed) all as either an image or even pdf for printing later.
Also note I'm doing this for mobile platforms, so I want the user to be able to store on their device after editing from their device. So options such html to pdf converter sites aren't usable.
Anyway this possible? Thanks.