X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Firefox (any recent ver) will not print or Prt-preview certain web pages.

Posted

There was a past question on the same problem that was never resolved but the question was closed out. I have the same problem. Here is the original post:

"When trying to print out pages Firefox first prints a lot of empty pages, and then only a part of the content. Example:

https://online.medunigraz.at/mug_online/wbTvw_List.lehrveranstaltung?pStpSpNr=182778

When entering "print prview" you can see empty pages. When printing this page with Internet Explorer all is fine."

I accessed that page and I have exactly the problem.

Additional System Details

Installed Plug-ins

  • Shockwave Flash 11.7 r700
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.7
  • Adobe Shockwave for Director Netscape plug-in, version 12.0.2.122
  • Garmin Communicator Plug-In 4.0.4.0
  • Coupons, Inc. Coupon Printer Plugin
  • RealJukebox Netscape Plugin
  • RealNetworks(tm) RealPlayer Chrome Background Extension Plug-In
  • RealPlayer(tm) HTML5VideoShim Plug-In
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • RealPlayer Download Plugin
  • Next Generation Java Plug-in 1.6.0_31 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Logitech Device Detection
  • NPWLPG
  • 4.0.50401.0
  • DivX Web Player version 1.5.0.52

Application

  • Firefox 22.0
  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
  • Support URL: http://support.mozilla.org/1/firefox/22.0/WINNT/en-US/

Extensions

  • avast! Online Security 8.0.1489 (wrc@avast.com)
  • DoNotTrackMe 2.2.9.618 (donottrackplus@abine.com)
  • Garmin Communicator 4.0.4 ({195A3098-0BD5-4e90-AE22-BA1C540AFD1E})
  • Logitech Device Detection 1.24.0.9 (DeviceDetection@logitech.com)
  • Logitech SetPoint 6.5 ({F003DA68-8256-4b37-A6C4-350FA04494DF})
  • MaskMe 1.24.296 (idme@abine.com)
  • Troubleshooter 1.1a (troubleshooter@mozilla.org)
  • Xmarks 4.2.1 (foxmarks@kei.com)
  • Anti-Aliasing Tuner 11.12.01.01 (aatuner@hotmint.com) (Inactive)
  • OneClick YouTube Downloader 1.0.8 ({35379F86-8CCB-4724-AE33-4278DE266C70}) (Inactive)

Javascript

  • incrementalGCEnabled: True

Graphics

  • adapterDescription: Intel(R) HD Graphics
  • adapterDescription2:
  • adapterDeviceID: 0x0102
  • adapterDeviceID2:
  • adapterDrivers: igdumd64 igd10umd64 igd10umd64 igdumd32 igd10umd32 igd10umd32
  • adapterDrivers2:
  • adapterRAM: Unknown
  • adapterRAM2:
  • adapterVendorID: 0x8086
  • adapterVendorID2:
  • clearTypeParameters: Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 300
  • direct2DEnabled: True
  • directWriteEnabled: True
  • directWriteVersion: 6.2.9200.16571
  • driverDate: 12-12-2012
  • driverDate2:
  • driverVersion: 9.17.10.2932
  • driverVersion2:
  • info: {u'AzureCanvasBackend': u'direct2d', u'AzureFallbackCanvasBackend': u'cairo', u'AzureContentBackend': u'direct2d'}
  • isGPU2Active: False
  • numAcceleratedWindows: 3
  • numTotalWindows: 3
  • webglRenderer: Google Inc. -- ANGLE (Intel(R) HD Graphics)
  • windowLayerManagerType: Direct3D 10

Modified Preferences

  • accessibility.browsewithcaret: True
  • accessibility.typeaheadfind.flashBar: 0
  • browser.cache.disk.capacity: 1048576
  • browser.cache.disk.smart_size.first_run: False
  • browser.cache.disk.smart_size_cached_value: 1048576
  • browser.places.smartBookmarksVersion: 4
  • browser.search.update: False
  • browser.search.useDBForOrder: True
  • browser.startup.homepage: http://my.yahoo.com/
  • browser.startup.homepage_override.buildID: 20130618035212
  • browser.startup.homepage_override.mstone: 22.0
  • browser.tabs.autoHide: True
  • browser.tabs.onTop: False
  • browser.urlbar.autocomplete.enabled: False
  • browser.urlbar.default.behavior: 2
  • dom.mozApps.used: True
  • dom.w3c_touch_events.expose: False
  • extensions.lastAppVersion: 22.0
  • font.internaluseonly.changed: True
  • gfx.direct3d.last_used_feature_level_idx: 0
  • gfx.direct3d.prefer_10_1: True
  • network.cookie.prefsMigrated: True
  • places.database.lastMaintenance: 1375128505
  • places.history.expiration.transient_current_max_pages: 104858
  • plugin.disable_full_page_plugin_for_types: application/pdf
  • plugin.importedState: True
  • privacy.clearOnShutdown.cookies: False
  • privacy.clearOnShutdown.offlineApps: True
  • privacy.clearOnShutdown.siteSettings: True
  • privacy.cpd.cookies: False
  • privacy.cpd.downloads: False
  • privacy.cpd.history: False
  • privacy.cpd.sessions: False
  • privacy.sanitize.migrateFx3Prefs: True
  • privacy.sanitize.sanitizeOnShutdown: True
  • privacy.sanitize.timeSpan: 0
  • security.warn_viewing_mixed: False
  • storage.vacuum.last.index: 1
  • storage.vacuum.last.places.sqlite: 1375044676

Misc

  • User JS: No
  • Accessibility: No
Waka_Flocka_Flame
  • Top 25 Contributor
528 solutions 5041 answers

Hello,

Try Firefox Safe Mode to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.

(If you're not using it, switch to the Default theme.)

  • You can open Firefox 4.0+ in Safe Mode by holding the Shift key when you open the Firefox desktop or Start menu shortcut.
  • Or open the Help menu and click on the Restart with Add-ons Disabled... menu item while Firefox is running.

Once you get the pop-up, just select "'Start in Safe Mode"

If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one. Please follow the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article for that.

To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.

When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.

Thank you.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Print problems tend to look similar, but there are many different layout situations that Firefox mishandles when it tries to render the page for print. This makes a general solution difficult, and it's worth filing bugs in Bugzilla when new problems are discovered. How soon they will be fixed is a sore point: for some reason, print bugs have never had a high priority compared with screen display bugs.


On that site, the main table is embedded in a set of nested boxes with different color backgrounds. So far, not so strange. However, the author instructed Firefox to display the background boxes as though they are a table cell in a table row in a table, and I think this is causing the problem because the content inside the fictitious table cell is huge.

Here are two hacks demonstrating this theory, you can try either one.

(1) Override the table-like styling and use standard block styling

Select and copy the following script:

var mySty = document.createElement("style"); mySty.setAttribute("type", "text/css"); mySty.appendChild(document.createTextNode(".MaskBackground, .MaskContent, .MaskData {display:block !important;}")); document.body.appendChild(mySty);

On the problem page, press Ctrl+Shift+k to open Firefox's web console.

Paste the script next to the caret (">") and press Enter to run it.

Try Print Preview to see the page.

(2) Move the main table out of the boxes

Select and copy the following script:

var myForm = document.getElementById("maskLvTerminList"); myForm.appendChild(myForm.getElementsByTagName("table")[0]);

On the problem page, press Ctrl+Shift+k to open Firefox's web console.

Paste the script next to the caret (">") and press Enter to run it.

Try Print Preview to see the page.


If there are particular sites you need to print that do not print, do you want to post a URL or two?

NebularNovice 1 solutions 7 answers

In response to the request for problem url's:

http://shopping.usairways.com/Flights/Schedules.aspx

When I enter a request which gives a short result, preView works reasonably well, though there's extra white space after the date.

When I enter a request which has a longer list (several pages), preView shows three pages with just headers and footers, then about the bottom third of the list.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Hi NebularNovice, the USAir page has two rules that improve the screen display which Firefox does not lay out correctly for printing. You can inject a style change into the page so that it will print normally.

To test that using the Web Console, you can do this:

(1) Select and copy the following script:

var r='@media print{div.pagewrapper{display:block !important;} div.fleft{float:none !important;}}'; var s=document.createElement('style'); s.type='text/css'; s.appendChild(document.createTextNode(r)); document.body.appendChild(s);
@media print{div.pagewrapper{display:block !important;} div.fleft{float:none !important;}}

(2) When viewing your flight list page, open Firefox's Web Console using (WIN) Ctrl+Shift+k or (MAC) Command+Alt+k

(3) Paste the script next to the caret (">") and press Enter to run it. No changes will be visible because the new rule only applies to printing.

(4) Close the Web Console and try Print Preview.

This rule should persist in the page if you do new searches from the bar at the top, but if you navigate away from the page, it will not be present when you return and will need to be re-injected.


Now... that obviously is not convenient. With a small modification, the script could be saved to your Bookmarks Toolbar as a "bookmarklet" that you click to run the script on the page. Or to apply this change to the site automatically when you load the page, you could create/edit the userContent.css file (someone will need to write the part that applies it just to USAir) or use an extension like Stylish (specific to styling sites) or an extension like Greasemonkey (runs scripts to modify sites). Unless you are doing a LOT of printing from this site, that might not be worth the effort.


One other workaround to consider: the Print Pages to PDF extension does an excellent job capturing the visible appearance of web pages (with live links), so if you are planning to save or share your search results, it may well be the ideal tool to use for this site. If you open different searches in different tabs, then you can use the extension to compile them all into a single PDF. Highly recommended. https://addons.mozilla.org/en-US/firefox/addon/print-pages-to-pdf/

Modified by jscher2000

NebularNovice 1 solutions 7 answers

Thanks for the reply. The Print Pages to PDF works well and will probably suffice for me. However the

@media print{div.pagewrapper{display:block !important;} div.fleft{float:none !important;}}

shows [17:33:23.683] SyntaxError: illegal character when I try it.

I'll look at the possibility of more permanent modification since I periodically do a lot of printing from that site.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Hi NebularNovice, apologies for the script error. I gave the style rule, but not the script used to insert it. I have corrected the above post.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Next, to set that rule up in Stylish, start by installing the Stylish extension from: https://addons.mozilla.org/en-US/firefox/addon/stylish/

After restarting, open the flight search page.

Stylish will add an "S" icon either to the main Navigation Toolbar or to the Add-on bar. If you do not normally display the Add-ons bar, you can turn it on and off by pressing Ctrl+/ or right-click a blank area of the tab bar (or the new tab "+" button).

(1) Select and copy the rule:

  @media print{
    div.pagewrapper{display:block !important;} 
    div.fleft{float:none !important;}
  }

(2) Click the Stylish "S" icon > Write new style > For shopping.usairways.com.

(3) Paste the rule in the lower area, below this line (see attached screen shot)

@-moz-document domain("shopping.usairways.com") {

(4) Click the Preview button to apply the rule, and try the page in Print Preview. Success?

(5) Before saving the rule, type a name in the top box (for example: Fix Printing USAir Flight Schedule)

That's it. Unless there's a problem in Step 4.

Modified by jscher2000

NebularNovice 1 solutions 7 answers

Thanks for the corrected script. It works fine.

However, the Stylish fix didn't take. I pasted the rule after:

@-moz-document domain("shopping.usairways.com") {

which put it before the single line containing: }

I then clicked Preview and tried Alt-F, V. I still got the mostly blank print preview so I didn't do step 5.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Hi NebularNovice, I don't know why the rule doesn't work for you. Can you confirm that you got the opening and closing curly braces balanced?

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("shopping.usairways.com") {
  @media print{
    div.pagewrapper{display:block !important;} 
    div.fleft{float:none !important;}
  }
}
NebularNovice 1 solutions 7 answers

Thanks for following up. It works now, and I've saved it. As far as I can tell, my problem was I copied the rule from the email notifying me of your reply and sent out by notifications@sumo.zlb.phx.mozilla.net

I see now that the rule copy in that email is incomplete, but I'm guessing that I got fooled by it and copied it instead of the rule on the webpage here.

In any case, I have the problem fixed by making sure to copy from this webpage and saved for that website.

jscher2000
  • Top 10 Contributor
2348 solutions 20818 answers

Hi NebularNovice, that makes sense. It's also a good idea to check the reply on the site just in case the author of the reply made a significant typo (happens surprisingly often) so you can get the latest thinking.