PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 8:06 pm

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
PostPosted: Fri Nov 10, 2023 3:59 pm 
Offline

Joined: Fri Nov 10, 2023 3:46 pm
Posts: 2
Location: Burlington, KY
I can't seem to get automatic pagination to work for pdf generation where there are multiple line being added to the body of the pdf document. Did something change in v1.5? I didn't have this problem with v1.3.

EX: I created a header and footer section with textframes and tables and for the body i added a textframe and a table and a for/next loop that populates a bunch of rows.

Also, to specify the area of the document for the body, how that set up that area? This is how I set it up for v1.3. I'm not sure this is working correctly for v1.5

Code:
Section section = _document.AddSection();

PageSetup pgs = new PageSetup()
{
    PageFormat = PageFormat.Letter,
    PageWidth = new Unit(8.5, UnitType.Inch),
    PageHeight = new Unit(11, UnitType.Inch),
    TopMargin = new Unit(9.87, UnitType.Centimeter),
    LeftMargin = new Unit(0.5, UnitType.Inch),
    RightMargin = new Unit(0.5, UnitType.Inch),
    BottomMargin = new Unit(8.3, UnitType.Centimeter),
    Orientation = Orientation.Portrait
};

section.PageSetup = pgs;


Any help is greatly appreciated.
Thank you


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 12, 2023 4:59 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
MigraDoc does not support page breaks for TextFrames. If you create a TextFrame that is too big to fit a single page, then you are in trouble.
Page breaks for tables are supported as long as each row fits on a single page.
Current version is 6.0.0.
A lot has changed between version 1.3 and version 1.5, but no fundamental changes with respect to page breaks.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 13, 2023 1:06 pm 
Offline

Joined: Fri Nov 10, 2023 3:46 pm
Posts: 2
Location: Burlington, KY
What about using Paragraph? Will that page properly?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 13, 2023 1:28 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
ghendrickson wrote:
What about using Paragraph? Will that page properly?
Yes.

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


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: No registered users and 388 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