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 

MigraDoc

 
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
johnstratoudakis



Joined: 22 Oct 2008
Posts: 3
Location: NYC

PostPosted: Wed Oct 22, 2008 1:59 pm    Post subject: MigraDoc Reply with quote

Does this forum also include support for MigraDoc?

I have searched the internet for some time and have been unable to find such a website.

Otherwise, let me say what I am trying to do, I am using MigraDoc to replace all my messy PDFSharp code and want to modify the behavior of the MigraDoc Image class to be able to support the creation of an Image object from a GDI+ Image. Currently it only supports the creation of an Image object by reading a GDI+ image from file, which is rather messy for my situation (I love storing all my images as resources)

The thing is that I am doing this where I work, and I want to make sure that any changes I make will be fine even let's say I leave or this project gets moved to another location. So I was hoping to make this change and to contribute it to the MigraDoc team so that they can include it in their future releases.

Does anybody know who I can contact in the MigraDoc team?

Thanks!

John
Back to top
View user's profile Send private message Visit poster's website AIM Address
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Wed Oct 22, 2008 2:53 pm    Post subject: Reply with quote

Hi, John,

this is the right place.

How will you do this?

I see the following potential problems:
  • MigraDoc documents can persist in text files (MGDDL) - this only works if images exist in files, too (this is also used for the Preview dialogue)
  • MigraDoc can emit HTML documents - this only works if images exist in files
  • MigraDoc can emit RTF documents - IIRC images use references to files in the file system
  • PDF shouldn't be a problem as images are stored inside the PDF


Therefore images that only exist in memory will only work with PDF (not with Preview, not with RTF).
Temporary files should solve the Preview issue (or an exception should be thrown).
RTF and HTML will need permanent files (how about using hash codes as filenames to avoid duplicate files?) - otherwise an exception should be thrown.

Contributions will be included in future releases if approved by our chief developer ...
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
johnstratoudakis



Joined: 22 Oct 2008
Posts: 3
Location: NYC

PostPosted: Wed Oct 22, 2008 4:29 pm    Post subject: MigraDoc Reply with quote

I see, this makes sense, because I am using MigraDoc to create PDF documents only, I did not think of the ramifications of using it with RTF and other formats.

Perhaps I can solve my problem for now by using Temporary files and offer my help in making it work the other way for all document formats.

In a nutshell, I modifed the MigraDoc.DocumentObjectModel.Shapes.Image class to have an overloaded constructor that accepts a Stream which is then saved as a new field named "ImageStream". Then, afterwards the MigraDoc.Rendering.ImageRenderer tries to load the file by looking at the imageFilePath property, which I intercepted in the Format(), Render() and CalculateImageDimensions() to use the Stream only if the imageFilePath property is null.

So I am guessing that I have to properly save the Image Stream in the Serialize object to get this to work?
Back to top
View user's profile Send private message Visit poster's website AIM Address
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