XpsConverter

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.page.plugins.IPlugin

public class XpsConverter implements IPlugin

XpsConverter eklentisini temsil eder.

Bu örnek, XPS belgesini PDF belgesine nasıl dönüştüreceğinizi gösterir.

// XpsConverter oluştur XpsConverter converter = new XpsConverter(); // XpsConverterToPdfOptions nesnesi oluştur ve çıktı veri tipini dosya olarak ayarla XpsConverterToPdfOptions opt = new XpsConverterToPdfOptions(); // giriş dosya yolunu ekle opt.addDataSource(new FileDataSource(inputPath)); // çıktı dosya yolunu ayarla opt.addSaveDataSource(new FileDataSource(outputPath)); // dönüşüm sürecini başlat ResultContainer results = converter.process(opt);

Bu örnek, XPS belgesini dosya çıktısı ile görüntüye nasıl dönüştüreceğinizi gösterir.

// XpsConverter oluştur XpsConverter converter = new XpsConverter(); // JPEG hedef görüntü formatı ile XpsConverterToImageOptions oluştur. Oluşan görüntünün varsayılan formatı PNG’dir. // Ayrıca oluşan görüntünün boyutunu, çözünürlüğünü, yumuşatma modunu ve JPEG sonuç formatı için JPEG kalite seviyesini ayarlayabiliriz. XpsConverterToImageOptions opt = new XpsConverterToImageOptions(ImageFormat.Jpeg); // giriş dosya yolunu ekle opt.addDataSource(new FileDataSource(inputPath)); // giriş XPS dosyası çok sayfalı ise sonuçlar şu adla bir dizi görüntü dosyası olur: ["outputPath" uzantısız][sayfaNumarası 0’dan başlar].["outputPath" uzantısı] opt.addSaveDataSource(new FileDataSource(outputPath)); // dönüşüm sürecini başlat converter.process(opt);

Bu örnek, XPS belgesini bayt dizileri çıktısı ile görüntüye nasıl dönüştüreceğinizi gösterir.

Bayt dizileri çıktı veri kaynağında (byte [][]) bir bayt dizisi bir sayfanın görüntüsünü içerir. Böylece, tek sayfalı belgeler için sonuç [1][] dizisi, çok sayfalı belgeler için ise [giriş XPS belgesindeki sayfa sayısı][] dizisi içerir. // XpsConverter oluştur XpsConverter converter = new XpsConverter(); // JPEG hedef görüntü formatı ile XpsConverterToImageOptions oluştur. Oluşan görüntünün varsayılan formatı PNG’dir. // Ayrıca oluşan görüntünün boyutunu, çözünürlüğünü, yumuşatma modunu ve JPEG sonuç formatı için JPEG kalite seviyesini ayarlayabiliriz. XpsConverterToImageOptions opt = new XpsConverterToImageOptions(ImageFormat.Jpeg); // giriş dosya yolunu ekle opt.addDataSource(new FileDataSource(inputPath)); // giriş XPS dosyası çok sayfalı ise sonuçlar şu adla bir dizi görüntü dosyası olur: ["outputPath" uzantısız][sayfaNumarası 1’den başlar].["outputPath" uzantısı] opt.addSaveDataSource(new ByteArrayDataSource()); // dönüşüm sürecini başlat converter.process(opt); // oluşan bayt dizilerini al byte[][] imagesBytes = (byte [][]) ((ByteArrayResult)results.ResultCollection[0]).Data;

Yapıcılar

YapıcıAçıklama
XpsConverter()

Yöntemler

YöntemAçıklama
dispose()IDisposable uygulaması.
equals(Object arg0)
getClass()
hashCode()
notify()
notifyAll()
process(IPluginOptions options)Belirtilen parametrelerle XpsConverter işleme başlatır.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

XpsConverter()

public XpsConverter()

dispose()

public final void dispose()

IDisposable uygulaması.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParametreTürAçıklama
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

process(IPluginOptions options)

public final ResultContainer process(IPluginOptions options)

Belirtilen parametrelerle XpsConverter işleme başlatır.

Parameters:

ParametreTürAçıklama
optionsIPluginOptionsXpsConverter için talimatları içeren bir seçenek nesnesi.

Returns: ResultContainer - An ResultContainer object containing the result of the operation.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParametreTürAçıklama
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParametreTürAçıklama
arg0long
arg1int