Good morning,
I am a new user of pdfsharp. I work as a volunteer for the Child's Dream foundation in Thailand, so having a free component is for them invaluable. Thanks a lot.
I am creating a document containing both charts and texts. I insert a first line of text, then a pie chart, then more lines of text using the drawstring method. If I select Xbrushes.black for the first line following the graph, nothing at all is printed after the chart. If I select any other color, than the whole text following the graph appears normally.
Here is the piece of code:
Code:
Myframe.Draw(gfx) 'print the graph
Startx = 30
StartY += Ysize + 20 'increment Y position by graph height
ThisString = "The detailed expenses are as follows:"
Rect = New XRect(Startx, StartY, 500, 20)
Sf = New XStringFormat
Sf.Alignment = XStringAlignment.Near
Sf.LineAlignment = XLineAlignment.Near
gfx.DrawString(ThisString, H0Font, XBrushes.DarkGreen, Rect, Sf)
For Each MyRow As DataRow In AllData.Rows
Startx = 50
StartY += 20
If StartY + 20 > MaxHeight Then
Page = Document.AddPage
gfx = XGraphics.FromPdfPage(Page)
PrintHeader(Page, gfx, Document)
Startx = 50
End If
ThisString = MyRow("Label")
Rect = New XRect(Startx, StartY, 500, 20)
Sf = New XStringFormat
Sf.Alignment = XStringAlignment.Near
Sf.LineAlignment = XLineAlignment.Near
gfx.DrawString(ThisString, MyFont, XBrushes.Black, Rect, Sf)
Next
Using Darkgreen for the first line works. using black doesn't.