Posts Tagged ‘pdf’

Problem with Firefox’s new built-in PDF viewer and print-bingo.com

Friday, April 5th, 2013

Annoyingly, within the last month or so, Firefox has switched it’s default PDF viewer to it’s built-in renderer. Generally, this is a good thing. It means that eventually we won’t need to all have Adobe Reader on our computers. But, annoyingly, this built-in renderer has issues with multiple PDF files, including those generated by our bingo card generating website, print-bingo.com.

For now, we have added a warning prompt for Firefox users to tell them why their bingo cards are missing the numbers or words within the grid. And now, the harder part, trying to figure out what part of the PDFs we use are incompatible with Firefox.

This is hugely annoying.

For anyone who stumbles on this, this page gives information on debugging pdf.js (the basis for the embedded FF viewer):

https://github.com/mozilla/pdf.js/wiki/Debugging-pdf.js

Google Chrome Built-in PDF Viewer Incompatibility with IFRAME and a Workaround

Saturday, December 11th, 2010

With the recent automatic upgrade of Google Chrome to version 8, Google made their built in PDF viewer the default viewer *.  I.e. there is now no need to separately download Adobe Reader or Adobe Flash Player to browse the web with Google Chrome.

Generally, I like this addition to Google Chrome; however, it caused some work for us.  Our web based bingo card generator, print-bingo.com, is highly dependent on PDF’s.  That’s the sole reason why our bingo cards are dead-easy to print out by the hundreds.  Unfortunately, Chrome’s built-in PDF renderer does not display PDFs that are in an IFRAME tag properly.

For the last few days, this is what users of print-bingo.com would see after generating 5 pages of bingo cards on print-bingo.com:

 

Broken PDF rendering in an IFRAME in Google Chrome 8 - screenshot from print-bingo.com

Broken PDF rendering in an IFRAME in Google Chrome 8 - screenshot from print-bingo.com

Chrome tries to scale the parent page to fit everything in… and it fails badly.

We were not able to get things working 100% the way we would like, but we have a workable situation now.

The basic steps that we had to take:

  • Change from IFRAME to OBJECT tag.  For whatever reason, this fixes the zooming issue.  And it was quite simple.  In our case, there wasn’t much difference between the two HTML tags.
  • Unfortunately, we can’t find a way to get Chrome to print the contents of the object tag without printing the rest of the page (though, perhaps using CSS  might work).
  • Instead, we added some bold warning text that gives Chrome users instructions to use the manual download links. We use a little function to identify Chrome users – the two key lines of code are: 
    $u_agent = $_SERVER[‘HTTP_USER_AGENT’]; 
    if(preg_match(‘/Chrome/i’,$u_agent)) { $ub = “Chrome”; }

So, we ended up with a workaround.  We sincerely hope that Google will add the missing interface elements that will make things just work, but until then, we are doing some other site improvements as we prepare to bump up the price of Premium Access to $12 in 2011.

* If you want to go back to using Adobe Reader in Google Chrome, you can turn off the  built-in viewer by going to the special address about:plugins and change Chrome PDF Viewer to Disable.  Of course, website owners should not depend on end-users to do this just to visit your site!

 

 

Open .pages file for Printing from Windows

Sunday, August 29th, 2010

A little while ago someone asked me for help in viewing and printing a .pages file that they had received by email.  In this case, there was no intention of editing the document, she really just needed to print it.

Here’s the deal:

– A .pages file is produced by one of the applications in Apple’s iWorks office productivity suite.
– A .pages file is actually a zip file with a few files in it.
– If you rename the file from .pages to .zip, then open the zip you will see some files and folders.
– Inside one of the folders you will find a PDF file preview (and JPEG)
– View and print this PDF.

And you’re done!

Sure, sometimes you need to edit the file, the right way to do this would be to get the sender to export the file from Apple iWorks to a format that a Windows user would be able to use, such as Rich Text Format (.rtf) or Microsoft Word (.doc).

Get used to receiving these files, Apple computers are everywhere…

Print-Bingo.com Works with Google Chrome Web Browser (again)

Monday, July 5th, 2010

Today we updated print-bingo.com’s programming.

The biggest fix, is that our site now works properly in current versions of Google Chrome. Our web based system for generating highly printable bingo cards is great… but once in a while we run into compatibility issues. For now, it’s fixed. We’ve tested in current Firefox, Internet Explorer, Google Chrome, and Apple Safari web browsers. Ironically, part of the programming fix was related to a compatibility tweak for Mozilla browser from years back. Mozilla users, if you actually still exist, you will need to use a different browser to use print-bingo.com now.

At the same time, we made live a feature that we wrote for a custom bingo job a few months back. All bingo cards within a single run are now guaranteed to be unique. Previously, it was entirely random if a card was duplicated in a run – but it was highly, highly, unlikely. In fact, we programmed an email notification if the dupe-tester actually catches a dupe.

We had to hard-code a duplicate entry to actually make sure the dupe tester and the email notifier worked. The odds of duplicate cards that are randomly generated is extremely low – you can’t generalize exact odds, since every custom bingo card design is different.

The site has probably generated 1,000 card runs since the new code went live… and we haven’t been notified of a duplicate card yet. If we ever catch a dupe, we’ll be sure to post about it.

More code changes are on the way. It’s summer, traffic to print-bingo.com is lower than normal.