PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:54 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Oct 16, 2008 2:13 pm 
Offline

Joined: Thu Oct 16, 2008 1:54 pm
Posts: 14
PDFsharp 1.2.1269.0;
MigraDoc 1.2.2546.0;
Visual Studio 2008 SP1;
Windows Vista 32-bit;


1. Open the GDI+ MixMigraDocAndPdfSharp project;

2. After line 88 (doc.AddSection), add the following:
Code:
sec.PageSetup.PageWidth = Unit.FromCentimeter(12);
sec.PageSetup.PageHeight = Unit.FromCentimeter(1);
sec.PageSetup.TopMargin = Unit.Zero;
sec.PageSetup.BottomMargin = Unit.Zero;
sec.PageSetup.LeftMargin = Unit.Zero;
sec.PageSetup.RightMargin = Unit.Zero;


3. Run the project;

On my system, the project hangs on the call to PrepareDocument, with very high CPU and memory usage. It seems to be stuck in an infinite loop within the TopDownFormatter.FormatOnAreas method.


I encountered this in a project where I'm trying to use MigraDoc to draw a series of formatted paragraphs onto an existing PDF document within a specific block. The text is entered by the end-user, so I have no way of determining the required height.

If I remove the height from the page setup, the text is rendered incorrectly. As a workaround, I have had to set the height to a large multiple of the height of the block, and hope that the text will never exceed this height.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 48 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