Issue with Content Overflow in Kendo React PDF

1 Answer 8 Views
PDF Processing
sam
Top achievements
Rank 1
sam asked on 22 Jun 2024, 07:49 AM

Hello,

I am experiencing an issue with Kendo React PDF, as shown in the attached image. The problem is that the last row of content is being shifted to the next page, even though there is some space left on the previous page. This results in unnecessary empty spaces, which affects the overall layout of the document.

Here is a summary of the issue:

  • Problem: The last row of the table content is shifted to the next page, leaving empty space on the previous page.
  • Expected Behavior: The content should not leave any empty spaces. If the content overflows, it should be wrapped and split across the pages appropriately.
  • Issue replication: I've used the sample code provided in the documentation. I've just changed the ProductName in the product.json file.
    Replace the last object present in the product.json with the below object.
    Here is the link to the demo that I've used https://www.telerik.com/kendo-react-ui/components/pdfprocessing/get-started/
{
    "ProductID": 9,
    "ProductName": "Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku Mishi Kobe Niku ",
    "SupplierID": 4,
    "CategoryID": 6,
    "QuantityPerUnit": "18 - 500 g pkgs.",
    "UnitPrice": 97.0,
    "UnitsInStock": 29,
    "UnitsOnOrder": 0,
    "ReorderLevel": 0,
    "Discontinued": true,
    "Category": {
      "CategoryID": 6,
      "CategoryName": "Meat/Poultry",
      "Description": "Prepared meats"
    }
  }

I would appreciate any guidance or solutions to resolve this issue.

Thank you in advance for your help!

Best regards,
Aman

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 25 Jun 2024, 03:50 PM

Hi, sam, 

The faced behavior is expected and it is related to the fact that the height of the last row is bigger than the remaining free space (without the page margin) in the created A4 page. Removing the configured paperSize="A4" or increasing the margin and the maxHeight will allow you to export the last row successfully on the same page:

I hope this helps but let me know in case I can assist you any further on this matter.

Regards,
Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
PDF Processing
Asked by
sam
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or