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 

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
PdfSharp / MigraDoc help

 
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 -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
AViD



Joined: 27 Jun 2008
Posts: 2

PostPosted: Fri Jun 27, 2008 2:53 pm    Post subject: PdfSharp / MigraDoc help Reply with quote

I am new to PdfSharp, but its busy driving me nuts. I have gone throught the forum and can't find ansers to my questions

Q1: Automatic Pagebreaks
If I understand it correctly, MigraDoc Lite can do that and PdfSharp cannot. Can someone please give me a simple example how to do this?

I just want to add paragraphs and images (both of which the count/length I don't know) and want the code to sort out the pagebreaks itself.

Q2: Wordwrap
If I add a paragraph/text to the the document/page I want it to automatically use carrige return. Can someone please show me how to do this? Is there a setting or technique?

Help would be much appreciated!
Andre
Back to top
View user's profile Send private message
AViD



Joined: 27 Jun 2008
Posts: 2

PostPosted: Sat Jun 28, 2008 1:45 pm    Post subject: Reply with quote

Well, I'll help myself then. This is for anyone else having the same problem.

I just used a Migradoc table. If a paragraph in a cell is too long, it will wrap it and start it on the next line.

As for the multiple pages, just continue adding stuff in cells and rows. Then do this after the renderer's PrepareDocument() method.

Code:

rend.PrepareDocument();
         
for(int i = 1; i <= rend.FormattedDocument.PageCount; i++)
{
   PdfPage page = doc.AddPage();         
   XGraphics gfx = XGraphics.FromPdfPage(page);
   rend.RenderPage(gfx,i);            
}


i = 1 because the numbering doesn't start at the conventional, but 1, which makes sense, sortoff.
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 -> Support - 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