אפליקציית המרה מקוונת של PDF ל-WMF וקוד Java להמרת קבצי PDF

פתח אפליקציית המרה וייצוא המבוססת על Java רבת עוצמה PDF. המר קבצי PDF בודדים או מרובים ל-WMF ופורמטים אחרים באמצעות Java Automation API. המרה חופשית של קבצי PDF באופן מקוון באמצעות אפליקציה עם הורדה מיידית.

המר קבצים מקוונים של PDF ל-WMF באמצעות אפליקציה

  1. העלה קבצים PDF להמרה
  2. המתן מספר שניות או יותר בהתאם לגודל PDF
  3. עקוב אחר שורת המצב של העלאה
  4. לחץ על כפתור “המר”.
  5. PDF יומר למסמך WMF
  6. הורד את קובץ ה-WMF שהומר

המר את PDF ל-WMF באמצעות Java Automation API

  1. פתח קובץ PDF באמצעות מחלקת Document
  2. אתחול אובייקט מחלקה ועיבוד PDF ל-JPEG באמצעות שיטת Process
  3. טען קובץ JPEG באמצעות מחלקת Image
  4. שמור את המסמך בפורמט WMF בשיטת save
 

קוד Java עבור המרה של PDF ל-WMF

// 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());
 
 

עוד כמה מקרים לשמירת PDF ב-WMF עם תכונות אחרות כמו.

// 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());

// 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());

// 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());

 

פתח יישום המרת קבצים PDF באמצעות Java

צריך לפתח יישום תוכנה מבוסס Java כדי לשמור ולייצא בקלות קבצי PDF למסמך WMF? עם Aspose.Total for Java , כל מפתח Java יכול לשלב את קוד ה-API לעיל כדי לתכנת את אפליקציית ההמרה במגוון פורמטים כולל Microsoft Word (DOC, DOCX), Excel (XLS, XLSX), Powerpoint (PPT, PPTX), PDF, קבצי דוא"ל, תמונות (JPG, PNG, BMP, GIF) ופורמטים אחרים. ספריית Java רבת עוצמה להמרת מסמכים, תומכת בפורמטים פופולריים רבים כולל פורמט PDF. ייצוא ועיבוד מסמכים לפורמטים אחרים, מתכנתים יכולים להשתמש ב-Aspose.Total for Java ילד API כולל Aspose.Words for Java , Aspose.Cells for Java , Aspose.Slides for Java , Aspose.PDF for Java , Aspose.Imaging for Java ועוד.

PDF ספריית המרות עבור Java

ישנן אפשרויות חלופיות לשילוב Aspose.Total for Java במערכת שלך. אנא בחר אחד שדומה לצרכים שלך ופעל לפי ההוראות המפורטות:

  • השתמש ב-Aspose.Total for Java ישירות מפרויקט מבוסס Maven וכלול צאצא API רלוונטי ב-pom.xml.
  • לחלופין, אפשר לקבל קובץ ZIP מ- הורדות .

שומר את PDF ל-WMF דרישות האפליקציה

כל מערכת הפעלה שיכולה להריץ את Java Runtime Environment (JRE) יכולה להריץ Aspose.Total for Java. הרשימות הבאות לרוב, אך לא כולן, מערכות הפעלה נתמכות.

  • Microsoft Windows
  • לינוקס: אובונטו, OpenSUSE, CentOS ואחרים
  • macOS: 10.9 (Mavericks) ואילך
  • נייד: אנדרואיד, iOS

ַחקוֹר PDF אפשרויות המרה עם Java

להמיר PDF ל APNG (Animated Portable Network Graphics)
להמיר PDF ל CSV (Comma Seperated Values)
להמיר PDF ל DICOM (Digital Imaging and Communications in Medicine)
להמיר PDF ל DIF (Data Interchange Format)
להמיר PDF ל DXF (Autodesk Drawing Exchange Format)
להמיר PDF ל EMZ (Windows Compressed Enhanced Metafile)
להמיר PDF ל Excel (Spreadsheet File Formats)
להמיר PDF ל FODS (OpenDocument Flat XML Spreadsheet)
להמיר PDF ל JPEG2000 (J2K Image Format)
להמיר PDF ל MD (Markdown Language)
להמיר PDF ל ODS (OpenDocument Spreadsheet)
להמיר PDF ל PSD (Photoshop Document)
להמיר PDF ל SVGZ (Compressed Scalable Vector Graphics)
להמיר PDF ל SXC (StarOffice Calc Spreadsheet)
להמיר PDF ל TGA (Truevision Graphics Adapter)
להמיר PDF ל TSV (Tab-separated Values)
להמיר PDF ל TXT (Text Document)
להמיר PDF ל WMZ (Compressed Windows Metafile)
להמיר PDF ל XLAM (Excel Macro-Enabled Add-In)
להמיר PDF ל XLSB (Excel Binary Workbook)
להמיר PDF ל XLSM (Macro-enabled Spreadsheet)
להמיר PDF ל XLT (Excel 97 - 2003 Template)
להמיר PDF ל XLTM (Excel Macro-Enabled Template)
להמיר PDF ל XLTX (Excel Template)