multipage - Multiple pages in the same PDF reporting with PDFsharp -
I am getting values from the database and the collection of all the values is larger than the single page. The number of pages is unknown and may vary according to the report's report. Currently, only 1 page of multiple pages is being printed, but every page has this information. I do not have the same information in every page that needs constant information in the page. How can I do this with PDFsharp?
Here I am giving my code to understand ...
document document = new document (); // Create the table var sec = doc.AddSection (); Var Table = Second. AdTable (); Table. Format.font Size = 6; Table. Borders. Distance = 0; Table. Borders. Color = MigraDoc.DocumentObjectModel.Colors.DarkGray; Var Renderer = New Document Handler (Doctor); Renderer.PrepareDocument (); Int total = Renderer. Format Documents Page count; For (Int i = 1; I & lt; = Total page; ++ i) {PDF page PDF page = PDF. Edit page (); XGraphics GFX = XGraphics. FMPDF page (PDF page); Renderer.RenderObject (GFX, Exotic Foammillimeter (10), Exotic Foammillimeter (10), Exotic Foammillimeter (Double Maxwell), Table); Gfx.Dispose (); }
You can create a complete document of the entire loop for MigraDoc:
PDF document renderer = new PDF document renderer (true, pdfsrpppdf.ppffntmbedadding;); Renderer.Document = document; Renderer.RenderDocument ();
Your loop has a variable i
that is not used in your code. If you want to do it in a complicated way, then use the renderpage
instead of RenderObject
.
Also see:
Comments
Post a Comment