New to Telerik Reporting? Download free 30-day trial

How to Produce PDF Files Fitting the Physical Page on Printing

Environment

Product Progress® Telerik® Reporting
Rendering Format PDF

Description

On printing a PDF file from a PDF Reader, there is an option 'Fit to Page' allowing you to scale the document's content to fit the selected page size. This feature can be used to scale reports on printing them.

Solution 

  1. Open the report in a Report Designer:

    • Set the report's PageSettings.PaperKind property to Custom

    • Set the report's PagseSettings.PaperSize property to a size allowing you to gather the whole content into a single page in Print preview.

  2. Configure the PDF rendering extension:

    For example:

<configuration>
  <configSections>
    <section
            name="Telerik.Reporting"
            type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=[X.X.X.X], Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
            allowLocation="true"
            allowDefinition="Everywhere"/>
  </configSections>
  <Telerik.Reporting>
    <Extensions>
      <Render>
        <Extension name="PDF" description="PDF Description">
          <Parameters>
            <Parameter name="JavaScript" value="this.print({bUI: true, bSilent: false, bShrinkToFit: true});"/>
            <Parameter name="ViewerPrintScaling" value="AppDefault"/>
          </Parameters>
        </Extension>
      </Render>
    </Extensions>
  </Telerik.Reporting>
....
</configuration>

The scaling mechanism of PDF Readers is out of the scope of the reporting engine. 

In this article