Platform-independent printing - ios

I am working on a project that requires printing to work across platforms of a fairly complex form with fields that get filled out. I currently have an iPad version of it, which prints beautifully and works well. I am however worried as this works by designing the form in IB, then filling it with a UIViewController and then printing it. However, the app will have to get a web version in the very near future and it is incredibely important that whatever the device I use to print the form, it must look the same. This seems like an impossible task so I was wondering,
Do you know of a way how I can print a complex form that was originally designed in IB from web (and possible Win or Mac apps) so that it always looks the same on paper?
Thanks

Related

How to show tabular data in a nice and practical way

My iOS app is a mobile version of a management program I had developed for a company as a desktop application. So its main tasks are saving data in a database and retrieve them when needed with the option to edit them. So I guess that the GUI is mainly composed by forms to fill in and tables to show data. So I am asking you if you could link me some tutorials or give me some tips on how to realize them in a nice way but not too complex. I'd rather avoid simply creating a blank view controller and inserting labels and text fields without a minimum of criterion. I am very new to iOS and XCode and, as I have not too much time, I am asking directly your opinion instead of spending hours in looking for tutorials.
UPDATE!
I mean that I would like to get something similar, for a mobile iOS device, to the following screenshots (from the desktop application I mentioned above)
Seems that you need a grid control to do it.
You can develop your own, or use existing library.
I have very good work experience with Infragistic http://www.infragistics.com/products/ios/grids/grid-view-layouts, but maybe DataForm from Telerik will be better in your case http://www.telerik.com/ios-ui/dataform

Safari & Chrome freezing when focusing a Select in iOS

I have a reoccurring problem with Safari and Chrome on iOS freezing when a Select is focused. I've seen some older posts about this but with no resolutions.
I have a page with a fairly high number of HTML inputs and selects. I tried to design the page in a way to use DIVs that look like inputs to lower the overall count, but some of them are still needed.
Here is the page in question:
http://www.pokedit.com/pokemon-maker/index.php
The page doesn't always freeze when focusing, but when it does, it's for a long time and the browser usually crashes.
Info:
There are some selects on the page that are display:none or inside hidden DIVS. Some of those can be revealed by changing different toggles.
There are no input type="hidden" inputs on the page.
The freezing problem does not happen in Android, Windows, Mac, or Ubuntu in any browsers that I've tested.
Since Apple is an amazing company and designs their software well, you're going to have to compensate by heavily altering your design even though it works fine in every other modern browser. Think of iOS as the EI 6 of our time. It's sure to leave a legacy.
Now it's back to the drawing board for you and anyone else with this delightful technicality. You're going to enjoy wasting lots of time writing code to do things with basic functionality that selects and inputs are already supposed to do. That will ensure your pages can load just a smidgen slower whilst wasting a bunch of time and effort writing extra code for no reason at all.
Special thanks to Steve Jorbs.

corona sdk html layout view that works in Simulator for help/doco presentation?

What's the best way to display formatted static content to a user in Corona SDK? For example for your help page. So my specific requirements are:
needs to support Simulator (to iterate during development and
seeing layout)
support passing a string variable with HTML (i.e.
doesn't need to be a file or a www url)
be placed within a
newScrollView to be scrollable
Anything available to do this?
Background:
The newWebView doesn't seem to support the above hence my question. I get this on my Mac when building the WebViewPhysics sample project.
native.newWebView() does not work in the Corona Simulator. Please build for device (or Xcode simulator) for this sample to work properly.
Wanted to avoid having to use multiple newText() type elements, then having to reposition them etc. The content will have some static and dynamic components to it.
Also using HTML would make it useful to be able to the email the page too (e.g. like a report).
I don't know of such thing, hopefully someone else does, but here are some ideas to consider:
Interpreting HTML string is pretty heavy compute compared to displaying a plain text, asking corona app to do this many times a second, for full HTML string even if just one character chagnes, may cause flickering, assuming such component even exists.
Two options that I see:
Create a multi-text display group where each member is one line, and each line is a group of display text objects. Then only update the text objects that change.
Create a mini local web server in your corona app, would just have to open a socket and listen for HTTP get then push data to the "client" javascript (running in the native webviewer in your corona app). This is a bit twisted, admittedly.

Light weight datagrid component for flex mobile\iOS?

I know that we do not have a table\datagrid component for flex mobile apps. Currently I am developing an iPad app, in which I am using datagrid(though it says it's not optimized), which works quite well on iPad. There were no scrolling issues(which I felt would be present). But only problem is while switching the tabs below, it takes very long time to move from one tab to another(it just hangs for few seconds before moving). When i removed datagrid, it was working fine again. Switching was fast as expected.
Hence i do not want to really use datagrid. I came across an alternative which says to use List\DataGroup with itemrenderer. But not sure how we can display around 10 columns. We can use a list with a label item renderer and we can adjust the space between each column value, something like this:
data.firstColValue data.secondColValue .....
But with this, I will not get the datagrid's column width increasing\decreasing functionality, which is very much needed in this project.
Is there a way in which we can remove heavy functionality and retain only core functionality(which is needed here) from datagrid? If not, are there any other alternatives with which I can achieve desired result?
Apache Flex has accepted donation of Mobile Datagrid component, so you may expect to see the component baked into future release of Flex Framework.

Delphi printing primer

I need to add printing capabilities to an app and I have been looking around for information about printing. Logical/physical sizes, dpi, font scaling, etc, lots to digest since I never programmed printing into any app before.
Are there any sites that would offer a primer on the topics of page sizes, margins and all the other elements required to understand printing on Windows? I've been looking around for a while but what I find is either cryptic or years old...
I've been playing around with TPrinter, but I would like to build solid printing functionalities and understand what I'm doing better.
Using a report solution is not an option, even though I'm sure it would provide better results much sooner.
Two links to get you started:
Printing with TPrinter
Printing via the TPrinter Canvas
I think that you are looking too lowlevel.
Try looking at the build reporting tools (Rave or whatever is in your product).
Personally i am using a product called Report Builder from Digital Metaphors.
But if you want to do the lowlevel stuff lot og good information can be found at efg's computer lab - printing
Well, I have done things a variety of ways in the past, including the "hard way" with TPrinter. In fact, I recently had to do that again to run a special inventory label printer.
On the other hand, sometimes you are better off taking work others have done and using it for your benefit. I agree that ReportSmith isn't so great, and also it's Delphi (and Windows) specific. Using Excel or Word has those limitations, plus the fact that the user has to actually have them installed.
One thing I have done to make printing easy for some simple applications is just to generate an HTML file and call the user's web browser, then they can print it. HTML tables can be created relatively easily for numerical data, and you can include photos, etc. as well. This works well for some applications, and works on every platform where a web browser is installed. The downside, of course, is that HTML isn't the most precise layout language.
The version of Delphi you´re using is important. A number of Delphis came with print engines like ReportSmith (ugh). Another option thinking laterally is to use MS Word as a print engine. I´ve hooked into instances of Word & Excel before & utilised their functionality. As to raw printing using TPrinter or the print method of TForm you´d have to be pretty desperate. I seem to recall the Pacheo / Texeira Delphi books coming with a pretty good overview so you might want to see if you can find a copy of that somewhere.

Resources