This is a migrated thread and some comments may be shown as answers.

Position on a pdf is not calculated when text wraps to the next line

1 Answer 169 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 08 Jan 2020, 09:46 PM

I have multiple tables that are stacked vertically.  In this scenario, the first table has text that wraps to the next line.  After the table drawn, the position is calculated and the next table is drawn.

The issue is that the second table covers part of the first table, but only when the last line of the first table has text that wraps

Below is the code that we are using to calculate postion.

var tableSize = table.Measure(RemainingPageSize);

position.YPosition += tableSize.Height + defaultLineHeight;
editor.Position.Translate(position.XPosition, position.YPosition);

Note:

position.YPosition and postion.XPosition are type "double"

 

 

6.5.0

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 13 Jan 2020, 02:18 PM

Hi Jason,

After taking a look, I couldn't find any issues with the sample code you have provided. Please, find attached a project demonstrating the approach of drawing tables with wrapped content. The project also demonstrates how to split tables between pages.

Let me know how this works for you. If this doesn't provide you with a solution, It will be helpful if you can share more details about how the tables are created. Can you share a simplified sample, which reproduces the issue you are currently encountering? In case you are not using the latest version of the libraries can you try updating them? Do you observe the same result?

Looking forward to hearing from you.

Regards,
Georgi
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
PdfProcessing
Asked by
Jason
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or