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 

Using both Migradoc and PDFSharp

 
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
sjohnston



Joined: 09 Feb 2007
Posts: 2

PostPosted: Fri Feb 09, 2007 6:09 pm    Post subject: Using both Migradoc and PDFSharp Reply with quote

I want to create a document using both packages. I cannot for the life of me find a sample that uses both packages on one document.

Basically, I have an invoice that I want to draw some graphics by using XGraphics.

Any easy solutions?
Back to top
View user's profile Send private message
Thomas Hoevel



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

PostPosted: Mon Feb 12, 2007 8:45 am    Post subject: Reply with quote

We use MigraDoc to create the document. For example we leave some pages blank.

Then we use PDFsharp to add XGraphics later. Now we fill the blank pages with pages from other PDF files.

This is not an elegant solution, but it works. And PDFsharp works fast.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
sjohnston



Joined: 09 Feb 2007
Posts: 2

PostPosted: Wed Feb 14, 2007 11:49 pm    Post subject: Reply with quote

So just to confirm, you use the DocumentRender, add the migradocument as the document, and then render the document? At what point do you reference the blank pages, and add the XGraphics?

Just seems like a common task where you would want to have a high level document, such as an invoice or a report, that you would also want to add graphics to such a document.

Any other suggestions, or shall we add this as a requested enhancement?
Back to top
View user's profile Send private message
Thomas Hoevel



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

PostPosted: Thu Feb 15, 2007 9:03 am    Post subject: Reply with quote

AFAIK there is no interface to include XGraphics in MigraDoc documents.
I guess this has historic reasons. In the beginning there was MigraDoc, but without PDFsharp. Then we developed PDFsharp as a replacement for the PDF library we used before.
And: MigraDoc is a document generator for PDF, Word, and HTML. XGraphics are specific to the PDF renderer are not (currently) supported by the other two.

MigraDoc has a charting module. I don't know exactly how it works, but this is one way to include graphics.

MigraDoc supports various images. Creating a PNG file for inclusion in MigraDoc is another way.
This is how you add logos, but you can also add individually created graphics like charts etc.

Creating a PDF file with MigraDoc with blank pages or blank areas on pages is another way. After MigraDoc has completed, you can open the file with PDFsharp, access individual pages and add your graphics.
This is easier than it sounds - but not as easy as it could be.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Thu Mar 08, 2007 11:46 pm    Post subject: Reply with quote

You can create a MigraDoc document and render a page or a single paragraph using an XGraphics object.

Search for class ShapesMigraDocObject in XGraphicsLab, that will give you some hints how to do it.
Back to top
View user's profile Send private message Send e-mail
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