Search code examples
reportrdlc

how to set the page size to a4 in windows form for pdf report generation using asp.net?


I am working on a windows application wherein I am unable to set the page size to a4 sheet. While taking print or saving the report as pdf the content of the report is expanded to 2-3 pages.How to overcome this?

I do have tried using using these

iTextSharp.text; using iTextSharp.text.pdf; then also i am unable to get it.


Solution

  • If the content of the report doesn't fit on a single page it will expand and of course need multiple pages. Unless you're completely certain that the data would fit a single page, there is no way of stopping this from happening.

    But if you're completely positive that it would fit a single page, make sure that all the elements have the property Keep contents together on a single page, if possible checked and that both properties that add a page break are unchecked (Add a page break before and Add a page break after).

    Below is an image as an example.

    enter image description here


    Edit: Including the Page properties of a regular A4 sized Report.

    enter image description here