New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the SpreadsheetPdfSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class SpreadsheetPdfSettingsBuilder

Inheritance: objectSpreadsheetPdfSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public SpreadsheetPdfSettingsBuilder(SpreadsheetPdfSettings settings)
Parameters:settingsSpreadsheetPdfSettings

Methods

The area that will be exported.The supported values are: * workbook - Exports the full workbook, including all sheets. * sheet - Exports the active sheet. * selection - Exports the selected area on the active sheet.

C#
public SpreadsheetPdfSettingsBuilder Area(string value)
Parameters:valuestring

The value that configures the area.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Area("selection"))
)

The author of the PDF document.

C#
public SpreadsheetPdfSettingsBuilder Author(string value)
Parameters:valuestring

The value that configures the author.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Author("John Doe"))
)

Specifies if the Print dialog should be opened immediately after loading the document.

C#
public SpreadsheetPdfSettingsBuilder AutoPrint(bool value)
Parameters:valuebool

The value that configures the autoprint.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.AutoPrint(true))
)

The creator of the PDF document.

C#
public SpreadsheetPdfSettingsBuilder Creator(string value)
Parameters:valuestring

The value that configures the creator.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Creator("John Doe"))
)

The date when the PDF document is created. Defaults to new Date().

C#
public SpreadsheetPdfSettingsBuilder Date(DateTime value)
Parameters:valueDateTime

The value that configures the date.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Date(DateTime.Now))
)

Specifies the file name of the exported PDF file.

C#
public SpreadsheetPdfSettingsBuilder FileName(string value)
Parameters:valuestring

The value that configures the filename.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.FileName("Sheet1.pdf"))
)

Indicates whether to fit the content of the Spreadsheet to the width of the page.

C#
public SpreadsheetPdfSettingsBuilder FitWidth(bool value)
Parameters:valuebool

The value that configures the fitwidth.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.FitWidth(true))
)

If set to true, the content will be forwarded to proxyURL even if the browser supports the saving of files locally.

C#
public SpreadsheetPdfSettingsBuilder ForceProxy(bool value)
Parameters:valuebool

The value that configures the forceproxy.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.ForceProxy(true))
)

Indicates whether to export the cell guidelines.

C#
public SpreadsheetPdfSettingsBuilder Guidelines(bool value)
Parameters:valuebool

The value that configures the guidelines.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Guidelines(true))
)

Indicates whether to center the content horizontally. For more information, refer to vCenter.

C#
public SpreadsheetPdfSettingsBuilder HCenter(bool value)
Parameters:valuebool

The value that configures the hcenter.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.HCenter(true))
)

Specifies the quality of the images within the exported file, from 0 to 1.

C#
public SpreadsheetPdfSettingsBuilder JpegQuality(double value)
Parameters:valuedouble

The value that configures the jpegquality.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.JpegQuality(1))
)

If set to true all PNG images contained in the exported file will be kept in PNG format.

C#
public SpreadsheetPdfSettingsBuilder KeepPNG(bool value)
Parameters:valuebool

The value that configures the keeppng.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.KeepPNG(true))
)

Specifies the keywords of the exported PDF file.

C#
public SpreadsheetPdfSettingsBuilder Keywords(string value)
Parameters:valuestring

The value that configures the keywords.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Keywords("food order"))
)

If set to true, reverses the paper dimensions if that width is needed as the larger edge.

C#
public SpreadsheetPdfSettingsBuilder Landscape(bool value)
Parameters:valuebool

The value that configures the landscape.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf => pdf.Landscape(true))
)

Specifies the margins of the page (numbers or strings with units).The supported values are: mm; cm; in or pt (default).

C#
public SpreadsheetPdfSettingsBuilder Margin(Action<SpreadsheetPdfMarginSettingsBuilder> configurator)
Parameters:configuratorAction<SpreadsheetPdfMarginSettingsBuilder>

The action that configures the margin.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.Margin(margin =&gt; margin.Top(50)))
)

Specifies the paper size of the PDF document. The default auto setting means that the paper size is determined by the content.The supported values are: * A predefined size - A4, A3, and so on. * An array of two numbers which specify the width and height in points (1pt = 1/72in). * An array of two strings which specify the width and height in units. The supported values are mm, cm, in, and pt.

C#
public SpreadsheetPdfSettingsBuilder PaperSize(string value)
Parameters:valuestring

The value that configures the papersize.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.PaperSize("A3"))
)

A name or keyword which indicates where to display the document that is returned from the proxy. To display the document in a new window or iframe, set the proxy Content-Disposition header to inline; filename="<fileName.pdf>".

C#
public SpreadsheetPdfSettingsBuilder ProxyTarget(string value)
Parameters:valuestring

The value that configures the proxytarget.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.ProxyTarget("_blank"))
)

The URL of the server side proxy which will stream the file to the end user. A proxy will be used when the browser is not capable of saving files locally, for example, Internet Explorer 9 and Safari. The developer is responsible for implementing the server-side proxy. The proxy will return the decoded file with the Content-Disposition header set to attachment; filename="<fileName.pdf>".The proxy will receive a POST request with the following parameters in the request body: contentType - The MIME type of the file.; base64 - The base-64 encoded file content. or fileName - The file name as requested by the caller..

C#
public SpreadsheetPdfSettingsBuilder ProxyURL(string value)
Parameters:valuestring

The value that configures the proxyurl.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.ProxyURL(Url.Action("Index_Proxy", "Home")))
)

Sets the subject of the PDF file.

C#
public SpreadsheetPdfSettingsBuilder Subject(string value)
Parameters:valuestring

The value that configures the subject.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.Subject("Food Orders"))
)

Sets the title of the PDF file.

C#
public SpreadsheetPdfSettingsBuilder Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.Title("Food Orders"))
)

Indicates whether to center the content vertically. For more information, refer to hCenter.

C#
public SpreadsheetPdfSettingsBuilder VCenter(bool value)
Parameters:valuebool

The value that configures the vcenter.

Returns:

SpreadsheetPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Pdf(pdf =&gt; pdf.VCenter(true))
)