ComponentOne Preview Classic for WinForms: Preview Classic for WinForms Task-Based Help > Exporting C1PrintDocument > Exporting C1PrintDocument to PDF

Exporting C1PrintDocument to PDF

To export C1PrintDocument to PDF, set the ExportToPDF method in code or in the Save As dialog box:

In Code

The following code saves the C1PrintDocument as C1Preview.pdf in the Temp directory:

      Visual Basic

Me.C1PrintDocument1.ExportToPDF("c:\temp\C1Preview.pdf", True, True)

      C#

this.c1PrintDocument1.ExportToPDF(@"c:\temp\C1Preview.pdf", true, true);

In the Save As Dialog Box

You can also export C1PrintDocument in the preview using the Save As dialog box:

1.   Click the File Save button located on the toolbar.

 

The Save As dialog box will open.

2.   Enter a name for the PDF file in the File name box and select Adobe PDF (*.pdf) from the Save as type box.

3.   Click Save. The Save as PDF dialog box will open.

 

The Save as PDF dialog box allows you to add document security and restrictions, use compression, embed TrueType fonts, and preview the PDF file in Adobe Acrobat Reader. You can also set information about the document by clicking the Document Info button. For more information document information, see Setting Document Information.

4.   Confirm your settings and click OK.

The document is created in the folder you specified.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.