作成日: 2015/04/24 最終更新日: 2015/04/27
文書種別
制限事項
詳細
リモートデスクトップの画面サイズを1280×720より大きくした状態でリモートマシンへ接続し、C1PrintDocumentをPDF出力中にリモートデスクトップを切断した場合にPDFへ出力される文字が太くなります。
この事象は.NET Framework 側の動作によって発生している事象です。
本コンポーネントを使用しない場合にも、GDIとグラフィック メタファイルを一緒に使用すると発生します。
なお、本事象はリモートデスクトップ接続の設定で「ローカル デバイスとリソース」 の「プリンター」のチェックを外すと発生しません。
◎サンプルコード(VB)
◎サンプルコード(C#)
【再現手順】
リモートログインする側の端末:操作端末
リモートログインされる側の端末:動作端末
1.サンプルを動作端末に配置します
2.操作端末で[リモート デスクトップ接続]ウィンドウを起動します
3.[画面]タブの[画面の設定]グループで画面サイズを1280×720以上に設定します
4.[ローカルリソース]タブの[ローカル デバイスとリソース]グループで[プリンター]チェックボックスをオンに設定します
5.動作端末にログインします
6.サンプルを実行します
7.実行から20秒経過する前にリモートログインを切断します
結果:リモートログイン切断後に出力されたPDF(test2.pdf)の文字が太くなります
この事象は.NET Framework 側の動作によって発生している事象です。
本コンポーネントを使用しない場合にも、GDIとグラフィック メタファイルを一緒に使用すると発生します。
なお、本事象はリモートデスクトップ接続の設定で「ローカル デバイスとリソース」 の「プリンター」のチェックを外すと発生しません。
◎サンプルコード(VB)
_doc = C1ReportViewer.CreateC1PrintDocument()
_doc.AllowNonReflowableDocs = True
Dim pagesettings As New C1PageSettings()
pagesettings.Landscape = True
pagesettings.TopMargin = 0
pagesettings.LeftMargin = 0
pagesettings.RightMargin = 0
pagesettings.BottomMargin = 0
pagesettings.PaperKind = System.Drawing.Printing.PaperKind.A4
_doc.PageLayout.PageSettings.AssignFrom(pagesettings)
_doc.PageLayout.PageSettings.Landscape = True
Dim textStyle As Style
'正常PDF
'************************
_doc.StartDoc()
System.Threading.Thread.Sleep(20000)
'ここでリモート切断
textStyle = _doc.Style
textStyle.Font = New Font("MS ゴシック", 20)
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle)
_doc.EndDoc()
_doc.Export("test.pdf", Nothing, False)
'************************
_doc = C1ReportViewer.CreateC1PrintDocument()
_doc.AllowNonReflowableDocs = True
_doc.PageLayout.PageSettings.AssignFrom(pagesettings)
_doc.PageLayout.PageSettings.Landscape = True
'異常PDF
'************************
_doc.StartDoc()
textStyle = _doc.Style
textStyle.Font = New Font("MS ゴシック", 20)
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle)
_doc.EndDoc()
_doc.Export("test2.pdf", Nothing, False)
'************************
_doc.AllowNonReflowableDocs = True
Dim pagesettings As New C1PageSettings()
pagesettings.Landscape = True
pagesettings.TopMargin = 0
pagesettings.LeftMargin = 0
pagesettings.RightMargin = 0
pagesettings.BottomMargin = 0
pagesettings.PaperKind = System.Drawing.Printing.PaperKind.A4
_doc.PageLayout.PageSettings.AssignFrom(pagesettings)
_doc.PageLayout.PageSettings.Landscape = True
Dim textStyle As Style
'正常PDF
'************************
_doc.StartDoc()
System.Threading.Thread.Sleep(20000)
'ここでリモート切断
textStyle = _doc.Style
textStyle.Font = New Font("MS ゴシック", 20)
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle)
_doc.EndDoc()
_doc.Export("test.pdf", Nothing, False)
'************************
_doc = C1ReportViewer.CreateC1PrintDocument()
_doc.AllowNonReflowableDocs = True
_doc.PageLayout.PageSettings.AssignFrom(pagesettings)
_doc.PageLayout.PageSettings.Landscape = True
'異常PDF
'************************
_doc.StartDoc()
textStyle = _doc.Style
textStyle.Font = New Font("MS ゴシック", 20)
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle)
_doc.EndDoc()
_doc.Export("test2.pdf", Nothing, False)
'************************
◎サンプルコード(C#)
_doc = C1ReportViewer.CreateC1PrintDocument();
_doc.AllowNonReflowableDocs = true;
C1PageSettings pagesettings = new C1PageSettings();
pagesettings.Landscape = true;
pagesettings.TopMargin = 0;
pagesettings.LeftMargin = 0;
pagesettings.RightMargin = 0;
pagesettings.BottomMargin = 0;
pagesettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
_doc.PageLayout.PageSettings.AssignFrom(pagesettings);
_doc.PageLayout.PageSettings.Landscape = true;
Style textStyle;
//正常PDF
/**************************/
_doc.StartDoc();
System.Threading.Thread.Sleep(20000); //ここでリモート切断
textStyle = _doc.Style;
textStyle.Font = new Font("MS ゴシック", 20);
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle);
_doc.EndDoc();
_doc.Export("test.pdf", null, false);
/**************************/
_doc = C1ReportViewer.CreateC1PrintDocument();
_doc.AllowNonReflowableDocs = true;
_doc.PageLayout.PageSettings.AssignFrom(pagesettings);
_doc.PageLayout.PageSettings.Landscape = true;
//異常PDF
/**************************/
_doc.StartDoc();
textStyle = _doc.Style;
textStyle.Font = new Font("MS ゴシック", 20);
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle);
_doc.EndDoc();
_doc.Export("test2.pdf", null, false);
/**************************/
_doc.AllowNonReflowableDocs = true;
C1PageSettings pagesettings = new C1PageSettings();
pagesettings.Landscape = true;
pagesettings.TopMargin = 0;
pagesettings.LeftMargin = 0;
pagesettings.RightMargin = 0;
pagesettings.BottomMargin = 0;
pagesettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
_doc.PageLayout.PageSettings.AssignFrom(pagesettings);
_doc.PageLayout.PageSettings.Landscape = true;
Style textStyle;
//正常PDF
/**************************/
_doc.StartDoc();
System.Threading.Thread.Sleep(20000); //ここでリモート切断
textStyle = _doc.Style;
textStyle.Font = new Font("MS ゴシック", 20);
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle);
_doc.EndDoc();
_doc.Export("test.pdf", null, false);
/**************************/
_doc = C1ReportViewer.CreateC1PrintDocument();
_doc.AllowNonReflowableDocs = true;
_doc.PageLayout.PageSettings.AssignFrom(pagesettings);
_doc.PageLayout.PageSettings.Landscape = true;
//異常PDF
/**************************/
_doc.StartDoc();
textStyle = _doc.Style;
textStyle.Font = new Font("MS ゴシック", 20);
_doc.RenderDirectText("50mm", "50mm", "abcdあいうえお", "100mm", "20mm", textStyle);
_doc.EndDoc();
_doc.Export("test2.pdf", null, false);
/**************************/
【再現手順】
リモートログインする側の端末:操作端末
リモートログインされる側の端末:動作端末
1.サンプルを動作端末に配置します
2.操作端末で[リモート デスクトップ接続]ウィンドウを起動します
3.[画面]タブの[画面の設定]グループで画面サイズを1280×720以上に設定します
4.[ローカルリソース]タブの[ローカル デバイスとリソース]グループで[プリンター]チェックボックスをオンに設定します
5.動作端末にログインします
6.サンプルを実行します
7.実行から20秒経過する前にリモートログインを切断します
結果:リモートログイン切断後に出力されたPDF(test2.pdf)の文字が太くなります
旧文書番号
81268