作成日: 2019/09/12 最終更新日: 2019/12/20
文書種別
不具合
状況
修正済み
詳細
セルに対してFontStyle.Boldが有効な太字のフォントを設定しても、PrintToPdfプロパティをTrueにしてPDFファイルに出力後にビューアで表示すると、PDF上では太字が有効になりません。
【再現手順】
1.新規作成したプロジェクトのForm1にFpSpreadを配置し、下記サンプルコードを記述します。
2.プロジェクトをデバッグ実行します。
3.出力されたtest.pdfを確認します。
■サンプルコード(VB.NET)
【再現手順】
1.新規作成したプロジェクトのForm1にFpSpreadを配置し、下記サンプルコードを記述します。
2.プロジェクトをデバッグ実行します。
3.出力されたtest.pdfを確認します。
■サンプルコード(VB.NET)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' セル型の設定
Dim textCell1 As New FarPoint.Win.Spread.CellType.TextCellType()
FpSpread1.ActiveSheet.Cells(0, 0, 1, 0).CellType = textCell1
Dim textCell2 As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
FpSpread1.ActiveSheet.Cells(2, 0, 3, 0).CellType = textCell2
' フォントの設定
Dim fb As New Font("メイリオ", 36, FontStyle.Bold)
Dim fr As New Font("メイリオ", 36, FontStyle.Regular)
FpSpread1.ActiveSheet.Cells(0, 0).Font = fb
FpSpread1.ActiveSheet.Cells(1, 0).Font = fr
FpSpread1.ActiveSheet.Cells(2, 0).Font = fb
FpSpread1.ActiveSheet.Cells(3, 0).Font = fr
' 値の設定
FpSpread1.ActiveSheet.Cells(0, 0, 3, 0).Value = "PDFテスト"
' 行高と列幅の設定
FpSpread1.ActiveSheet.Rows(0, 3).Height = 100
FpSpread1.ActiveSheet.Columns(0).Width = 400
' サイズの設定
FpSpread1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top
Button1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right
Me.Size = New Size(600, 600)
' PDF出力
FpSpread1.ActiveSheet.PrintInfo.PrintToPdf = True
FpSpread1.ActiveSheet.PrintInfo.PdfFileName = "test.pdf"
FpSpread1.PrintSheet(FpSpread1.ActiveSheet)
End Sub
' セル型の設定
Dim textCell1 As New FarPoint.Win.Spread.CellType.TextCellType()
FpSpread1.ActiveSheet.Cells(0, 0, 1, 0).CellType = textCell1
Dim textCell2 As New GrapeCity.Win.Spread.InputMan.CellType.GcTextBoxCellType()
FpSpread1.ActiveSheet.Cells(2, 0, 3, 0).CellType = textCell2
' フォントの設定
Dim fb As New Font("メイリオ", 36, FontStyle.Bold)
Dim fr As New Font("メイリオ", 36, FontStyle.Regular)
FpSpread1.ActiveSheet.Cells(0, 0).Font = fb
FpSpread1.ActiveSheet.Cells(1, 0).Font = fr
FpSpread1.ActiveSheet.Cells(2, 0).Font = fb
FpSpread1.ActiveSheet.Cells(3, 0).Font = fr
' 値の設定
FpSpread1.ActiveSheet.Cells(0, 0, 3, 0).Value = "PDFテスト"
' 行高と列幅の設定
FpSpread1.ActiveSheet.Rows(0, 3).Height = 100
FpSpread1.ActiveSheet.Columns(0).Width = 400
' サイズの設定
FpSpread1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top
Button1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right
Me.Size = New Size(600, 600)
' PDF出力
FpSpread1.ActiveSheet.PrintInfo.PrintToPdf = True
FpSpread1.ActiveSheet.PrintInfo.PdfFileName = "test.pdf"
FpSpread1.PrintSheet(FpSpread1.ActiveSheet)
End Sub
回避方法
Service Pack 3(v12.0.4504.2012 )で修正済み。
旧文書番号
84480