Pergunta

I'm trying to use PDFSharp to add 2 text strings to a document - one as normal and 1 upside-down. How do I add the inverted text?

This is the code I'm using to add the normal text:

PdfDocument doc = PdfReader.Open(_path, PdfDocumentOpenMode.Modify);
PdfPage pdfPage = doc.Pages[0];
XGraphics gfx = XGraphics.FromPdfPage(pdfPage);
//
XTextFormatter tf = new XTextFormatter(gfx);
XFont fontHeader = new XFont("Arial", 24, XFontStyle.Bold);
//
XRect topRect = new XRect(200, 0, 200, 100);
tf.Alignment = XParagraphAlignment.Center;
tf.DrawString(_reference, fontHeader, XBrushes.Black, topRect, XStringFormats.TopLeft);
//
doc.Save(_path);
doc.Close();
doc=null;

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top