PdfProducer
Inheritance: java.lang.Object
public abstract class PdfProducer
Represents a class to produce PDF from other formats.
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 (Exception e)
{
// Do something...
}
Methods
produce(InputStream inputStream, int format, OutputStream outputStream)
public static void produce(InputStream inputStream, int format, OutputStream outputStream)
Produce the PDF stream using specified import format.
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | Input stream. |
format | int | Import format. |
outputStream | java.io.OutputStream | Output PDF stream. |
produce(String inputFileName, int format, OutputStream outputStream)
public static void produce(String inputFileName, int format, OutputStream outputStream)
Parameters:
Parameter | Type | Description |
---|---|---|
inputFileName | java.lang.String | |
format | int | |
outputStream | java.io.OutputStream |
produce(InputStream inputStream, int format, String outputFileName)
public static void produce(InputStream inputStream, int format, String outputFileName)
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 (FileInputStream inputStream = File.OpenRead(inputFile))
using (FileOutputStream outputStream = File.Create(outputFile))
{
PdfProducer.produce(inputStream, ImportFormat.Cgm, outputStream);
}
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | Input stream. |
format | int | Import format. |
outputFileName | java.lang.String | Output PDF file |
produce(String inputFileName, int format, String outputFileName)
public static void produce(String inputFileName, int format, String outputFileName)
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);
Parameters:
Parameter | Type | Description |
---|---|---|
inputFileName | java.lang.String | Input file name. |
format | int | Import format. |
outputFileName | java.lang.String | Output PDF file |
produce(String inputFileName, ImportOptions options, OutputStream outputStream)
public static void produce(String inputFileName, ImportOptions options, OutputStream outputStream)
Parameters:
Parameter | Type | Description |
---|---|---|
inputFileName | java.lang.String | |
options | ImportOptions | |
outputStream | java.io.OutputStream |
produce(InputStream inputStream, ImportOptions options, String outputFileName)
public static void produce(InputStream inputStream, ImportOptions options, String outputFileName)
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | |
options | ImportOptions | |
outputFileName | java.lang.String |
produce(String inputFileName, ImportOptions options, String outputFileName)
public static void produce(String inputFileName, ImportOptions options, String outputFileName)
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);
Parameters:
Parameter | Type | Description |
---|---|---|
inputFileName | java.lang.String | Input file name. |
options | ImportOptions | Import option. |
outputFileName | java.lang.String | Output PDF stream. |
produce(InputStream inputStream, ImportOptions options, OutputStream outputStream)
public static void produce(InputStream inputStream, ImportOptions options, OutputStream outputStream)
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 (FileInputStream inputStream = File.OpenRead(inputFile))
using (FileOutputStream outputStream = File.Create(outputFile))
{
PdfProducer.produce(inputStream, importOptions, outputStream);
}
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | Input stream. |
options | ImportOptions | Import option. |
outputStream | java.io.OutputStream | Output PDF stream. |
produceInternal(System.IO.Stream inputStream, ImportOptions options, System.IO.Stream outputStream)
public static void produceInternal(System.IO.Stream inputStream, ImportOptions options, System.IO.Stream outputStream)
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | com.aspose.ms.System.IO.Stream | |
options | ImportOptions | |
outputStream | com.aspose.ms.System.IO.Stream |
getProducer(ImportOptions options)
public static PdfProducer getProducer(ImportOptions options)
Get the producer for specified import option.
Parameters:
Parameter | Type | Description |
---|---|---|
options | ImportOptions | Import option |
Returns: PdfProducer - PDF producer.
getProducer(int format)
public static PdfProducer getProducer(int format)
Get the producer for specified import format.
Parameters:
Parameter | Type | Description |
---|---|---|
format | int | Import option |
Returns: PdfProducer - PDF producer.
getImportOptions(int format)
public static ImportOptions getImportOptions(int format)
Get the ImportOptions for specified import format.
Parameters:
Parameter | Type | Description |
---|---|---|
format | int | Import format. |
Returns: ImportOptions - Import option.