PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon May 06, 2024 7:09 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Nov 26, 2009 11:48 am 
Offline

Joined: Thu Nov 26, 2009 11:36 am
Posts: 2
Hello,

I have the following two situations:

I have a large table that uses more than one page, with migradoc it wil automatically go on to the next page.
Using this renderer:

1.
Code:
Document MigraDocument = new Document();
        Section MigraSection = MigraDocument.AddSection();

        PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
        renderer.Document = MigraDocument;
//........

Table table = MigraSection.AddTable();

//..........
        renderer.RenderDocument();
//...........
        renderer.PdfDocument.Save(stream, false);

This situation works fine.

Sample: Situation 1
As you can see with this rendering method it works fine. But I can't use XGraphics.

but then..

2.
I want to use graphics made by pdf sharp in combination with a table that is also multipaging.
using this renderer:

Code:
        PdfDocument pDoc = new PdfDocument();

        Document MigraDocument = new Document();
        Section MigraSection = MigraDocument.AddSection();

        PdfPage page = pDoc.AddPage();
        XGraphics graph = XGraphics.FromPdfPage(page);
        graph.MFEH = PdfFontEmbedding.Always;

//.......
        Table table = MigraSection.AddTable();[url][/url]

//........

        MigraDoc.Rendering.DocumentRenderer docRenderer = new DocumentRenderer(MigraDocument);
        docRenderer.PrepareDocument();

        docRenderer.RenderObject(graph, 20, 20, 550, table);

//.....

        pDoc.Save(stream, false);



This situation shows me my images and drawstrings perfect but when I try to draw a (docRenderer.RenderObject(graph, 20, 20, 550, table);) It won't go to the next page automatically using page breaks.

Sample: Situation 2
As you can see I have the background image I needed but the table won't continue on the next page.

I hope you can help me on this one.
Please tell me how to use Migradoc's multi paging tables together with PDFSharp's XGraphics.

Kind Regards, Nick

Migradoc and PDFSharp
GDI+
Version: 1.3


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 27, 2009 11:51 am 
Offline

Joined: Thu Nov 26, 2009 11:36 am
Posts: 2
So if you don't know the answer to a question, you just don't react?
I know already that it is not (yet) possible with this Library.

Thats why I want to convince everyone to use iTextSharp, a better PDF library I just used for this problem.

Greetings,
Nick


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 30, 2009 9:09 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
nicknijenhuis wrote:
So if you don't know the answer to a question, you just don't react?

No.
I monitor this forum Monday through Thursday (as my time permits).
I can't answer all questions. Some questions require research or feedback from others.

MigraDoc is older than PDFsharp. Mixing PDFsharp and MigraDoc will be improved in the future.

nicknijenhuis wrote:
I know already that it is not (yet) possible with this Library.

I think it can be done using a slightly different approach (solution is described on this forum).

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 77 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