Hello all,
I unfortunately have to bring this topic up again 4 years later in the Asp.Net Core environment. I am working with version 20.1.0.50 and here the same error exists. If a header is assigned to a document, the page break of the first page is shifted by the height of the header. The footer is not affected. I am happy to attach my code.
With kind regards
Hi Igno,
We were able to reproduce the reported behavior with provided details on our end. Currently, we are validating on this and will update the further details on April 22nd, 2022.
Regards,
Irfana J.
Hi Igno,
On our further analysis, we can overcome this issue in sample level to
create the pdf page after adding header and footer. Because page client size
does not update properly, if adding the document header after creating the
page. So that, the reported spacing issue occurs first page alone. We have
modify the sample with this solution. Please find the download link below,
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample-1170951227
Output PDF: https://www.syncfusion.com/downloads/support/directtrac/general/pd/test1922731895
Please let us know, if you need further assistance on this.
Regards,
Irfana J.
Hello all,
thank you for the quick reply.
Unfortunately, that does not solve the problem.
The error is simply moved up a bit.
Now the spacing is added directly under the header.
Do you have any other suggestions or could you not just patch the problem?
With kind regards
Hi Igno,
On our further analysis, reported spacing behaviour occurs due to that, drawing rectangle with specific Y location. Please refer your below code snippet,
|
graphics.DrawRectangle(blackPen, Rectangle(20, 27, 85, 40)); graphics.DrawRectangle(blackPen, Rectangle(125, 32, 75, 52.5f)); |
We can able to over come the spacing behaviour to draw the rectangle in 0th Y position. We have modify the sample with this solution. Please find the download link below,
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample-144239440
Output PDF: https://www.syncfusion.com/downloads/support/directtrac/general/pd/test11983319629
Please let us know, if you need further assistance on this.
Regards,
Irfana J.
Nice 1.
Thank you very much!
Feel free to distribute the template, it complies with the German DIN 5008 standard and can be used as an invoice letter.
With kind regards
Hi Ingo,
Thank you for your update. We hope the sample provided was useful.
Please let us know if you need any further assistance in this.
Regards,
Gowthamraj K