PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PrepareDocument hangs with small section

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
RichardD



Joined: 16 Oct 2008
Posts: 1

PostPosted: Thu Oct 16, 2008 2:13 pm    Post subject: PrepareDocument hangs with small section Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com