Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Firefox Internet Explorer Programming

Best Browser For Using Complex Web Applications? 347

yanyan writes "I'm fairly new to the field of web application development. Currently I'm working on a big online ticketing system for passage and freight for a local shipping company. It's a one-man show and the system is written in Ruby and uses Rails. Aside from the requisite functionality of creating bookings the system must also print reports and tickets, and this is where I've discovered (the hard way) that most, if not all, browsers fall short. I've had to switch from Firefox 3.6.3 to Opera 10.53 because of a major printing bug in Firefox, but the latest stable Opera is also giving me its own share of problems. To complicate things, an earlier version of Opera (10.10) doesn't appear to have 10.53's printing problems, but I'm wary. What browsers and specific versions do you end up deploying for use with big, complex web apps that include printing? Also consider CSS accuracy and consistency."
This discussion has been archived. No new comments can be posted.

Best Browser For Using Complex Web Applications?

Comments Filter:
  • by FuckingNickName ( 1362625 ) on Friday June 18, 2010 @07:46PM (#32620784) Journal

    Hahaha, I kid, I kid. If your interface is complex, why are you using HTML/CSS/Javascript/etc? Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java or *shock* the native environment?

    The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience. Google are excellent at marketing it as some sort of advance, but it really isn't. Don't shoehorn.

    • by amicusNYCL ( 1538833 ) on Friday June 18, 2010 @07:57PM (#32620920)

      Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java

      Java is 20 years old, Javascript is 15 years old, and Java is mature while Javascript is not? Does that extra 5 years really make that much of a difference? Was Java considered not mature in 2005? There are plenty of mature Javascript UI libraries around that developers can take advantage of (ExtJS/Sencha, jQuery, Mootools, etc). There are several use cases where Java is a pain in the ass and an offline application is not an option. A rich internet application implemented in Javascript is perfectly fine for many situations. There's no shoehorn involved when it's the best tool for the job.

      • by Anpheus ( 908711 ) on Friday June 18, 2010 @07:59PM (#32620946)

        For recent programming languages, 5 years is a lifetime. Compare Java now to Java five years ago, or Javascript now to Javascript five years ago.

      • by betterunixthanunix ( 980855 ) on Friday June 18, 2010 @08:01PM (#32620966)
        "rich internet application"

        Can you define that term? I have seen it used to refer to half a dozen vaguely related concepts so far, so it would be nice to know which one you are referring to.

        "There's no shoehorn involved when it's the best tool for the job."

        The web is not the best tool for every job though, which I think was OP's point.
        • by nixkuroi ( 569546 ) on Saturday June 19, 2010 @12:24AM (#32622462)

          I will be flayed alive, but Silverlight 4 is a "Rich Internet Application" framework and with the most recent version, they built in some very tight and effective printing functionality. That, in combination with the ability to pretty much lay things out exactly as you want, export to an image or text format, export the app to an out of browser desktop app, and print in whatever format you see fit, makes it ideal for the kind of ticketing system you're talking about.

          Here's a blog on how to implement it: http://wildermuth.com/2009/11/27/Silverlight_4_s_Printing_Support [wildermuth.com]
          And another: http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx [silverlightshow.net]

          and here's Microsoft's page hyping it: http://www.silverlight.net/getstarted/silverlight-4/ [silverlight.net]

          Here's a blog on linking Ruby on Rails with Silverlight as well: http://techblogging.wordpress.com/2008/03/26/using-silverlight-with-rubyonrails/ [wordpress.com]

          Hope this helps.

          • by koreaman ( 835838 ) <uman@umanwizard.com> on Saturday June 19, 2010 @01:41AM (#32622748)

            I would say about 75% of my time at work is spent working around inconsistencies and bugs in Silverlight. To be fair, I've only tried 3, not 4, but they really should have called it "Silverlight Beta 3", not "Silverlight 3". It works flawlessly cross-browser (with a few odd, rare exceptions), and it seems like a big leap forward from HTML/JS for this sort of thing, but I have to say it's not quite ready to compete with desktop solutions.

            However, if you absolutely must have it run in a browser and don't want to use hokey Java applets, Silverlight is something you should really look into.

            • by Anonymous Coward on Saturday June 19, 2010 @03:36AM (#32623274)

              NONE of you posting in this thread section can read, obviously. The question is what BROWSER is best for complex web applications. It is NOT what programming/scripting language is best for making such applications.

              Heck, as wrong of an answer as it would be, "Internet Explorer would be best!!!" would be a better answer than the ones you all are fighting over. At least it's on the list of possible answers to the question.

              Someone needs to mod you all to Off Topic oblivion. There's nothing "Insightful" in you all not even remembering what the question was...

            • by Pieroxy ( 222434 ) on Saturday June 19, 2010 @03:51AM (#32623338) Homepage

              What are you smoking? The whole point of the web is that it can run on almost every platform out there. Phones, web tvs, Linux boxes, PCs, etc...

              Silverlight, as nice as it may be, will never be able to compete on that front. Look at where flash is today.

              As you say, if you absolutely must have it run in a browser, write it in HTML/js/css. That's what browsers understand.

      • by FuckingNickName ( 1362625 ) on Friday June 18, 2010 @08:05PM (#32621016) Journal

        Maturity isn't defined by the number of years since conception, but by its origins and the development and engineering which has gone into it since. HTML/Javascript has only comparatively recently been considered as a serious app development platform to contend with native apps, still building on the hypertext + scripting language paradigm. Even Google knows what a pain it is to work with HTML/Javascript directly and has developed a translator from Java to implement their web apps.

        What's more, there are very few use cases where an offline application (I assume by that you mean "not HTML/Javascript" - I'm not sure what's "offline" about Java) isn't an option. The basic selling point with HTML apps is that you don't have to spend 30 seconds downloading and installing a small binary. When you're writing for a corporation, that's reduced to insignificance because it'd be installed as part of the deployment procedure.

        • by betterunixthanunix ( 980855 ) on Friday June 18, 2010 @08:13PM (#32621074)
          "I'm not sure what's "offline" about Java"

          Not that I disagree with you, but there are plenty of offline applications written in Java, using Swing. Java is not limited to applets and application servers, there is a mature library for standalone/offline application development. As I remember things, the reason we do not see more desktop applications written in Java is the bad reputation Java had in the 90s for taking a long time to loa, and to some degree the fact that Swing does not integrate with the desktop look and feel (or at least it did not the last time I checked, which was admittedly years ago).
      • by DaveV1.0 ( 203135 ) on Friday June 18, 2010 @08:42PM (#32621268) Journal

        I'm sorry but you have confused HTTP/HTML/Javascript with the internet.

        The fact is that this trend of using the browser as an interface is nothing less than having a hammer and treating everything as a nail.

        • by Hooya ( 518216 ) on Friday June 18, 2010 @11:04PM (#32622056) Homepage

          after close to about 12 years of developing for the web - from perl CGI scripts to PHP, Java JSP - JSF, python, RoR and various other related things I've finally given up on browser based apps. I do use HTTP/JSON for an interface between the server side and the client side. That allows the server side to be used from AJAX frontend or from a Java desktop app or what have you. But a strict browser based software - never again.

          For a 'rich' client app I would use either: Qt (python/ruby/c++ in order of preference), Java or even VisualWhatever (if I were tied to windows - I try to keep it cross platform).

      • Javascript, GMFB (Score:2, Informative)

        by fnj ( 64210 ) on Friday June 18, 2010 @09:00PM (#32621378)

        Forget the comparison of years of age. "Javascript" and "mature" are not words which in any sense could ever be considered compatible. After one hundred years, Javascript will still not be a mature language. It is crap by its nature.

      • by dna_(c)(tm)(r) ( 618003 ) on Saturday June 19, 2010 @05:28AM (#32623652)

        Javascript is mature enough, it is the DOM that needs to evolve and be consistent over the different browsers. And CSS.

        Still, I'm not always convinced making everything a web application is an efficient choice...

    • by betterunixthanunix ( 980855 ) on Friday June 18, 2010 @07:58PM (#32620934)
      The wheel is reinvented in computer science every so often.
    • I don't think this is particularly insightful advise. A web interface works well, but regarding printing is a sore point. If they need particular printing enhancements, having a network accessible printer and the printing driven from the server may be better. Having the server issue a .pdf, or .ps set for the client to print would work too. Hell writing an extension for formatted printing would probably be ideal and I'd be surprised if nobody has an ns* extension for such a feature already written (though most will simply use PDF or PostScript directly).

      Beyond this, having a web interface allows you to switch client architectures fairly easily as long as you aren't too tied to one, which is the path many internal development efforts went towards in the later 1990's and early 2000's with IE5 and IE6. Frameworks like ExtJS offer a lot of rich functionality in web based applications. I would even suggest going with XUL over Java or .Net for this type of application myself. There are advantages to the centralized environment that browser based applications bring, namely a much lower cost for deployment.
      • In the variety of web-based (or web-frontended) systems I've seen, it is somewhere between common and ubiquitous for any serious printing(ie. where fidelity matters, not where somebody just needs a bunch of text to scribble on or take to a meeting) to be handled by having the server spit out a .PDF, as you suggest.

        HTML, by design, Is Not a fixed-layout page description language. This is one of its great virtues. Assuming the designer doesn't muck it up, it should reflow nicely, or at least adequately, onto a variety of monitor shapes and sizes, and browser capabilities. However, that makes it a pretty terrible substitute for PDF in any situation where you want to spit stuff onto standard sized paper in a precise way.
    • by linebackn ( 131821 ) on Friday June 18, 2010 @08:40PM (#32621252)

      >The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience.

      Don't insult the mac like that. There were Mac apps back in 1984 that you can still only badly mimic via a web "application."

      The fact is that a web browser is an application that retrieves and renders hypertext documents over a network, and nothing more. Just because it has scripting and the web can make available documents to huge numbers of people, too many people think they can shoehorn any kind of application in to it.

      There is a huge demand for data entry and reporting (both viewing and printing) that web browser just aren't up to. If web browser ever get to the point where they have drag-and-drop form/report creation with a user interface that can be reliably delivered to client computers then great. Until then there needs to be something else to fill this void, and there just isn't. There used to be some very nice client/server GUI form and reporting tools back in the 90s, but most of those have devolved in to half-assed web tools with insane setup, configuration, and support requirements (and usually exorbitant enterprise pricing to boot).

      Heck, the last time I checked no web browser could even reliably be told automatically to print a page landscape!

      • by FuckingNickName ( 1362625 ) on Friday June 18, 2010 @08:56PM (#32621348) Journal

        Don't insult the mac like that. There were Mac apps back in 1984 that you can still only badly mimic via a web "application."

        You're right. I'm forgetting the beauty, simplicity and consistency of the 1984 Mac. I've been using the comparative UI mess that is OS X for too long.

        There used to be some very nice client/server GUI form and reporting tools back in the 90s

        The whole display / presentation / business client / business server / database multi-tier thing seems to have been broken horribly, so now presentation, business client and business server are merged on some cloud and delivered to a dumb graphical display. Why? Well, to take away control, of course.

    • By the way: Why don’t we replace the browser with a window containing tabs of virtual machines that un-freeze a tiny local memory image containing common libraries (also for backward compatibility) that can run remote executables, either as a thin client or as a real application.
      Then we only have to have the ability to separate tabs our to being their own windows and having the ability to have an icon in your start menu.

      And suddenly we have the best of both worlds: Complete encapsulation, simple development for simple projects with XHTML/CSS/JS/..., and the ability to run full applications.
      Done right, it should also be faster than JS or a VM running a full OS.

      Maybe I should talk to the Firefox team about it. Or the VirtualBox guys?

  • IE or Firefox (Score:5, Insightful)

    by ageoffri ( 723674 ) on Friday June 18, 2010 @07:46PM (#32620790)
    Given that IE and Firefox pretty much set the standard, if you aren't developing for both of them then you are setting yourself up for failure. Sure you may be trying to do things the right way, i.e. fully standard compliant, but it isn't the real world answer.

    Figure out what you need to do with your application to make it work in IE and Firefox is the only real solution.

    • Re:IE or Firefox (Score:3, Insightful)

      by X0563511 ( 793323 ) on Friday June 18, 2010 @07:52PM (#32620854) Homepage Journal

      The real world answer is go ignore IE and let all the people still using it go cry.

    • by blackraven14250 ( 902843 ) on Friday June 18, 2010 @08:03PM (#32620986)
      That's only true if the system is used by travelers and not travel agents to allow for the bookings.
    • by ta bu shi da yu ( 687699 ) on Friday June 18, 2010 @08:24PM (#32621154) Homepage

      Alternatively, if Firefox has bugs, has he filed a bug report?

    • Re:IE or Firefox (Score:3, Informative)

      by blincoln ( 592401 ) on Friday June 18, 2010 @08:42PM (#32621270) Homepage Journal

      Sure you may be trying to do things the right way, i.e. fully standard compliant, but it isn't the real world answer.

      I managed to write a web application a couple of years ago that not only displayed consistently in IE and Firefox, but also printed consistently from both of them, while remaining standards-compliant and not using HTML or CSS hacks. The printing was by far the harder part - the browsers initially returned very different printed results even though they rendered the page on-screen almost identically. Changes to the CSS would frequently fix the printing of one while breaking the other, yet not affecting the on-screen rendering of either.
      I can see why people who do a lot of printing lean towards PDF.

    • by ChunderDownunder ( 709234 ) on Friday June 18, 2010 @09:31PM (#32621560)

      From the summary "What browsers and specific versions do you end up deploying"

      That sounds to me that they're *deploying* a specific browser to a specific client desktop. That it may work in 'the real world' would seem a moot point.

      That said, avoiding too many browser-specific hacks may ensure a smoother upgrade path when deploying, say, version 3 to Chrome9.1 sometime in the future. (But hardly answers the question of which browser *today* prints best.)

    • Re:IE or Firefox (Score:3, Insightful)

      by Hurricane78 ( 562437 ) <deleted@slas[ ]t.org ['hdo' in gap]> on Friday June 18, 2010 @09:43PM (#32621634)

      I’m a long-term professional, and if you are developing for any specific browser, you are a failure, and not a professional.
      The goal is to know the W3C standards by heart in every minute detail (yes, it can be done, since I did it for years without problems), and design to it. In a way that allows you to spot things where not you are wrong, but the browser is!
      You only add browser-specific quirks after you’re done. Separated from the main code wherever possible.

      Otherwise you end up with a huge non-working mess as soon as you notice that your nice giant backbone of your webapp only works because of a quirk/bug/weirdness of that specific browser.

      Things like http://code.google.com/p/ie7-js/ [google.com] greatly help with this. :)

  • My experience: (Score:5, Informative)

    by Roadmaster ( 96317 ) on Friday June 18, 2010 @07:49PM (#32620816) Homepage Journal

    In my experience, the easiest way to get a consistent and stable printing experience is by generating PDF. I have yet to have stability problems if this is done properly. As you're working with Ruby on Rails, using Prawn and Prawnto might be useful. However, if you absolutely positively must NOT use PDF for printing, then this probably won't help you.

  • by Simmeh ( 1320813 ) on Friday June 18, 2010 @07:49PM (#32620818)
    Export your data to XML or PDF on the fly and have something sensible print it.
  • Chrome, PDF (Score:5, Insightful)

    by amicusNYCL ( 1538833 ) on Friday June 18, 2010 @07:50PM (#32620826)

    Even though I don't use it for development, I've got several of my clients using Chrome to take advantage of the Javascript engine. My applications use a lot of Javascript for the interfaces, and Chrome speeds up the rendering of large data sets compared to IE or Firefox.

    For printing, the only solution to keep you sane is to export reports as PDF and let them print through their reader. That's specifically what PDF is for (consistency in displaying and printing). Depending on the report, they may also appreciate a CSV version that they can do their own filtering and sorting on.

  • Lynx! (Score:2, Funny)

    by turtleAJ ( 910000 ) on Friday June 18, 2010 @07:50PM (#32620828)
    All the way!
  • by John Hasler ( 414242 ) on Friday June 18, 2010 @07:53PM (#32620864) Homepage

    ...is a much more serious bug than any possible printing problem.

    • ...is a much more serious bug than any possible printing problem.

      I'd say mod parent up, but other people recognize the wisdom and have done so already.

      Do not write a web application tied to a particular browser, or even two particular browsers. You will repeat mistakes made 15 years ago when people used to do the same thing for Internet Explorer or Netscape. Those who come after will curse your name forever.

      Remember all those sites that used to say "Best viewed in IE5" or "Best viewed in Netscape"? You don't want that.

  • by EmperorOfCanada ( 1332175 ) on Friday June 18, 2010 @07:54PM (#32620878)
    If you forced me to use Opera to use your system I would demand that they find a new developer. Or as a customer I would find a new system.

    This is a classic example of a developer trying to tailor the user to the system instead of the system to the user.

    Stop your whining and just make it work in one or more of the common browsers. I have been forced to bend crap environments to my will and I suspect that most developers around slashdot have bent bad systems until they cried; but made them work in the end.
    • by Traf-O-Data-Hater ( 858971 ) on Friday June 18, 2010 @08:07PM (#32621038)
      Wish I had mod points, parent is absolutely correct. Stop complaining and trying to find some panacea for your architecture problems. It seems you want to have something you can show your client 'There! it works on THAT browser!' instead of thinking about the common denominator. There's no way I'd be happy having to use not just a particular browser, but a particular version of that browser - who are you trying to kid? The client and the user, it seems. Sorry if this seems harsh but that's my opinion.
      • Wish I had mod points, parent is absolutely correct. Stop complaining and trying to find some panacea for your architecture problems. It seems you want to have something you can show your client 'There! it works on THAT browser!' instead of thinking about the common denominator. There's no way I'd be happy having to use not just a particular browser, but a particular version of that browser - who are you trying to kid? The client and the user, it seems. Sorry if this seems harsh but that's my opinion.

        +1 Insightful. Browsers make decent end user solutions for light web apps, but finding an enterprise class solution that will only work for one build on one browser is like telling golfers they all have to use the same set of clubs to complete a course. It will not go over. No matter how 'great' it looks in X build of Y browser. Don't tie your application down to a specific environment; understandably web design is like trying to make a shoe that fits everybody, but making everybody else lop off toes to fit your shoe only pleases you, and pisses of scores of users in the process.

        Standards are only a guideline these days unfortunately, and one of the required skill-sets of an, dare I use a synergy-istic word, 'agile' developer is the ability to transcend the difficulties despite the simplicity of choosing the easier route for yourself, and designing a solution that fits a general environment.

        You wouldn't purchase the most bad-ass truck in the world, but on the stipulation that it could only go off-roading on Sundays between 2-8pm, during full moons, on the first Tuesday of every month. On the other hand, if your employer / client would purchase this truck, well, get-in, get-out, and get-paid, unless you want the possibility of feature creep out the ass and the maintainability nightmare of supporting a specific platform on a specific day of the week.

    • by Qzukk ( 229616 ) on Friday June 18, 2010 @09:06PM (#32621420) Journal

      I have been forced to bend crap environments to my will and I suspect that most developers around slashdot have bent bad systems until they cried; but made them work in the end.

      I bent and bent, then cried and gave up and I had to tell my users to use IE. There's a table printing bug from 2005 that is still open, though fortunately my specific flavor of printing problems (entire rows of data going missing at page breaks) eventually went away several versions after firefox 2.

      Nowadays I use PDF, though several PDF generation libraries I've tried had serious deficiencies like being unable to tell me how much space a block of text will take before it places it on the page, or being unable to override Acrobat Reader's default printing settings, which fuck up anything you're trying to print onto an existing form. (I hacked it into fpdf once, but it was essentially a copy-and-paste of a command from another pdf that was able to force me to print with auto-fuckup-and-center turned off. It worked for me and my version of reader, but I didn't dare put it into production since I had to change the spec version fpdf inserts into the header (1.3) to one that supported overriding the printer options).

      If your reports don't need anything too fancy and they already pop out in HTML, you can use html2ps | ps2pdf to get something kinda resembling the original webpage. You can't make it look pretty and I'm fairly certain it's text only, but it'll print out exactly as it appears no matter what browser you are using.

  • by pwnies ( 1034518 ) <j@jjcm.org> on Friday June 18, 2010 @07:54PM (#32620882) Homepage Journal
    It sounds like the web-app you're using isn't coded well. Hate to put it that way, but if you're having this many problems with it, it's probably true. As for browsers to use - just switch until you find one that works. Try each of the rendering engines and browsers that use them (trident, webkit, gecko, presto, etc). Find one that works, use that.
    Next time around though, write the app better. Export to PDF/PS if you need formatting to be absolutely preserved.
  • by DragonHawk ( 21256 ) on Friday June 18, 2010 @07:55PM (#32620894) Homepage Journal

    What are the "printing problems" you're having?

    If the problem is that you're having trouble making things look the way you want to (you mentioning printing bookings, which I suspect might need a very rigid format), you're not going to get away from that. HTML is designed to allow variation by browser implementation and by user preference. It's not supposed to look the same everywhere.

    If you need accurate, precise print reproduction everywhere, your best bet is to generate some kind of PDL (Page Description Language) on the fly. PDF is the common choice here, and prolly your best bet, since most people are used to it and already have software. Other choices would be PostScript and XPS, but those are much less commonly available in the user community.

    Note that "PDF" doesn't have to mean "Adobe"; there are tons of third-party PDF tools out there, including free and FOSS.

  • by MoFoQ ( 584566 ) on Friday June 18, 2010 @08:00PM (#32620948)

    yea...there's a reason why there's a media type definition for CSS.
    Plus using javascript to load browser specific CSS so I don't have to rely on CSS hacks and also keeps things "valid"

    Oh, and I dropped support for IE6.
    IE7 is going soon too as IE8 becomes mainstream among IE users.
    Still, I hate IE with a passion.

    My main browsers are FF3.0x+/3.5+, Chrome/Safari, and Opera 9/10....in terms of testing.

  • by Zadaz ( 950521 ) on Friday June 18, 2010 @08:00PM (#32620950)

    The only way that anyone does proper printing of web documents is as PDFs, and to hell with the browser. This is for very good reason.

    If your system absolutely must print from a web page, use Flash. Yes, I know. But it will print from within the page, it produces identical prints in all browsers/platforms, and everyone already has it installed.

  • by TomXP411 ( 860000 ) on Friday June 18, 2010 @08:04PM (#32621008)
    I wouldn't use the browser for printing. I would render the document to an RTF on the server, then hand it over to the client for printing.
  • by Aexia ( 517457 ) on Friday June 18, 2010 @08:05PM (#32621018)

    that isn't clear from the description: Is this a tool meant to be used internally by the company or is it meant to be used by the general public?

    Because if it's the latter, whatever your solution, it better work in every browser and not just specific older version of Opera.

    • by Anonymous Psychopath ( 18031 ) on Friday June 18, 2010 @09:02PM (#32621394) Homepage

      that isn't clear from the description: Is this a tool meant to be used internally by the company or is it meant to be used by the general public?

      Because if it's the latter, whatever your solution, it better work in every browser and not just specific older version of Opera.

      It doesn't matter. You cannot guarantee what browser a user will have loaded today, much less a few years from now, whether it's in a corporate environment or not.

      • by ChunderDownunder ( 709234 ) on Friday June 18, 2010 @09:50PM (#32621670)

        Most place I've worked at recently have firefox installed, except for that one pesky intranet webapp that only runs in IE6 (and higher if you're lucky!)

        I'm not advocating the tie-in to a specific version of Opera. However, with an army of IT support personnel keeping things real, I don't see it should be a huge deal, given whatever other cruft they routinely install and maintain in an SOE.

        (Assuming of course this application is locked down to an internal network)

  • by NotQuiteReal ( 608241 ) on Friday June 18, 2010 @08:12PM (#32621070) Journal
    The "Best Browswer" is the one your paying customers use. For better or worse.
  • by tibit ( 1762298 ) on Friday June 18, 2010 @08:26PM (#32621168)

    Generate PDF tickets on the fly. There are plenty of open source and commercial libraries to help you out.

    As for a "major" Firefox printing bug etc: you're doing something wrong. I presume that's since you're new. I have an in house monstrosity that prints invoices (think tables, lots of lines and tight alignments) fine across the spectrum: from IE6 to every contemporary browsers. All using CSS and HTML. So it can be done, and I've yet to run into any printing bugs, major or otherwise. There are hacks to be sure, but nothing I consider to be browser bugs, more like specification bugs.

    • by micheas ( 231635 ) on Friday June 18, 2010 @09:05PM (#32621414) Homepage Journal

      The problem I had was that every browser had different printing preference settings.

      Do background images print?

      Are images scaled?

      Do images print at 72dpi? 300dpi? the alt text?

      Are fonts over ridden?

      The list just went on and on.

      Use a pdf library, it will save you time.

      Make sure that you can embed the fonts in the pdf. otherwise you will be dealing with all sorts of stupid bug reports.

  • by saccade.com ( 771661 ) on Friday June 18, 2010 @08:34PM (#32621208) Homepage Journal
    If you want to do quick cross-browser testing, try Browser Lab. [adobe.com]
  • by JThaddeus ( 531998 ) on Friday June 18, 2010 @08:45PM (#32621298)
    You'd best cover IE, Firefox, and Safari at a minimum. I've been using the Google Web Toolkit (http://code.google.com/webtoolkit/) for the past 3 years and have been very happy with it.
  • by dmgxmichael ( 1219692 ) on Friday June 18, 2010 @08:55PM (#32621344) Homepage

    Ok, I'm presuming that the problem is native browser printing. The printer section of CSS is the red headed stepchild of the spec with only Opera getting it remotely right. That leaves PDF which has been discussed. Given your description of the situation you might have a third option.

    If you're building this for an in house company as it sounds and the server is onsite consider creating a Postscript file and then commanding the OS to print the file normally. This cuts the browser out of the equation entirely and lets you get very specific with the printer since you can use system commands to control it fairly directly (or even cURL to it if the printer runs a webserver - some do). This solution is only viable if you have a specific printer or printers you're using regardless of the location of the computer that is commanding the print job be done.

  • by poor_boi ( 548340 ) on Friday June 18, 2010 @08:59PM (#32621364)
    You've got it backwards. You don't write a web application and then go around installing 9 different browsers at 20 different patch levels in a search to find one which finally doesn't break while using your app. Rather, you write an application and install 9 different browsers at 20 different patch levels to make sure none of them break while using your app. Fix the app, not the browser. And if the problem is intractable in the most popular versions of the most popular browsers, change your framework.
    • by reiisi ( 1211052 ) on Saturday June 19, 2010 @03:43AM (#32623304) Homepage

      I really, really wish I could agree with you.

      But there's a fundamental problem. An intractible problem, even.

      Browsers simply try too hard to be all things to all people.

      That's an impossible task without making all people conform to your definition of all people. Woops, totalitarian dictators and religious idealogues keep trying that one and finding it doesn't work either.

      We should not be continuing to try to build or define the ultimate browser. We should, instead, be defining standards for browsers for specific application fields in specific countries.

      Open standards, not standards led by any industry leader or special interest group.

      Simple, standard browsers, implemented and implementable by small teams with unencumbered tools. With an overall API a single developer can grasp, and libraries that don't require teams just to find out where to find the answers.

  • by wiredlogic ( 135348 ) on Friday June 18, 2010 @09:03PM (#32621406)

    Forget about trying to make HTML into dependably formatted print output. Just use a library like Cairo to render what you want into a PDF and provide that to the users.

  • by corsec67 ( 627446 ) on Friday June 18, 2010 @09:08PM (#32621436) Homepage Journal

    I also develop for Ruby on Rails, and we have to support IE 6-8. (Of course the developers all use Firefox for Firebug)
    For printing, I switched to using LaTeX, and returning the PDFs.

    HTML just doesn't give you the kind of control that you need on a piece of paper.(Try having custom page headers/footers, for example) I ran into the bug in firefox where it would skip rows of a table going over a page boundry, and then there was other issues with it dropping images on other pages.

    Plus, LaTeX just looks better. HTML is great if you don't know what it is going to be displayed on, but when you do know what kind of paper it is going to be displayed on, HTML isn't the best choice.

    (Specifically, I used the rTeX plugin, with pdflatex)

  • by Anrego ( 830717 ) * on Friday June 18, 2010 @09:37PM (#32621594)

    Don't even bother trying to use HTML to make printing work. Generate something else (pdf is good.. consistent, widely supported.. evil) and have the user print that.

  • by tsotha ( 720379 ) on Friday June 18, 2010 @09:42PM (#32621630)

    had to write to or (in b2c) the website is expected to handle any browser the user might reasonably have, starting with IE6.

  • by tsalmark ( 1265778 ) on Friday June 18, 2010 @09:51PM (#32621676) Homepage
    HTML should render adequately in any browser - or your doing it wrong. In print I thoroughly suggest very literal html/css as in absolute measurements for everything. Or if warranted pass the HTML through princeXML on its way to becoming a PDF, you will have much more consistent results that you can count on.

You're using a keyboard! How quaint!

Working...