+Lasagna Posted July 8, 2008 Share Posted July 8, 2008 (edited) I've had a problem with printing out PDF files under IE for quite a while now. Some time ago it switched from using the nice single-up page layout to a weird two-up page layout with a "fold here" line down the middle. What was weird was that this happened only on IE and not on Firefox and there appeared to be no way to tell GC which layout to use. Additionally, there seem to be numerous threads complaining that the two-up format suffers from issues -- namely cutting off or corrupting the paging layout so as to render it useless for many situations where a page writeup is lengthy. I think I finally figured out what's going on ... there's a javascript call to a function called "pl" under the print to PDF links. On Firefox, Opera, and Safari, this causes a URL reference to be built based on page guid which looks something like this (this one specifically for my cache GC166AM): www.geocaching.com/seek/cache_details_print.aspx?guid=95128c5c-fb43-47f0-a589-65dad1100a82&numlogs=0&pt=full<=letter&decrypt=n Invoking this directly from Firefox -or- cutting/pasting it into an IE window yields the nice familiar single-up page layout. If you run this function from an IE browser however, the following link is produced: www.geocaching.com/seek/cache_details_print.aspx?guid=95128c5c-fb43-47f0-a589-65dad1100a82&numlogs=0&pt=full<=letter&decrypt=n Note the subtle, but very important change of the string "ampersand lt" with the character "less than" (in other words, the interpretation of the HTML symbol code for "less than" right before the word "letter" in the URL string. I believe this is a BUG. Probably in IE not honoring a quoting context in Javascript. Are any of the site developers out there listening? Can you fix this -- perhaps changing the "pl" argument string to use something other than the variable name "lt" as the parameter? I would love to have to correct functionality for printing under IE back again. Edited July 8, 2008 by Lasagna Link to comment
+Raine Posted July 8, 2008 Share Posted July 8, 2008 That is odd that its converting it even thought there is no ; following the lt. I'll get this added as a bug and take a look at it. -Raine Link to comment
+Lasagna Posted July 8, 2008 Author Share Posted July 8, 2008 I agree ... the semi-colon should be needed before it get's recognized as HTML ... clearly yet another Javascript weirdness related to IE. For the record, I am running IE7, but have also reproduced this on IE6 as well. Every other browser (Safari, Opera, Firefox) that I've tried correctly process es the string and doesn't do the substitution. Look forward to a fix. Link to comment
+Lostboy1966 Posted July 8, 2008 Share Posted July 8, 2008 (edited) Nice work, Lasagna. Thanks! Edited July 8, 2008 by Lostboy1966 Link to comment
+WackyB Posted August 25, 2008 Share Posted August 25, 2008 Was there any response to the different layouts from IE and Firefox? I like the two page "fold here" I get from IE but my wife uses Firefox and is frustrated at the single page layout. which is supposed to be the default or intended layout? - Andy (WackyB) Link to comment
+Corey Posted August 25, 2008 Share Posted August 25, 2008 I think it's supposed to come out as one page normally, but if you look at the links above, removing the "lt" parameter in the URL will probably get you the two-up layout. Link to comment
+WackyB Posted August 25, 2008 Share Posted August 25, 2008 (edited) Very strange... had a little hack around and the following does work with IE: + lc + '&pt=full&lt=letter&decrypt='+ But breaks Firefox which does not encode. The only solution I've found is to move the lt attribute to the start: cache_details_print.aspx?lt=letter&guid=' + guid + I quite liked the two page result from IE, but as others have pointed out it does corrupt some listings - Andy (WackyB) Ps would be nice having dh=true Edited August 25, 2008 by WackyB Link to comment
+Wacka Posted August 26, 2008 Share Posted August 26, 2008 Easy fix: Don't use that bloated old IE. Link to comment
Recommended Posts