Produce

Produce(Stream, ImportFormat, Stream)

Produce the PDF stream using specified import format. This sample shows how to produce Pdf stream from CGM stream.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
using (FileStream inputStream = File.OpenRead(inputFile))
using (FileStream outputStream = File.Create(outputFile))
{
    PdfProducer.Produce(inputStream, ImportFormat.Cgm, outputStream);
}
public static void Produce(Stream inputStream, ImportFormat format, Stream outputStream)
Parameter Type Description
inputStream Stream Input stream.
format ImportFormat Import format.
outputStream Stream Output PDF stream.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Input or output stream is null

See Also


Produce(string, ImportFormat, Stream)

Produce the PDF stream using specified import format. This sample shows how to produce Pdf stream from CGM file.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
using (FileStream outputStream = File.Create(outputFile))
{
    PdfProducer.Produce(inputFile, ImportFormat.Cgm, outputStream);
}
public static void Produce(string inputFileName, ImportFormat format, Stream outputStream)
Parameter Type Description
inputFileName String Input file name.
format ImportFormat Import format.
outputStream Stream Output PDF stream.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Output stream is null
ArgumentException Input file name is an empty string

See Also


Produce(Stream, ImportFormat, string)

Produce the PDF file using specified import format. This sample shows how to produce Pdf file from CGM stream.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
using (FileStream inputStream = File.OpenRead(inputFile))
using (FileStream outputStream = File.Create(outputFile))
{
    PdfProducer.Produce(inputStream, ImportFormat.Cgm, outputStream);
}
public static void Produce(Stream inputStream, ImportFormat format, string outputFileName)
Parameter Type Description
inputStream Stream Input stream.
format ImportFormat Import format.
outputFileName String Output PDF file

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Input stream is null
ArgumentException Output file name is an empty string

See Also


Produce(string, ImportFormat, string)

Produce the PDF file using specified import format. This sample shows how to produce Pdf file from CGM file.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
PdfProducer.Produce(inputFile, ImportFormat.Cgm, outputFile);
public static void Produce(string inputFileName, ImportFormat format, string outputFileName)
Parameter Type Description
inputFileName String Input file name.
format ImportFormat Import format.
outputFileName String Output PDF file

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentException Input or output file name is an empty string

See Also


Produce(string, ImportOptions, Stream)

Produce the PDF stream using specified import option. This sample shows how to produce Pdf stream from CGM file.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
ImportOptions importOptions = new CgmImportOptions();
using (FileStream outputStream = File.Create(outputFile))
{
    PdfProducer.Produce(inputFile, importOptions, outputStream);
}
public static void Produce(string inputFileName, ImportOptions options, Stream outputStream)
Parameter Type Description
inputFileName String Input file name.
options ImportOptions Import option.
outputStream Stream Output PDF stream.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Output stream is null
ArgumentException Input file name is an empty string

See Also


Produce(Stream, ImportOptions, string)

Produce the PDF file using specified import option. This sample shows how to produce Pdf file from CGM stream.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
ImportOptions importOptions = new CgmImportOptions();
using (FileStream inputStream = File.OpenRead(inputFile))
{
    PdfProducer.Produce(inputStream, importOptions, outputFile);
}
public static void Produce(Stream inputStream, ImportOptions options, string outputFileName)
Parameter Type Description
inputStream Stream Input stream.
options ImportOptions Import option.
outputFileName String Output PDF file.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Input stream is null
ArgumentException Output file name is an empty string

See Also


Produce(string, ImportOptions, string)

Produce the PDF file using specified import option. This sample shows how to produce Pdf file from CGM file.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
ImportOptions importOptions = new CgmImportOptions();
PdfProducer.Produce(inputStream, importOptions, outputStream);
public static void Produce(string inputFileName, ImportOptions options, string outputFileName)
Parameter Type Description
inputFileName String Input file name.
options ImportOptions Import option.
outputFileName String Output PDF stream.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentException Input or output file name is an empty string

See Also


Produce(Stream, ImportOptions, Stream)

Produce the PDF file using specified import option. This sample shows how to produce Pdf stream from CGM stream.

string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
ImportOptions importOptions = new CgmImportOptions();
using (FileStream inputStream = File.OpenRead(inputFile))
using (FileStream outputStream = File.Create(outputFile))
{
    PdfProducer.Produce(inputStream, importOptions, outputStream);
}
public static void Produce(Stream inputStream, ImportOptions options, Stream outputStream)
Parameter Type Description
inputStream Stream Input stream.
options ImportOptions Import option.
outputStream Stream Output PDF stream.

Exceptions

exception condition
InvalidFileFormatException The exception is thrown when a file is invalid.
ArgumentNullException Input or output stream is null.

See Also