PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 10, 2016 12:54 pm 
Offline

Joined: Mon May 09, 2016 8:25 pm
Posts: 1
Hopefully a kind soul will be able to point me in the right direction.

I have built a document using TextFrames to hold text and tables elements and for the most part it renders will. The edge cases where I have a lot of text doesn't work out so well.

I have read various suggestions on how you simply "draw white boxes" outside the text frames to mask off the overflow. I thought about modifying the source, but I couldn't quite figure out where in the get/draw text infos to eliminate elements from appearing. Maybe I will have more luck in the afternoon?

If there was a way to sponsor adding this feature I would certainly be willing to do it...

--mike


Top
 Profile  
Reply with quote  
PostPosted: Tue May 10, 2016 1:28 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

If the TextFrame only contains a simple paragraph (no images, only one font size) then a possible hack would be using the XTextFormatterEx2 class to figure out how much text can be put into the TextFrame.
It's a hack and may need some tweaking to avoid being off by one line due to e.g. Pragraph or TextFrame margins or such.

See here:
viewtopic.php?p=9372#p9372


Making the change in the class that renders a TextFrame would be the nice and clean approach, but I have no idea where to start searching.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 305 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