PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 16, 2024 1:50 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 Nov 02, 2010 3:15 pm 
Offline

Joined: Tue Nov 02, 2010 3:07 pm
Posts: 1
In reviewing the sample MixMigraDocAndPdfSharp sample I am trying to figure out how to determine where the MigraDoc paragraph ends in the XGraphics object. I have a fair bit of code that is built utilizing PDFSharp / XGraphics and would like to use MigraDoc's superior paragraph rendering in the middle of one of my pages. Unfortunately I can't determine where the paragraph ends.

Any ideas?


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 05, 2010 3:05 pm 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

You can integrate PdfSharp objects into migradoc, but not really the other way round. It was a hurdle i learned i had to jump after I tried to do almost everything with pdfsharp, then add in the functionality of migradoc later - i found that it was worth starting again and using migradoc for everything i could, and pdfsharp for the things i couldnt do with migradoc.

With regards to measuring paragraphs, there isnt really the concept of "Height" as they are just containers, which size according to the page they are displayed on and the other contents of that page. I raised the topic: http://forum.pdfsharp.net/viewtopic.php?f=2&t=780#p1904 a while ago which might help you.

But my case for doing this was that I had a migradoc table, which I wanted to draw a simple "progress bar" graphic into with pdfsharp (in a specific cell). The solution Thomas Hoevel came up with pretty much worked (although i could never get it to be 100% accurate with the measurements and it took quite a while to get it all right). But i later discovered that it was basically easier to create a new PdfDocument, add a page with a custom size (i.e. the output size of the image i was creating) draw onto that, then save that as a .pdf, then load the .pdf into the migradoc cell object and let migradoc worry about the positioning.

Hope this helps,

Mike


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