Search code examples
pdfsharpmigradoc

Rotated Text Inside a Table Cell with PDFSharp


I am working on a problem where I need the first column of a table to have the text rotated 90 degrees. I have looked all over for a solution and only found references to the forums.pdfsharp.com website, which is not longer working, and a solution where they pass the location of the cell inside the cell's tag. After they render thier MigraDoc document, they scan for the cells that were tagged and print the rotated text via the XGraphics class. The only problem is, where do you find the location of the cell to begin with?

For those who can not find the solution I am refering to, it is located here: http://www.opten.ch/blog/2014/01/16/vertical-text-in-a-migradoc-table-cell-using-pdfsharp/


Solution

  • The forum at http://forum.pdfsharp.net is up and running.

    You can use a TextFrame to get rotated text as shown here:
    http://forum.pdfsharp.net/viewtopic.php?p=5699#p5699
    It only shows the imperfect version before the correct size was set.

    A more complicated approach is discussed here:
    http://forum.pdfsharp.net/viewtopic.php?p=4540#p4540