I have an Aspose.Pdf.Table in which cells I put an Rectangle like this (simplified version):
Dim table As New Table
Dim row = table.Rows.Add()
Dim graph As Drawing.Graph = New Drawing.Graph(50, 10)
Dim rect As Drawing.Rectangle = New Drawing.Rectangle(0,0,10,10)
graph.Shapes.Add(rectLeft)
Dim dataCell = row.Cells.Add()
dataCell.Paragraphs.Add(graph)
I need to insert a Text into the Rectangle, but I cannot find anywhere a documentation for how to do this.
I appriciate any help.
Thanks
Hi there,
Dim table As New Aspose.Pdf.Table()<o:p></o:p>
Dim row As Aspose.Pdf.Row = table.Rows.Add()
Dim fBox As New Aspose.Pdf.FloatingBox(50, 10)
fBox.Border = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.Box, Aspose.Pdf.Color.Black)
Dim text As New TextFragment("Test")
text.Position = New Position(1, 1)
fBox.Paragraphs.Add(text)
Dim dataCell As Aspose.Pdf.Cell = row.Cells.Add()
dataCell.Paragraphs.Add(fBox)
Thank you for your answer.
My problem is to visualize small diagramms like this ones:
-20% |__95%
-80% |75%_
The diagramm work fine with the following simplified code:
Dim graph As Drawing.Graph = New Drawing.Graph(102, 10)
Dim rectLeft As Drawing.Rectangle = New Drawing.Rectangle(40, 0, 10, 10)
Dim rectMiddle As Drawing.Rectangle = New Drawing.Rectangle(51, 0, 0, 10)
Dim rectRight As Drawing.Rectangle = New Drawing.Rectangle(52, 0, 45, 10)
graph.Shapes.Add(rectLeft)
graph.Shapes.Add(rectMiddle)
graph.Shapes.Add(rectRight)
Dim dataCell = row.Cells.Add()
dataCell.Paragraphs.Add(graph)
But to put the text inside the Rectangle I’m not able to do.
The solution with the FloatingBox will not allow me to position the items relatively to the parent cell to achieve percentual diagramms.
Do you have a solution for my problem?
Thank you so much for your help.
Hi there,
The issues you have found earlier (filed as PDFNEWNET-40707) have been fixed in Aspose.Pdf for .NET 17.1.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.