Graph RotationAngle not working inside a table cell with rowspan


#1

I’m trying to add a rotated rectangle inside a table cell. It doesn’t work if the cell has a rowSpan value otherwise it works fine. Please guide. Thanks in advance!

            Document doc = new Document();
            var page = doc.Pages.Add();
            Table table = new Table()
            {
                Border = new BorderInfo(BorderSide.All, 0.25F,
                    Color.FromRgb(System.Drawing.Color.FromArgb(217, 220, 222))),
                DefaultCellBorder = new BorderInfo(BorderSide.All, 0.25F,
                    Color.FromRgb(System.Drawing.Color.FromArgb(217, 220, 222)))
            };

            Row row = new Row();
            table.Rows.Add(row);
            Cell cell = new Cell();
            cell.Paragraphs.Add(new TextFragment("Row 1"));
            cell.RowSpan = 2;
            row.Cells.Add(cell);

            cell = new Cell();
            var graph = new Aspose.Pdf.Drawing.Graph(30, 30);
            var square = new Aspose.Pdf.Drawing.Rectangle(10, 0, 10, 10);
            graph.GraphInfo.RotationAngle = 45;
            graph.Shapes.Add(square);
            cell.Paragraphs.Add(graph);
            cell.RowSpan = 2;
            row.Cells.Add(cell);

            cell = new Cell();
            cell.Paragraphs.Add(new TextFragment("100"));
            row.Cells.Add(cell);

            row = new Row();
            table.Rows.Add(row);
            cell = new Cell();
            cell.Paragraphs.Add(new TextFragment("200"));
            row.Cells.Add(cell);

            row = new Row();
            table.Rows.Add(row);
            cell = new Cell();
            cell.Paragraphs.Add(new TextFragment("Row 3"));
            row.Cells.Add(cell);

            cell = new Cell();
            graph = new Aspose.Pdf.Drawing.Graph(30, 30);
            square = new Aspose.Pdf.Drawing.Rectangle(10, 0, 10, 10);
            graph.GraphInfo.RotationAngle = 45;
            graph.Shapes.Add(square);
            cell.Paragraphs.Add(graph);
            row.Cells.Add(cell);

            cell = new Cell();
            cell.Paragraphs.Add(new TextFragment("300"));
            row.Cells.Add(cell);

            doc.Pages[1].Paragraphs.Add(table);
            MemoryStream docStream = new MemoryStream();
            doc.Save(docStream, SaveFormat.Pdf);

#2

@abagavathi

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-46850 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.