ComponentOne Reports for WPF
C1.C1Preview Namespace / C1PrintDocument Class
Properties Methods Events

In This Topic
    C1PrintDocument Class Members
    In This Topic

    The following tables list the members exposed by C1PrintDocument.

    Public Constructors
     NameDescription
    Public ConstructorInitializes a new instance of the C1PrintDocument class.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets a value indicating whether to add messages to the current document's Warnings collection when script errors are found.

    The default value is false.

     
    Public PropertyGets or sets a value indicating whether methods can be called on the current document that would result in the document becoming non-reflowable (such as NewPage). If this property is false, calling such methods throws an exception. If this property is true, calling such methods sets the Reflowable flag to false on the current document.

    The default value is false.

     
    Public Propertystatic (Shared in Visual Basic)Gets the version of C1PrintDocument assembly.  
    Public Propertystatic (Shared in Visual Basic)Gets or sets a value indicating whether a log should be built during serialization and deserialization operations. If an exception occurs, that log is available in the exception data. Set this property to true to help debugging obscure serialization errors.  
    Public PropertyGets or sets a value indicating whether to clip the content of the current document to page margins.

    The default value is false.

     
    Public PropertyGets the CompatibilityOptions object which determines compatibility with previous versions of C1PrintDocument.  
    Public PropertyGets or sets the type of device that is used to provide reference graphics when generating the document. If this property is set to MeasurementDeviceEnum.Printer, CreationPrinterName specifies the printer.  
    Public PropertyGets or sets the name of the printer that is used to provide reference graphics when generating the document.

    This property is only used if CreationDevice is set to MeasurementDeviceEnum.Printer.

    Set this property to null to select the reference printer automatically.

     
    Public PropertyGets or sets the default unit of measurement for the current document. This unit is used when sizes or coordinates of objects within the document are set without specifying the unit of measurement explicitly.

    The default value is UnitTypeEnum.Inch.

     
    Public PropertyGets or sets a value indicating whether the end user should be prevented from reflowing the document with different page settings. This property is only a hint to the document viewer.

    The default value is false (i.e. reflow is allowed).

     
    Public PropertyGets or sets the script that is executed when the current document has finished generating.  
    Public Propertystatic (Shared in Visual Basic)Gets a string representing the version of the document persistence format supported by the current assembly. This version is used to check persisted documents' compatibility. Versions are backwards-compatible, but not vice versa (i.e. a document persisted using a newer version of C1PrintDocument may be unreadable by an older version).  
    Public PropertyGets or sets the DocumentInfo object containing the information about the current document (such as author, company, and so on).  
    Public PropertyGets or sets the script that is executed when the current document starts generating.  
    Public PropertyGets or sets a value indicating whether the current C1PrintDocument should handle Windows messages while generating.

    The default value is false.

     
    Public PropertyGets or sets the type of metafiles created by the current document. The default is System.Drawing.Imaging.EmfType.EmfPlusOnly.  
    Public PropertyGets or sets the script that is executed when an error occurs in a script attached to the current document.  
    Public PropertyGets the FontProcessingOptions object which determines how font subtitution and embedding are handled when the document generates.  
    Public Propertystatic (Shared in Visual Basic)Gets a C1FormatVersion object representing the version of the document persistence format supported by the current assembly. This version is used to check persisted documents' compatibility. Versions are backwards-compatible, but not vice versa (i.e. a document persisted using a newer version of C1PrintDocument may be unreadable by an older version).  
    Public PropertyGets or sets the action to be performed when the ENTER key is pressed in a C1.Win.C1Preview.C1PreviewPane control which is viewing the current document.

    The default value is FormsKeyActionEnterEnum.None.

     
    Public PropertyGets or sets the action to be performed when the TAB key is pressed in a C1.Win.C1Preview.C1PreviewPane control which is viewing the current document.

    The default value is FormsKeyActionTabEnum.MoveAccrossDocOut.

     
    Public PropertyGets or sets a FormsStyleEnum value specifying the look and feel of input controls in the current document (see types derived from RenderInputBase).

    The default value is FormsStyleEnum.Acrobat.

     
    Public PropertyGets or sets the value limiting the maximum number of pages in the generated document.

    The default value is -1, indicating that the number of pages in the document is unlimited.

    This property is only taken into account when the document is created using the Generate method.

     
    Public Propertystatic (Shared in Visual Basic)Gets or sets the type of device used to provide System.Drawing.Graphics used to measure/calculate layouts of C1PrintDocument objects. If this property is set to MeasurementDeviceEnum.Printer, MeasurementPrinterName specifies the printer.  
    Public Propertystatic (Shared in Visual Basic)Gets the resolution (DPI) of the MeasurementGraphics object.  
    Public Propertystatic (Shared in Visual Basic)Gets the System.Drawing.Graphics object used to measure/calculate layouts of C1PrintDocument objects.  
    Public Propertystatic (Shared in Visual Basic)Gets or sets the name of the printer used to provide System.Drawing.Graphics used to measure/calculate layouts of C1PrintDocument objects. This property is only used if MeasurementDevice is set to MeasurementDeviceEnum.Printer.  
    Public PropertyGets or sets the script that is executed when a new page is added to the document. This script executes after the page has been added to the Pages collection but before it is resolved (i.e. when the content of the page has not been laid out yet).

    This script should be used only to change the page layout. Do not use this script to change the page content, as it may cause errors.

     
    Public PropertyGets or sets the default page layout for the current document. This property is a shortcut for DocumentPageLayouts.Default. (A page layout includes page settings, page headers and footers, and column definitions.)  
    Public PropertyGets the collection of page layouts used in the current document. In addition to the default layout which is always present, special layouts may be defined for first, last, even and odd pages of the document. The effective layout for each page is then produced by merging all applicable layouts.  
    Public PropertyGets or sets the UnitTypeEnum value that will be used to specify the resolved sizes of objects within the current document (e.g. the sizes of RenderFragment objects representing the render objects in the document).

    This property cannot be changed when the document is generating (i.e. while IsGenerating returns true).

     
    Public PropertyGets the ScriptingOptions object defining the scripting options of this C1PrintDocument object.  
    Public PropertyGets or sets a value indicating whether a dialog allowing to input values for some or all of the user defined tags (elements of the Tags collection) should be shown to the user before the document generates. To include or exclude tags from the dialog, use Tag.ShowInDialog.

    The default value is false.

     
    Public PropertyGets or sets the top-level stacking rule for the document body.

    The default value is StackingRulesEnum.BlockTopToBottom.

     
    Public PropertyGets or sets the string used as the closing parentheses when including references to Tag objects in the current document's texts (e.g. in RenderText.Text or ParagraphText.Text). To include a TagCloseParen string itself in a text, prepend it with the TagEscapeString string.

    The default value is "]".

     
    Public PropertyGets or sets the string that can be used to escape TagOpenParen and TagCloseParen. To include a TagEscapeString string itself in a text, duplicate it.

    The default value is "\".

     
    Public PropertyGets or sets the string used as the opening parentheses when including references to Tag objects in the current document's texts (e.g. in RenderText.Text or ParagraphText.Text). To include a TagOpenParen string itself in a text, prepend it with the TagEscapeString string.

    The default value is "[".

     
    Public PropertyGets the TagCollection representing the collection of user-defined Tag objects in the current document.  
    Public PropertyGets or sets the type name of form used to input tag values (the form will be shown if ShowTagsInputDialog is true). The form type must be derived from C1.C1Preview.Forms.TagsInputFormBase.  
    Public PropertyGets or sets a value indicating whether an exception should be raised if an error occurs while the current document generates. If this property is false, the Generate method will return false if errors occurred while generating, otherwise an exception will be thrown on the first error.

    The default value is false.

     
    Public PropertyGets or sets a value indicating whether text in the current document should be rendered using the GDI+ text API.

    The default value is false.

     
    Public Propertystatic (Shared in Visual Basic)Gets or sets a value indicating whether the default page settings are retrieved from the default printer (may slow things down if the printer is a network one) or calculated based on the current locale.  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Adds an anchor (C1Anchor or C1AnchorText) at the current position in the document. Can be used only if IsStartEndDocMode is true.  
    Public MethodAdvances the current block flow position by the specified distance.  
    Public MethodIndicates whether rendering in the block flow is permitted now.  
    Public MethodIndicates whether direct rendering is permitted now.  
    Public MethodClears the current document, sets all properties to their default values.  
    Public MethodClears the pages and other info created during document generation. This method does not clear the document structure/content though.  
    Public MethodOverloaded. Converts an absolute Unit value to the specified measurement units (this overload cannot convert to pixels).  
    Public Method (Inherited from System.MarshalByRefObject)
    Public Method (Inherited from System.ComponentModel.Component)
    Public MethodShows the tags input dialog, allows the user to enter/update the values of Tag objects contained in the Tags collection.  
    Public MethodFinishes generation of a document.  
    Public MethodOverloaded. Exports the document to a disk file.  
    Public MethodSearches for an C1Anchor with the specified Name in the current document.  
    Public MethodSearches for the first occurrence of a RenderInputFragment object in the current document.  
    Public Methodstatic (Shared in Visual Basic)Creates a new instance of the C1PrintDocument class representing the specified C1.C1Report.C1Report.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Creates a new instance of the C1PrintDocument class, and loads the document from the specified file.  
    Public Methodstatic (Shared in Visual Basic)Creates a new instance of the C1PrintDocument class, and imports a RDL report definition into created document.  
    Public MethodOverloaded. Converts a double value expressed in the current document's ResolvedUnit units to other UnitTypeEnum units.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Creates a new instance of C1PrintDocument class, and loads the document from the specified stream.  
    Public MethodOverloaded. Generates the current document, using the RefreshModeEnum.RefreshCalculatedValues refresh mode.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Converts an absolute length represented by a LengthAbs object to a double value expressed in the current document's ResolvedUnit units.  
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodGets the C1.C1Preview.Export.Xps.XpsC1Doc object representing the current document. That object can be used to access the underlying System.Windows.Xps.Packaging.XpsDocument, which in turn can provide the System.Windows.Documents.FixedDocumentSequence (via the call to GetFixedDocumentSequence()) that can be assigned to the Document property of a document viewer.

    Please note that to avoid memory leaks, the XpsC1Doc object returned by this method should be disposed when you're finished using it and/or the XpsDocument it provides.

     
    Public MethodChecks whether the document contains any tags that can be entered or changed in the tags input dialog.  
    Public MethodImports a C1.C1Report.C1Report report definition into the current document.  
    Public MethodImports a RDL report definition into the current document.  
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodIndicates whether an inline paragraph is currently being created on the document.  
    Public MethodOverloaded. Loads the current document from a stream. The stream should contain a document in C1DocumentFormatEnum.C1d format.  
    Public MethodBegins a new column. If the current column is the last on the page then a new page will be started. Note that AllowNonReflowableDocs property on the document must be set to true for this method to work; otherwise, an exception will occur.  
    Public MethodBegins a new line in inline flow, can be used only if current stacking is inline flow. Note that AllowNonReflowableDocs property on the document must be set to true for this method to work; otherwise, an exception will occur.  
    Public MethodOverloaded. Creates a new page and adds it to the document. Note that AllowNonReflowableDocs property on the document must be set to true for this method to work; otherwise, an exception will occur.  
    Public MethodReturns a System.Drawing.Imaging.Metafile representing the specified page.  
    Public MethodOverloaded. Prints the current document with default printer settings, not showing the print progress dialog.  
    Public MethodOverloaded. Shows the standard print dialog, allowing the user to print the current document.  
    Public MethodReflows the current document. If a handler has been assigned to the GenerateDocument event, that handler is invoked. Otherwise, the Generate method is called.  
    Public MethodAdds a RenderObject into the block flow of the current document, and resolves it.

    This method can only be used if IsStartEndDocMode is true.

     
    Public MethodOverloaded. Renders an arc into the block flow of the current document.  
    Public MethodOverloaded. Renders an ellipse into the block flow of the current document.  
    Public MethodCreates an internally maintained RenderGraphics object that can be used to add graphics to the block flow of the current document.  
    Public MethodAdds the internally maintained RenderGraphics object created with a previous call to RenderBlockGraphicsBegin to the block flow of the current document.  
    Public MethodRenders a horizontal line with the specified width, starting at the left of the page, into the block flow of the current document.  
    Public MethodOverloaded. Renders the Image.  
    Public MethodOverloaded. Renders a pie into the block flow of the current document.  
    Public MethodOverloaded. Renders a rectangle into the block flow of the current document.  
    Public MethodOverloaded. Renders the RTF text.  
    Public MethodOverloaded. Renders a block of text into the block flow of the current document.  
    Public MethodRenders a vertical line with the specified height, starting at the current position, into the block flow of the current document.  
    Public MethodOverloaded. Adds a RenderObject to the Body of the current document at a specific position on the current page, and resolves it.

    This method can only be used if IsStartEndDocMode is true.

     
    Public MethodOverloaded. Adds an arc to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Adds an ellipse to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodCreates an internally maintained RenderGraphics object that can be used to add graphics at a specific position to the Body of the document on the current page.  
    Public MethodRenders the internally maintained RenderGraphics object created with a previous call to RenderDirectGraphicsBegin onto the current page of the document.  
    Public MethodOverloaded. Adds an System.Drawing.Image to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Adds a line to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Adds a pie to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Creates a RenderPolygon from a collection of UnitPoint objects, and renders it on the current page, at position specified by the points' coordinates.  
    Public MethodOverloaded. Adds a rectangle to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Adds an RTF-formatted string to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodOverloaded. Adds a text to the Body of the current document at a specific position on the current page, and resolves it.  
    Public MethodRenders a ParagraphObject into the current inline paragraph.  
    Public MethodBegins rendering of a new inline paragraph into the Body of the current document, using the specified Style and dimensions.  
    Public MethodEnds rendering of the current inline paragraph.  
    Public MethodOverloaded. Renders an System.Drawing.Image into the current inline paragraph.  
    Public MethodOverloaded. Renders a string into the current inline paragraph, using the specified style.  
    Public MethodOverloaded. Saves the current document to a disk file. The persistense format (C1DocumentFormatEnum.C1d or C1DocumentFormatEnum.C1dx) is determined by the specified file extension. The save format defaults to C1DocumentFormatEnum.C1d if the format cannot be determined from the extension.  
    Public Methodstatic (Shared in Visual Basic)Selects a device to use for MeasurementGraphics. This method looks for a printer with a "square" resolution (i.e. with the same horizontal and vertical DPI) equal to or larger than 300 DPI. If such a printer is found, it is assigned to MeasurementPrinterName, and MeasurementDevice is set to MeasurementDeviceEnum.Printer. Otherwise, MeasurementDevice is set to MeasurementDeviceEnum.Screen. The selected device's resolution is returned by MeasurementDpi.  
    Public MethodStarts a new document.  
    Public MethodOverloaded. Converts a double value expressed in specified UnitTypeEnum units to a double value expressed in the current document's ResolvedUnit units.  
    Public Method (Inherited from System.ComponentModel.Component)
    Top
    Public Events
     NameDescription
    Public EventOccurs when the Pages collection is about to be cleared.  
    Public EventOccurs when the BusyState property value has changed.  
    Public EventOccurs when the DefaultUnit property value has changed.  
    Public EventOccurs when the document generation completes.  
    Public EventOccurs when the document generation is starting.  
    Public EventOccurs when the FormsStyle property value changes.  
    Public EventOccurs when the document needs to be generated. Allows user to build the document content in an event handler.  
    Public EventOccurs when the value of a RenderInputBase object within the document has been changed.  
    Public EventOccurs periodically during document generation. Allows to provide progress indication and the ability to cancel generation to the user.  
    Public EventOccurs during document generation when a page has been generated and added to the Pages collection, and the next page is about to be generated.  
    Public EventOccurs when an already generated page of the document has been changed, for example when the PageCount variable on the page needs to be updated.  
    Public EventOccurs when a new empty page has been created and added to the document's Pages collection, but has not been resolved yet. Use this method only to change the layout of the page.  
    Public EventOccurs when the page has been removed from the document's Pages collection. This event cannot fire during document generation.  
    Public EventOccurs when the Pages collection has been cleared.  
    Public EventOccurs when a page of the document has been updated. Fires very often during document generation when fragments of objects are added to, or removed from the page.  
    Public EventOccurs when the ResolvedUnit property value has changed.  
    Top
    See Also