PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 25, 2024 1:58 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Horizontal table breaks
PostPosted: Wed Dec 06, 2023 3:50 pm 
Offline

Joined: Wed Dec 06, 2023 3:26 pm
Posts: 3
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);


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 06, 2023 4:36 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
The current version of MigraDoc cannot break tables horizontally.

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

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 06, 2023 6:09 pm 
Offline

Joined: Wed Dec 06, 2023 3:26 pm
Posts: 3
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 07, 2023 8:34 am 
Offline

Joined: Wed Dec 06, 2023 3:26 pm
Posts: 3
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 296 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group