We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

My multiple page grid overlaps my page footer.

Thread ID:

Created:

Updated:

Platform:

Replies:

117909 Jan 7,2015 02:02 PM Jan 22,2015 05:04 AM ASP.NET Web Forms (Classic) 5
loading
Tags: PDF
Benjamin Krug
Asked On January 7, 2015 02:02 PM

Hi, I am trying to create a PDF document that has a multi-page grid with a height and width of 400 points and a footer in the style of "Page x of y".

If you run the attached code, the resulting document will include a grid on each page that spans most of the page's height.  The page footer will be visible on the page, partially covered by the grid.   In the code, I specify the said height and width.  The Syncfusion library respects the width but not the height.   What am I missing?

Here is a snippet of code from the attached project:

        private static int GRID_LEFT = 100;
        private static int GRID_TOP = 100;
        private static int GRID_WIDTH = 400;
        private static int GRID_HEIGHT = 400;


            //Draws the PdfGrid.

            PdfGridLayoutResult gridResult = pdfGrid.Draw(pdfPage,
                new RectangleF(GRID_LEFT, GRID_TOP, GRID_WIDTH, GRID_HEIGHT),
                new PdfGridLayoutFormat()
                {
                    Break = PdfLayoutBreakType.FitElement,
                    Layout = PdfLayoutType.Paginate,
                    PaginateBounds = new RectangleF(GRID_LEFT, GRID_TOP, GRID_WIDTH, GRID_HEIGHT)
                });
            // Footer.
            var font = new PdfStandardFont(PdfFontFamily.Helvetica, 10f, PdfFontStyle.Bold);
            PdfPageTemplateElement footer = new PdfPageTemplateElement(new RectangleF(0, 0, pdfDocument.Pages[0].GetClientSize().Width, 50));
            PdfPageNumberField pageNumber = new PdfPageNumberField(font);
            PdfPageCountField count = new PdfPageCountField(font);
            PdfCompositeField compositeField = new PdfCompositeField(font, "Page {0} of {1}", pageNumber, count);
            compositeField.Bounds = footer.Bounds;
            compositeField.Draw(footer.Graphics, new PointF(390, 0));
            pdfDocument.Template.Bottom = footer;



Attachment: PdfSample_31a60fa4.zip

Abirami Selvan [Syncfusion]
Replied On January 8, 2015 08:19 AM

Hi Benjamin ,

Thank you for using Syncfusion Products.

 As We have analyzed your sample , “ PdfGridheight is not changed while draw the PdfGrid using Rectangle “ is an issue. We have logged this issue .It will be fixed internally .We will let you know once we have fixed this issue .

 Thanks,

Abirami.


Benjamin Krug
Replied On January 8, 2015 09:18 AM

Noted. Thank you for the response.

Praveenkumar H [Syncfusion]
Replied On January 12, 2015 12:17 AM

Hi Benjamin,
 
Thanks for the update, please let us know if you need further assistance.
 
with Regards,
Praveen



Benjamin Krug
Replied On January 21, 2015 09:27 AM

Abirami and Praveenkumar,

   One more question.  Is there any way for either of you to know how long it will be before a fix to the above issue is released?

thanks,
Ben

Praveenkumar H [Syncfusion]
Replied On January 22, 2015 05:04 AM

Hi Ben,

The fix for the issue “ PdfGridheight is not changed while draw the PdfGrid using Rectangle” will be available in our next Essential Studio volume release it is tentatively planned on march 2015.

Please let us know if you need further assistance.

With Regards,

Praveen



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;