質問

を使用していブラウザ管理サポートを発見したその背景画像の申し込みはcssには含まれませんで印刷します。

があるので、ブラウザの印刷の背景に表示される文書もあるのですか?

編集:私たprogramatically、を選び、このソリューション:

using Microsoft.Win32;

...

RegistryKey regKey = Registry.CurrentUser
                    .OpenSubKey("Software")
                    .OpenSubKey("Microsoft")
                    .OpenSubKey("Internet Explorer")
                    .OpenSubKey("Main");

//Get the current setting so that we can revert it after printjob
var defaultValue = regKey.GetValue("Print_Background");
regKey.SetValue("Print_Background", "yes");

//Do the printing

//Revert the registry key to the original value
regKey.SetValue("Print_Background", defaultValue);

別の言い方を扱うことがでの値の読み取り、通知は、ユーザーを調整するこの人のようにお願いいたします。うれしいことに同意工夫をこのようなレジストリにあてはまるわけではないの練習、住所】高知県高知市大川筋せご提案します。

たくさんの声

役に立ちましたか?

解決

ばんや変化に重要なシステムの設定では、必ず最初に読んの現在の設定を回復できます。

しかし私は、これ 非常に悪い 練習の最初の場所でなければならないでしょう。

Registry.LocalMachine

また、変更してみてください LocalUser の代わりに LocalMachine -その場合はアプリがクラッシュ(で、そのまconfoundedり、ユーザーがいないをご利用いただく全ての人々の機です。

他のヒント

他のレジストリキーをすることはできない。HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup\Print_Background HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\PageSetup\Print_Background

に対応するHKCUキーをこの設定は:HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\主\Print_Background

デフォルトでは、していないブラウザの印刷の背景画像です。

Firefoxで

* File > Page Setup > Check Off "Print Background"
* File > Print Preview

IE

* Tools > Internet Options > Advanced > Printing
* Check Off "Print Background Images and Colors"

オペラ

* File > Print Options > Check Off "Print Page Background"
* File > Print Preview (You may have to scroll down/up to see it refresh)
var sh = new ActiveXObject("WScript.Shell");
key = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Print_Background";
var defaultValue = sh.RegRead(key); 
sh.RegWrite(key,"yes","REG_SZ");
document.frames['detailFrame'].focus(); 
document.frames['detailFrame'].print();
sh.RegWrite(key,defaultValue,"REG_SZ");  
return false; 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top