Setting Document Information
To set the document information, enter values in the Author, Comment, Company, CreationTime, Creator, Keywords, Manager, Operator, Producer, RevisionTime, Subject, and Title properties either in the designer or in code.
In the Designer
1. In the C1PrintDocument Properties window, locate the DocumentInfo property and expand the property node.
2. Enter values and press ENTER when finished to set the property.
Note: Some properties have built-in editors to help you set the property, such as:
Clicking the ellipsis button next to the Keywords property opens the String Collection Editor, where you can enter keywords for the document.
Clicking the drop-down arrow next to the CreationTime or RevisionTime properties allows you to choose a date.
The default value for the Creator property is ComponentOne Document Engine.
In Code
The following code should be added to the Form_Load event.
To set the Author property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Author = "Jane Doe"
• C#
this.c1PrintDocument1.DocumentInfo.Author = "Jane Doe";
To set the Comment property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Comment = "This is a C1PrintDocument file."
• C#
this.c1PrintDocument1.DocumentInfo.Comment = "This is a C1PrintDocument file.";
To set the Company property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Company = "ComponentOne"
• C#
this.c1PrintDocument1.DocumentInfo.Company = "ComponentOne";
To set the CreationTime property, add the following code:
Me.C1PrintDocument1.DocumentInfo.CreationTime = "2/29/08"
• C#
this.c1PrintDocument1.DocumentInfo.CreationTime = "2/29/08";
To set the Creator property, add the following code. The default value is ComponentOne Document Engine.
Me.C1PrintDocument1.DocumentInfo.Creator = "C1PrintPreview"
• C#
this.c1PrintDocument1.DocumentInfo.Creator = "C1PrintPreview";
To set the Keywords property, add the following code. Keywords should be separated with a space.
Me.C1PrintDocument1.DocumentInfo.Keywords = New String() {"C1PrintPreview ComponentOne C1PrintDocument"}
• C#
this.c1PrintDocument1.DocumentInfo.Keywords = new string() {"C1PrintPreview ComponentOne C1PrintDocument"}
To set the Manager property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Manager = "John Smith"
• C#
this.c1PrintDocument1.DocumentInfo.Manager = "John Smith";
To set the Operator property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Operator = "Joe Brown"
• C#
this.c1PrintDocument1.DocumentInfo.Operator = "Joe Brown";
To set the Producer property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Producer = "ComponentOne Preview for .NET"
• C#
this.c1PrintDocument1.DocumentInfo.Producer = "ComponentOne Preview for .NET";
To set the RevisionTime property, add the following code:
Me.C1PrintDocument1.DocumentInfo.RevisionTime = "2/29/08"
• C#
this.c1PrintDocument1.DocumentInfo.RevisionTime = "2/29/08";
To set the Subject property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Subject = "Document Creation"
• C#
this.c1PrintDocument1.DocumentInfo.Subject = "Document Creation";
To set the Title property, add the following code:
Me.C1PrintDocument1.DocumentInfo.Title = "Creating Documents with C1PrintPreview"
• C#
this.c1PrintDocument1.DocumentInfo.Title = "Creating Documents with C1PrintPreview";
|