We have
some difficulties with tables and row breaks on page breaks in C#.
You can see the scheme of the table we created (it works fine) on the table1.jpg file attachaed. Each cell contains a nested table with a header and a content.
The 2x2
cell is totally filled with a picture (so a nested table with a header and a picture for content).
When we add
this table to the end of our document, here is what happens: the picture is too huge to fit in the first page (cf table_prob.jpg). The red
line is the page break.
The table attributes are set as IsRowBroken
= false ; IsBroken = true ;
We expect the table to behave like in the table_whatwewant.jpg file.
We already tried image positioning attributes,
IsKeptWithNext attributes, and IsBroken attributes, and many other things.
Is there any way to do this automatically,
without calculating successively each first page element height, adding it
together, and inserting a page break manually at the right location?
It’s pretty difficult for us to do that, cause we have to write another sample code just for you (all our work is dynamical and depends on our database). Can’t you try to reproduce it yourself?
We will try our level best to replicate this issue at our end and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for the delay and inconvenience.
We had time to make the sample code finally. But by doing this we found other issues. We attached to this message the sample. You should at first launch the AsposeSample3 cause this is the one that summarize the case we have in our release version. As you can see when you launch it there are the following issues : - the image should be with the header in the second page as showed at the beginning of this topic (here’s our main issue, the others may be linked but are not as important as this one) - the bottom margin between each nested table should be gray as you can see at the last line - when we applied a top margin to the footer, it appears as a bottom margin !
AsposeSample1 and 2 showed the two steps by which we passed before having this one. In the first one you can see that without nested table or content, the middle cell is broken between the two pages and in the second one you can see the same issue with an image as a content.
Thanks for sharing the code snippet.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>
I
have tested the scenario and I am able to reproduce the table break issue. For the
sake of correction, I have logged it in our issue tracking system as <span style=“font-family:“Arial”,“sans-serif””>PDFNEWNET-30405. We
will investigate this issue in details and will keep you updated on the status
of a correction.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””><span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>
I downloaded the new version and check if it worked, and it didn’t. With exactly the same sample of code I still have the same problem. Can you please look at it again.
Hi Anouk,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
First of all, please accept our apologies for replying you
late.
I have checked your issue with the latest version of
Aspose.Pdf for .NET v6.7 and the issue still exists. I have reopened your issue
and asked the development team to look into this issue on a high priority. As
soon as I get a response, I will update you via this forum thread.