[]
        
(Showing Draft Content)

Printing to PDF

You can print a sheet to a Portable Document Format (PDF, version 1.4) file using the PrintToPdf method in the PrintInfo class. Use the PdfFileName property to specify the file name and location to which to save the file. Since PrintInfo objects are assigned to individual sheets, this method prints an individual sheet.

You can set a password with the PdfSecurity property.

The following cell type items are not printed to PDF:

Cell Type

Description

GcTextBoxCellType

LineSpace, Ellipsis, or DisplayAlignment

Any Gc cell type

Side button appearance

GcDateTimeCellType

Field appearance

GcNumberCellType

Field appearance

GcTimeSpanCellType

Field appearance

GcMaskCellType

Field appearance

GcCharMaskCellType

Character box appearance

GcComboBoxCellType

Image appearance or ellipsis

To customize print settings, refer to Understanding the Printing Options and Customizing the Printed Page Header or Footer. To allow Spread to determine the best print settings, refer to Optimizing the Printing Using Rules.

Using Code

Call the PrintToPdf property in the PrintInfo class to print the specified sheet.

Example

This example code saves the sheet to a PDF file.

FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.PrintToPdf = true;
printset.PdfFileName = "D:\\results.pdf";
// Assign the printer settings and print
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
Dim printset As New FarPoint.Win.Spread.PrintInfo()
printset.PrintToPdf = True
printset.PdfFileName = "D:\results.pdf"
' Assign the printer settings and print
fpSpread1.Sheets(0).PrintInfo = printset
fpSpread1.PrintSheet(0)

Using the Spread Designer

  1. Select the File menu.

  2. Select Print.

  3. Select PrintPDF.

  4. Use the Save dialog to pick a location and specify a file name.

See Also

Printing an Entire Sheet

Printing a Child View of a Hierarchical Display

Printing Particular Pages

Printing the Portion of the Sheet with Data

Printing a Range of Cells on a Sheet

Printing an Area of the Sheet

Printing a Sheet with Cell Notes

Printing a Sheet with Shapes

Printing in Duplex Mode