Show / Hide Table of Contents

Class MarkupDoc

An implementation of the ICpDocument interface which handles Star Markup Language based documents. Star Markup Language can define documents with a mixture of bit-image and plain text data, and provides control over text decoration/scaling, barcode printing, autocutter and other POS printer specific features. Star Markup also enables support of multiple device sizes by offering automatic word wrapping and column alignment.

Inheritance
System.Object
MarkupDoc
Implements
ICpDocument
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StarMicronics.CloudPrnt.Documents
Assembly: cs.temp.dll.dll
Syntax
public class MarkupDoc : ICpDocument

Constructors

MarkupDoc(Stream)

Construct a MarkupDoc object form an input Stream source containing StarMarkup formatting. The stream should provide the data as ASCII or UTF8 encodings, without a BOM identifier. Data will be loaded from the current stream position, until the end of the stream.

Declaration
public MarkupDoc(Stream input)
Parameters
Type Name Description
System.IO.Stream input

Stream object which the data will be loaded from.

MarkupDoc(String)

Construct a new MarkupDoc object from an external text file containing Star Markup formatted data. Source files should be UTF8, or ASCII encoded, without a BOM identifier at the start.

Declaration
public MarkupDoc(string fileName)
Parameters
Type Name Description
System.String fileName

Name of the input source file.

Properties

JobConversionOptions

Specify parameters that will be used to direct the conversion of a print job.

Declaration
public ConversionOptions JobConversionOptions { get; set; }
Property Value
Type Description
ConversionOptions

Settings to be used when performing Job format conversion.

NativeFormat

Returns the input document format in IANA/MIME media type format, that was used to create this document. In the case of a MarkupDoc object, with will always be "text/vnd.star.markup".

Declaration
public string NativeFormat { get; }
Property Value
Type Description
System.String

will always return "text/vnd.star.markup" for MarkupDoc objects.

OutputFormats

Provide a list of media types that this document can be converted to.

Declaration
public string[] OutputFormats { get; }
Property Value
Type Description
System.String[]

A list of supported output formats, in IANA/MIME media type format

Methods

convertTo(String, Stream)

Convert the document to the requested format, and write to the specified stream.

Declaration
public void convertTo(string requestFormat, Stream outStream)
Parameters
Type Name Description
System.String requestFormat

Requires output format, specified as an IANA/MIME format media type. This must be a type that is supported for output by this particular MarkupDoc object, as listed by the OutputFormats property.

System.IO.Stream outStream

Stream that the output data will be written to.

Finalize()

Declaration
protected void Finalize()

Implements

ICpDocument
In This Article
Back to top