PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

Horizontal table breaks
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4518
Page 1 of 1

Author:  sergiyk [ Wed Dec 06, 2023 3:50 pm ]
Post subject:  Horizontal table breaks

Hello,

I have a wide table (many columns) and want to break it into 2 (or more pages) horizontally.

Is it possible to do this with MigraDoc / PDFSharp?

I tried to see a custom page width for the section where my table is rendered but in this case, it shows only 3 empty pages in the result document.

Code:
section.PageSetup.PageWidth = Unit.FromMillimeter(pageWidth);

Author:  TH-Soft [ Wed Dec 06, 2023 4:36 pm ]
Post subject:  Re: Horizontal table breaks

The current version of MigraDoc cannot break tables horizontally.

Setting large page widths works and is the recommended workaround.
Works in our apps.

Author:  sergiyk [ Wed Dec 06, 2023 6:09 pm ]
Post subject:  Re: Horizontal table breaks

The problem with "empty pages" was resolved by setting PageSetup.PageHeight as well.

However, there is another problem. I can't make it to use the Landscape page orientation.

Even if I set PageWidth to 800mm and PageHeight to 500mm and set the Orientation property to Landscape - it still shows this PDF document in the Portrait mode. What did I miss?

Author:  sergiyk [ Thu Dec 07, 2023 8:34 am ]
Post subject:  Re: Horizontal table breaks

Never mind. Fixed that as well.

We need to reset the page orientation to Portrait if PageWidth and PageHeight are set to custom values. In this case it works as expected.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/