PdfProducerProduce Method (String, ImportOptions, Stream)
Produce the PDF stream using specified import option.
Examples
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);
}

Namespace: Aspose.Pdf.Facades
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 19.11
Syntax
public static void Produce(
	string inputFileName,
	ImportOptions options,
	Stream outputStream
)

Parameters

inputFileName
Type: SystemString
Input file name.
options
Type: Aspose.PdfImportOptions
Import option.
outputStream
Type: System.IOStream
Output PDF stream.
Exceptions
ExceptionCondition
InvalidFileFormatExceptionThe exception is thrown when a file is invalid.
ArgumentNullExceptionOutput stream is null
ArgumentExceptionInput file name is an empty string
See Also