PDFsharp draws text under graphics
问题 I am using PDFsharp to generate a PDF document from scratch. I am trying to write text on top of a gradient filled rectangle. After generating the document, the gradient appears on top of the text rendering the text completely hidden. using (var document = new PdfDocument()) { var page = document.AddPage(); var graphics = XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Append); graphics.SmoothingMode = XSmoothingMode.HighQuality; var bounds = new XRect(graphics.PageOrigin, graphics