When I select some text on page, displayed in the Chrome web-browser, and click with my right button, context menu opens. It has three options: "Copy", "Search %YOUR.SEARCH.ENGINE.NAME for '%SELECTED.TEXT%" and "Print..."; then is has separator and "Inspect Element".

My usual usage of popup menu on selected text is to use "Search %% for '%%'", but sometimes I miss the right menu item and clicks on "Print...". Then print preview opens (or OS print dialog if --disable-print-preview command-line option was added. I have no printer, and I need not to print one or two words, I just want

Is it possible to disable "Print..." item in the Google's version of Chrome?

If it is not possible, how can I find the code to display "Print..." in Chromium?


Printing can be disabled completely by setting:

"printing": {
   "enabled": false

to the Preferences file. Internally this sets kPrintingEnabled.

| improve this answer | |
  • 1
    So, it is possible to do binary patch of compiled render_view_context_menu.cc's function RenderViewContextMenu::AppendPluginItems / AppendPageItems / AppendPrintItem? I think the needed code path is only in AppendPrintItem – osgx Mar 15 '14 at 2:20
  • There is profile_->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) code in AppendPrintItem. Is it possible to globally set kPrintingEnabled flag to false? How? – osgx Mar 15 '14 at 2:27
  • This way: Open the profile folder, find the JSON file Preferences, find "printing" field (browser->extensions->printing), then add , "enabled": false into it. Dan D, Thank you for digging into the code, the keys was found via query on codesearch.debian.net "kPrintingEnabled" in src/chrome/common/pref_names.cc (Boolean controlling whether printing is enabled. const char kPrintingEnabled[] = "printing.enabled";), after checking the RenderViewContextMenu::AppendPrintItem function. Please update your answer with JSON edit method. – osgx Mar 15 '14 at 2:34
  • 1
    Ok, I cleaned up the question to the solution. The rest if need is in the revision history. – Dan D. Mar 15 '14 at 2:39
  • 1
    Thanks a lot. I always kept clicking it accidentally. You can find this file in: %AppData% then go to ..\Local\Google\Chrome\User Data\Default\Preferences on Windows – Rubenisme Apr 26 '16 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.