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

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

Parameters

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