PdfProducer Class
Represents a class to produce PDF from other formats.
Examples
This sample shows how to produce Pdf file from CGM file.
string inputFile = "myImage.cgm";
string outputFile = "myPdf.pdf";
try
{
    PdfProducer.Produce(inputFile, ImportFormat.Cgm, outputFile);
    // Success produced pdf file.
}
catch (InvalidCgmFileFormatException e)
{
    //  Do something...
}
Inheritance Hierarchy
SystemObject
  Aspose.Pdf.FacadesPdfProducer

Namespace: Aspose.Pdf.Facades
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 19.12
Syntax
public abstract class PdfProducer

The PdfProducer type exposes the following members.

Constructors
  NameDescription
Protected methodPdfProducer
Constructor.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberCode exampleProduce(Stream, ImportFormat, Stream)
Produce the PDF stream using specified import format.
Examples
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 methodStatic memberCode exampleProduce(Stream, ImportFormat, String)
Produce the PDF file using specified import format.
Examples
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 methodStatic memberCode exampleProduce(Stream, ImportOptions, Stream)
Produce the PDF file using specified import option.
Examples
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 methodStatic memberCode exampleProduce(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);
}
Public methodStatic memberCode exampleProduce(String, ImportFormat, Stream)
Produce the PDF stream using specified import format.
Examples
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 methodStatic memberCode exampleProduce(String, ImportFormat, String)
Produce the PDF file using specified import format.
Examples
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 methodStatic memberCode exampleProduce(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);
}
Public methodStatic memberCode exampleProduce(String, ImportOptions, String)
Produce the PDF file using specified import option.
Examples
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 methodToString (Inherited from Object.)
Fields
  NameDescription
Protected fieldoptions
ImportOptions holds level of abstraction on individual import options.
See Also