|
User #15538 10847 posts
Whirlpool Forums Addict
|
Hello all.
First let me say I have quite a bit of experience in formatting HTML for printing. I have made an application that needs to print 6 forms in total, 2 forms to a page. This is hard to achieve with HTML but I have pulled it off with okay results. It does really annoy me though that different browsers will print differently, and this has affects later down the line when it comes to doing OCR etc on the forms.
So, being reasonably sure I've pushed printing in HTML to its limits, I'm happy to seek alternatives with HTML being the fall-back plan.
What are the alternatives? Flash and Java (applets) spring to mind. What are they like with printing? At the moment I'm printing from a hidden iframe so the experience is seamless to the user. They click a print button, and then the print dialogue box comes up. They never actually see the forms that are to be printed. Does anyone know if this would be feasible with Flash or Java? I could put the Java applet or Flash movie in an iframe in a similar way.
What I want to achieve is to be sure that if a user is using A4 paper, the printout will look exactly as expected, regardless of operating system or browser.
|
posted 2007-May-8, 1pm AEST
|
|
|
|
User #36572 3566 posts
Whirlpool Forums Addict
|
Generate a PDF on the server and present that as a downloadable file. There's JavaScript out there that can trigger off printing of the said file. This will give you total control over the formatting.
There are many different free and commercial PDF generation frameworks for pretty much all server-side languages.
The other advantage of this approach is that the client has the ability to save the printed files as opposed to actually printing them. Think about saving the environment ;)
|
posted 2007-May-8, 1pm AEST
|
|
User #38306 22384 posts
Whirlpool Forums Addict
|
Mark^Bastard writes... What I want to achieve is to be sure that if a user is using A4 paper, the printout will look exactly as expected, regardless of operating system or browser.
Then you are best to go to PDF format. That is the only way you can ensure that it will print out the same no matter what system the person opens the document on.
|
posted 2007-May-8, 1pm AEST
|
|
User #15538 10847 posts
Whirlpool Forums Addict
|
Sorry, should have said that PDF is not an option for a couple of reasons.
1 - Don't want them to have to download anything. 2 - Don't want them to do any extra steps like going to File -> Print. 3 - Needs to be quick. PDF is slow. 4 - Don't want them to have to have PDF software installed just to do this.
It needs to be proper online printing. Click one button, print dialogue pops up. Verify print settings and then press the 'print' button. Paper spits out.
|
posted 2007-May-8, 1pm AEST
|
|
User #38306 22384 posts
Whirlpool Forums Addict
|
Mark^Bastard writes... 1 - Don't want them to have to download anything.
You can launched the PDF inside the browser if you want to.
2 - Don't want them to do any extra steps like going to File -> Print.
I think all alternative solutions will require the user to click something in order to print. I think HTML is about the only solution where you can make the Print dialog open automatically.
3 - Needs to be quick. PDF is slow.
So is Java applets, one of the alternatives you said that you would consider.
4 - Don't want them to have to have PDF software installed just to do this.
If you use a Flash solution then you are requiring them to have Flash installed. If you use a Java solution you are requiring them to have Java installed.
The only solution I can see other than PDF would be FlashPaper: www.adobe.com/products/flashpaper/examples
The user still has to click the Print icon though.
|
posted 2007-May-8, 1pm AEST
|
|
User #15538 10847 posts
Whirlpool Forums Addict
|
MisterEd writes... So is Java applets, one of the alternatives you said that you would consider.
Agreed, but in a different way. I could preload the Java applet and get around it. There's no getting around the slowness of PDF coupled with the way it slows down everything when loading etc. The need to manually print is the final blow.
If you use a Flash solution then you are requiring them to have Flash installed. If you use a Java solution you are requiring them to have Java installed.
Yes but I can easily and seamlessly revert to the HTML version if they have neither installed.
The only solution I can see other than PDF would be FlashPaper:
Awesome. That looks like another option to consider.
|
posted 2007-May-8, 1pm AEST
|
|
|
|
User #33607 12741 posts
Whirlpool Forums Addict
|
Mark^Bastard writes... 4 - Do
5. not everyone has PDF viewer.
|
posted 2007-May-8, 1pm AEST
|
|
User #33607 12741 posts
Whirlpool Forums Addict
|
Mark^Bastard writes... greed, but in a different way. I could preload the Java applet
not everyone has java installed.
so if this is public, ur really just jumping out of the frying pan into the fire.
|
posted 2007-May-8, 1pm AEST
|
|
User #15538 10847 posts
Whirlpool Forums Addict
|
MigA, both of your replies have been addressed directly.
|
posted 2007-May-8, 2pm AEST
|
|
User #33607 12741 posts
Whirlpool Forums Addict
|
Mark^Bastard writes... igA, both of your replies have been addressed directly
didnt read it all, where abouts?
|
posted 2007-May-8, 3pm AEST
|
|
User #137171 70 posts
Forum Regular
|
Maybe this will help? css printing: www.tufts.edu/webcentral/tutorials/printcss Grant
|
posted 2007-May-8, 3pm AEST
|
|
User #15538 10847 posts
Whirlpool Forums Addict
|
I will just give the Flash route a try and report back how it works. Hopefully there's a free lightweight Flash editor available.
|
posted 2007-May-8, 3pm AEST
|