PdfSharpCore icon indicating copy to clipboard operation
PdfSharpCore copied to clipboard

Make RenderInfo public

Open DarioSalcedo opened this issue 3 years ago • 2 comments

Hello @ststeiger , please could you make the RenderInfo class public again. In the original sources I could do this to get the height of the document but now I can't access that class

The method C# public RenderInfo[] GetRenderInfoFromPage(int page) has also been removed: link


 DocumentRenderer renderer = new DocumentRenderer(document);
            renderer.PrepareDocument();
            MigraDocCore.Rendering.RenderInfo[] info = renderer.GetRenderInfoFromPage(1);
            int index = info.Length - 1;

            double stop = info[index].LayoutInfo.ContentArea.Y.Millimeter + info[index].LayoutInfo.ContentArea.Height.Millimeter
                + 2 * Tamanios.TopBottomPageMargin; // Add more if you have bottom page margin, borders on the last table etc.
            currentSection.PageSetup.PageHeight = Unit.FromMillimeter(stop);         

ERROR: Cannot access internal class "RenderInfo"

thanks in advance :)

DarioSalcedo avatar Apr 28 '22 23:04 DarioSalcedo

I have the same issue, did you solve this?

Inexad avatar Nov 25 '22 06:11 Inexad

This could be closed, the RenderInfo is now public

Apflkuacha avatar Oct 20 '23 14:10 Apflkuacha