Java aracılığıyla EPUB’yi PSD’ye dönüştürün

EPUB dosyasını Adobe® Acrobat Reader kullanmadan herhangi bir Java J2SE, J2EE, J2ME uygulamasından PSD’ye aktarın

 

Java’da epub dosyasını PSD görüntüsüne iki basit adımda dönüştürebilirsiniz. İlk olarak, Aspose.PDF for Java kullanarak EPUB’yi JPEG’e aktarabilirsiniz. Bundan sonra, Aspose.Imaging for Java Görüntü İşleme API’sini kullanarak JPEG’i PSD’ye dönüştürebilirsiniz. Her iki API de Aspose.Total for Java paketi kapsamında gelir.

EPUB'yi Java aracılığıyla PSD'ye aktarın

  1. Document sınıfını kullanarak EPUB dosyasını açın
  2. sınıf nesnesini başlatın ve Process kullanarak EPUB’yi JPEG’e dönüştürün. aspose.pdf.Page-java.io.OutputStream-) yöntemi
  3. Image sınıfını kullanarak JPEG dosyasını yükleyin
  4. Belgeyi save kullanarak PSD formatına kaydedin-) yöntem

Dönüşüm Gereksinimleri

Aspose.Total for Java’yı doğrudan Maven tabanlı bir projeden kolayca kullanabilirsiniz. ve pom.xml’inize kitaplıkları dahil edin.

Alternatif olarak, indirilenler adresinden bir ZIP dosyası alabilirsiniz.

// supports PDF, CGM, EPUB, TeX, PCL, PS, XPS, MD, MHTML, XSLFO, HTML file formats
// load PDF with an instance of Document
Document document = new Document("input.pdf");
// create an object of JpegDevice
JpegDevice renderer = new JpegDevice();
// convert first of a particular PDF page to JPEG format
renderer.process(document.getPages().get_Item(1), "output.jpeg");
// load JPEG file
Image image = Image.Load("output.jpeg");
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save JPEG to PSD file format
image.save("output.psd", new PsdOptions());

Java ile Tek Bir Dosyada EPUB'yi PSD'ye Dönüştürün

API ayrıca EPUB dosyasını PSD’ye tek bir dosyaya aktarmanıza olanak tanır. Tüm sayfaları dönüştürmek için önce EPUB belgenizi bir TIFF dosyasına dönüştürebilir, ardından TIFF dosyasını PSD’ye aktarabilirsiniz. Giriş dosyasını Document sınıfını kullanarak açabilir ve Resolution, TiffSettings ve TIFF aygıt nesneleri oluşturabilirsiniz. process kullanarak tek bir TIFF görüntüsü alabilirsiniz. TiffDevice sınıfının java.io.OutputStream-) yöntemi. Son olarak, Image sınıfını kullanarak TIFF dosyasını yükleyebilir ve save kullanarak PSD formatına kaydedebilirsiniz. apireference.aspose.com/imaging/java/com.aspose.imaging/Image#save-java.lang.String-com.aspose.imaging.ImageOptionsBase-) yöntemi.

// supports PDF, CGM, EPUB, TeX, PCL, PS, XPS, MD, MHTML, XSLFO, HTML file formats
// load PDF with an instance of Document
Document pdfDocument = new Document("input.pdf");
// Create Resolution object
Resolution resolution = new Resolution(300);
// Create TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.setCompression(CompressionType.None);
tiffSettings.setDepth(ColorDepth.Default);
tiffSettings.setShape(ShapeType.Landscape);
// Create TIFF device
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
// Convert a particular page and save the image to stream
tiffDevice.process(pdfDocument, 1, 1, "output.tif");
// load TIFF file
Image image = Image.Load("output.tif");
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save TIFF to PSD file format
image.save("output.psd", new PsdOptions());

Java ile Filigranlı EPUB'yi PSD'ye Dönüştürün

API’yi kullanarak, PSD belgenizde filigran bulunan EPUB dosyasını PSD’ye de aktarabilirsiniz. Filigran eklemek için önce EPUB’yi JPEG’e dönüştürebilir ve içine bir filigran ekleyebilirsiniz. Filigran eklemek için Image sınıfını kullanarak bir görüntü dosyası yükleyin, Graphics nesnesini oluşturun ://apireference.aspose.com/imaging/java/com.aspose.imaging/Graphics) sınıfını seçin ve Image nesnesiyle başlatın, yeni bir Matrix oluşturun com.aspose.imaging/Matrix) nesnesini seçin ve çeviri ile dönüştürmeyi istediğiniz açıya ayarlayın ve Graphics.drawString kullanarak filigran ekleyin drawString-java.lang.String-com.aspose.imaging.Font-com.aspose.imaging.Brush-float-float-) yöntemi. Resminize filigranı ekledikten sonra JPEG’i PSD formatında kaydedebilirsiniz.

// supports PDF, CGM, EPUB, TeX, PCL, PS, XPS, MD, MHTML, XSLFO, HTML file formats
// load PDF with an instance of Document
Document document = new Document("input.pdf");
// create an object of JpegDevice
JpegDevice renderer = new JpegDevice();
// convert first of a particular PDF page to JPEG format
renderer.process(document.getPages().get_Item(1), "output.jpeg");
// load JPEG
Image image = Image.load("output.jpeg");
// create and initialize an instance of Graphics class
Graphics graphics= new Graphics(image);
// create an instance of Font
Font font = new Font("Times New Roman", 16, FontStyle.Bold);
// create an instance of SolidBrush and set its properties
SolidBrush brush = new SolidBrush();
brush.setColor(Color.getBlack());
brush.setOpacity(100);
Size sz = graphics.getImage().getSize();
// create an object of Matrix class for transformation
Matrix matrix = new Matrix();
// first a translation then a rotation
matrix.translate(sz.getWidth() / 2, sz.getHeight() / 2);
matrix.rotate(-45.0f);
// set the Transformation through Matrix
graphics.setTransform(matrix);
// draw a string using the SolidBrush and Font objects at specific point
graphics.drawString("Watermark by Aspose.Imaging for Java", font, brush, 0, 0);
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save JPEG to PSD file format
image.save("output.psd", new PsdOptions());

Java ile EPUB'yi PSD Dosyasına Dönüştür ve Döndür

API’yi kullanarak, çıktı PSD görüntüsünü ihtiyaçlarınıza göre de döndürebilirsiniz. Image.rotateFlip yöntemi, görüntüyü 90/180/270 derece döndürmek ve görüntüyü yatay veya dikey olarak çevirmek için kullanılabilir. Kütüphane, tüm çirkin detayları kapsarken karmaşık işlemleri gerçekleştirmek için basit yöntemler sağlar. Görüntüye uygulamak için döndürme ve çevirme türünü belirtebilirsiniz. Görüntüyü döndürmek ve çevirmek için dönüştürülen JPEG görüntüsünü Image sınıfını kullanarak yükleyebilir ve Görüntüyü çağırabilirsiniz. uygun RotateFlipType belirtilirken rotaryFlip yöntemi.

// supports PDF, CGM, EPUB, TeX, PCL, PS, XPS, MD, MHTML, XSLFO, HTML file formats
// load PDF with an instance of Document
Document document = new Document("input.pdf");
// create an object of JpegDevice
JpegDevice renderer = new JpegDevice();
// convert first of a particular PDF page to JPEG format
renderer.process(document.getPages().get_Item(1), "output.jpeg");
// load JPEG file
Image image = Image.Load("output.jpeg");
// roate image
image.RotateFlip(RotateFlipType.Rotate270FlipNone);
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save JPEG to PSD file format
image.save("output.psd", new PsdOptions());

Java ile EPUB Dönüşüm Seçeneklerini Keşfedin

EPUB s'yi CSV 'ye dönüştürün (Virgülle Ayrılmış Değerler)
EPUB s'yi DIF 'ye dönüştürün (Veri Değişim Formatı)
EPUB s'yi DOCM 'ye dönüştürün (Microsoft Word 2007 Marco Dosyası)
EPUB s'yi DOT 'ye dönüştürün (Microsoft Word Şablon Dosyaları)
EPUB s'yi DOTM 'ye dönüştürün (Microsoft Word 2007+ Şablon Dosyası)
EPUB s'yi DOTX 'ye dönüştürün (Microsoft Word Şablon Dosyası)
EPUB s'yi EXCEL 'ye dönüştürün (Elektronik Tablo Dosya Biçimleri)
EPUB s'yi FLATOPC 'ye dönüştürün (Microsoft Word 2003 Kelime İşleme ML)
EPUB s'yi FODS 'ye dönüştürün (OpenDocument Düz XML Elektronik Tablosu)
EPUB s'yi GIF 'ye dönüştürün (Grafik Değişim Formatı)
EPUB s'yi MARKDOWN 'ye dönüştürün (Hafif Biçimlendirme Dili)
EPUB s'yi ODS 'ye dönüştürün (OpenDocument Elektronik Tablosu)
EPUB s'yi ODT 'ye dönüştürün (OpenDocument Metin Dosyası Biçimi)
EPUB s'yi OTT 'ye dönüştürün (OpenDocument Şablonu)
EPUB s'yi PCL 'ye dönüştürün (Yazıcı Komut Dili)
EPUB s'yi PS 'ye dönüştürün (PostScript Dosyası)
EPUB s'yi RTF 'ye dönüştürün (Zengin metin formatı)
EPUB s'yi SXC 'ye dönüştürün (StarOffice Hesap Tablosu)
EPUB s'yi TSV 'ye dönüştürün (Sekmeyle Ayrılmış Değerler)
EPUB s'yi WORDML 'ye dönüştürün (Microsoft Word 2003 Kelime İşleme ML)
EPUB s'yi XAMLFLOW 'ye dönüştürün (Microsoft'un Power Automate'i)
EPUB s'yi XLAM 'ye dönüştürün (Excel Makro Etkin Eklenti)
EPUB s'yi XLSB 'ye dönüştürün (Excel İkili Çalışma Kitabı)
EPUB s'yi XLSM 'ye dönüştürün (Makro özellikli Hesap Tablosu)
EPUB s'yi XLT 'ye dönüştürün (Excel 97 - 2003 Şablonu)
EPUB s'yi XLTM 'ye dönüştürün (Makro Etkin Excel Şablonu)
EPUB s'yi ODP 'ye dönüştürün (OpenDocument Sunum Formatı)
EPUB s'yi OTP 'ye dönüştürün (OpenDocument Standart Biçimi)
EPUB s'yi POT 'ye dönüştürün (Microsoft PowerPoint Şablon Dosyaları)
EPUB s'yi POTM 'ye dönüştürün (Microsoft PowerPoint Şablon Dosyası)
EPUB s'yi POTX 'ye dönüştürün (Microsoft PowerPoint Şablon Sunumu)
EPUB s'yi PPS 'ye dönüştürün (PowerPoint Slayt Gösterisi)
EPUB s'yi PPSM 'ye dönüştürün (Makro özellikli Slayt Gösterisi)
EPUB s'yi PPSX 'ye dönüştürün (PowerPoint Slayt Gösterisi)