Freigeben über


FAQ: How do I get the same page number in web page and PDF?

Question

I have set both Interactive Size and Page Size to 8.5 inch in width and 11 inch in height. However, the report renders more pages in PDF than in Report Manager.

Please give me some suggestions on why this is happening and how can I get the same page number when I see it in Report Manager and in PDF or any other formats.

  

Answer

Reporting Services is designed to use 2 different rules in pagination:

  • Physical pagination is used to the print control and the TIFF and PDF rendering extensions. It is controlled by the PageSize properties
  • Logical pagination is used to the HTML and GDI rendering extensions. It is controlled by the InteractiveSize properties

However, if just specify the same size to PageSize and InteractiveSize, we will get more pages in PDF or other physical formats due to the Margin properties of Report are only applied in the physical pagination.

For example, if the InteractiveSize and the PageSize are both set to 8.5in x 11in and the Margins are 1in, then the actual size of printing area in physical page is 6.5(8.5-1-1)in x 9(11-1-1)in. This leads to more pages are generated when render in physical pagination.

In order to make the page numbers matches, we need to ensure the acutrul size of printing area and the interactive size are the same. Please refer to the equalities below:

  • Width(InteractiveSize) + Margin(Left) + Margin(Right) = Width(PageSize)
  • Height(InteractiveSize) + Margin(Top) + Margin(Bottom) = Height(PageSize)

Since sometimes the PageSize is specified corresponding to a specific paper size like A4 for printing, we suggest you to keep the PageSize to 8.5in x 11in and adjust the InteractiveSize and Margins based on the equalities.

 

More Information

Logical and Physical Pagination Rules:
https://blogs.msdn.com/b/bwelcker/archive/2005/08/19/454043.aspx

 

Applies to

Reporting Services 2005

Reporting Services 2008

Reporting Services 2008R2

Comments

  • Anonymous
    August 03, 2014
    Finally, short and clear. Thanks,