0
인쇄를 위해 콤보 상자의 내용을 PDFsharp의 텍스트로 변환하려고합니다. 불행하게도 모든 "✓"는 "?"가됩니다. 유니 코드를 사용해 보았지만 아무 것도 바뀌지 않았습니다.PDFsharp 인식 할 수없는 문자가 "?"로 표시됩니다.
다음은 내가 사용하고있는 것입니다.
For Each cbx In Crt.Controls.OfType(Of ComboBox)
If cbx.Visible = True Then
Using Gra As XGraphics = XGraphics.FromPdfPage(Pg(Doc.PageCount - 1))
Dim tf As Layout.XTextFormatter = New Layout.XTextFormatter(Gra)
Dim x = cbx.Location.X * WScale
Dim y = cbx.Location.Y * HScale
Dim w = cbx.Width * WScale
Dim h = cbx.Height * HScale
Dim Brush As XBrush = New XSolidBrush(XColor.FromArgb(cbx.BackColor.ToArgb))
Dim xrect As New XRect(x, y, w, h)
Gra.DrawRectangle(Brush, xrect)
Dim options As XPdfFontOptions = New XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always)
Dim xFt As New XFont("Times New Roman", 7, XFontStyle.Regular, options)
tf.Alignment = Drawing.Layout.XParagraphAlignment.Justify
tf.DrawString(cbx.Text, xFt, XBrushes.Black, xrect, XStringFormats.TopLeft)
End Using
End If
Next
"Times New Roman"에서 "Microsoft Sans Serif"(눈금이 나타나는 글꼴)로 변경해 보았습니다. 나는 여러 다른 글꼴을 시도했지만 아무 것도 작동하지 않는다. 대신? 상자가됩니다 – Kimberly
여기에 게시 한 확인 표시 (유니 코드 2713)는 "Segoe UI Symbol"에 나타나지만 "MS Sans Serif"에는 나타나지 않고 "Times New Roman"에 표시되지 않습니다. 내 컴퓨터에는 "Microsoft Sans Serif"가 없습니다. –