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 1As 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