ใส่คำอธิบายประกอบ DJVU จาก Java


ดาวน์โหลดทดลองใช้ฟรี

เกี่ยวกับ GroupDocs.Annotation สำหรับ Java API

GroupDocs.Annotation สำหรับ Java API เป็นไลบรารีที่ให้คุณเพิ่มคำอธิบายประกอบลงใน PDF, Word และเอกสารอื่นๆ บน Mac, Windows หรือ Ubuntu GroupDocs.Annotation for Java เป็น Java API แบบเนทีฟสำหรับจัดการคำอธิบายประกอบด้วยการสนับสนุนที่ครอบคลุมสำหรับการสร้าง การเพิ่ม การแก้ไข การลบ การแยก และการส่งออกคำอธิบายประกอบจากรูปภาพและเอกสารอื่นๆ มากมาย รายการรูปแบบเอกสารที่รองรับทั้งหมดที่คุณสามารถดูได้ในหน้า ไลบรารีนี้ช่วยให้คุณทำงานได้ไม่เฉพาะกับเอกสาร DJVU เท่านั้น แต่ยังใช้กับเอกสารประเภทอื่นๆ ได้อีกมากมาย เช่น Word, Excel, PowerPoint, อีเมล Outlook, Visio, Adobe, OpenDocument, OpenOffice, Photoshop, AutoCad และอื่นๆ อีกมากมาย GroupDocs.Annotation สำหรับ Java API ช่วยให้คุณสร้างและเพิ่มบันทึกย่อใหม่ แก้ไขบันทึกย่อ แยกความคิดเห็น บันทึกย่อ และลบออกจากเอกสาร ไลบรารีรองรับคำอธิบายประกอบที่แตกต่างกัน 13 ประเภท ได้แก่ ข้อความ โพลีไลน์ พื้นที่ ขีดเส้นใต้ จุด ลายน้ำ ลูกศร วงรี การแทนที่ข้อความ ระยะทาง ช่องข้อความ การแก้ไขทรัพยากรในรูปแบบ PDF, HTML, เอกสาร Microsoft Word, สเปรดชีต, ไดอะแกรม, งานนำเสนอ, ภาพวาด รูปภาพ และรูปแบบไฟล์อื่นๆ อีกมากมาย ตัวอย่าง (โปรดดูด้านล่าง) สาธิตการทำงานกับเอกสาร DJVU ในตัวอย่างนี้ คุณสามารถดูขั้นตอนหลักของวิธีการทำงานกับ GroupDocs คำอธิบายประกอบ: ตั้งค่าใบอนุญาต เปิดเอกสารที่คุณต้องการใช้งาน การสร้าง คำอธิบายประกอบ เพิ่มวัตถุข้อมูลเพื่อตั้งค่าคุณสมบัติคำอธิบายประกอบตามความต้องการของคุณ และบันทึกผลลัพธ์ไปยังตำแหน่งที่ต้องการ นอกจากนี้ คุณยังสามารถดูรายละเอียดเพิ่มเติมเกี่ยวกับคุณสมบัติที่รองรับบน Github หน้า หรือในผลิตภัณฑ์ของเรา เอกสาร

ขั้นตอนในการเพิ่มคำอธิบายประกอบใน DJVU ใน Java

GroupDocs.Annotation ทำให้นักพัฒนา Java สามารถเพิ่มประเภทคำอธิบายประกอบต่างๆ ลงในไฟล์ DJVU ได้อย่างง่ายดายภายในแอปพลิเคชันที่ใช้ Java โดยดำเนินการตามขั้นตอนง่ายๆ ไม่กี่ขั้นตอน

  • สร้างวัตถุตอบกลับพร้อมความคิดเห็นและวันที่
  • สร้างวัตถุ AreaAnnotation ตั้งค่าตัวเลือกพื้นที่ และเพิ่มการตอบกลับ
  • สร้างวัตถุ Annotator และเพิ่มคำอธิบายประกอบพื้นที่
  • บันทึกไฟล์เอาต์พุต

ความต้องการของระบบ

GroupDocs คำอธิบายประกอบสำหรับ Java API ได้รับการสนับสนุนบนแพลตฟอร์มและระบบปฏิบัติการหลักทั้งหมด ก่อนดำเนินการโค้ดด้านล่าง โปรดตรวจสอบว่าคุณได้ติดตั้งข้อกำหนดเบื้องต้นต่อไปนี้ในระบบของคุณแล้ว

  • ระบบปฏิบัติการ: Microsoft Windows, Linux, MacOS
  • สภาพแวดล้อมการพัฒนา: NetBeans, Intellij IDEA, Eclipse เป็นต้น
  • Java Runtime Environment: Java 7 (1.7) ขึ้นไป
  • รับ GroupDocs.Annotation เวอร์ชันล่าสุดสำหรับ Java จาก GroupDocs Artifact Repository

ตัวอย่างคำอธิบายประกอบและตัวอย่างโค้ด

// Create an instance of Reply class and add comments
Reply firstReply = new Reply();
firstReply.setComment("First comment");
firstReply.setRepliedOn(Calendar.getInstance().getTime());

Reply secondReply = new Reply();
secondReply.setComment("Second comment");
secondReply.setRepliedOn(Calendar.getInstance().getTime());

List<Reply> replies = new ArrayList<Reply>();
replies.add(firstReply);
replies.add(secondReply);

// Create an instance of AreaAnnotation class and set options
AreaAnnotation area = new AreaAnnotation();
area.setBackgroundColor(65535);
area.setBox(new Rectangle(100, 100, 100, 100));
area.setCreatedOn(Calendar.getInstance().getTime());
area.setMessage("This is area annotation");
area.setOpacity(0.7);
area.setPageNumber(0);
area.setPenColor(65535);
area.setPenStyle(PenStyle.Dot);
area.setPenWidth((byte) 3);
area.setReplies(replies);

// Create an instance of Annotator class
Annotator annotator = new Annotator("input.bmp");

// Add annotation
annotator.add(area);

// Save to file
annotator.save("output.bmp");
annotator.dispose();

Annotation preview image

ขั้นตอนในการลบคำอธิบายประกอบจาก DJVU ใน Java

GroupDocs.Annotation ช่วยให้นักพัฒนา Java ลบรายละเอียดคำอธิบายประกอบออกจากไฟล์ DJVU ภายในแอปพลิเคชันที่ใช้ Java ได้ง่ายขึ้น โดยใช้ขั้นตอนง่ายๆ ไม่กี่ขั้นตอน

  • สร้างวัตถุตอบกลับพร้อมความคิดเห็นและวันที่
  • ยกตัวอย่างวัตถุ SaveOptions และตั้งค่า AnnotationTypes = AnnotationType.None
  • วิธีการบันทึกการโทรพร้อมเส้นทางเอกสารผลลัพธ์หรือสตรีมและวัตถุ SaveOptions

// Create an instance of Annotator class 
Annotator annotator = new Annotator("C://input.bmp");

// Remove annotation by set type None 
SaveOptions saveOptions = new SaveOptions();
saveOptions.setAnnotationTypes(AnnotationType.None);

// Save annotation to output file
annotator.save("C://output.bmp", saveOptions);
annotator.dispose();

ขั้นตอนในการแก้ไขคำอธิบายประกอบจาก DJVU ใน Java

GroupDocs.Annotation ช่วยให้นักพัฒนา Java อัปเดตคุณสมบัติคำอธิบายประกอบต่างๆ จากไฟล์ DJVU ได้ง่ายขึ้นภายในแอปพลิเคชันที่ใช้ Java โดยดำเนินการตามขั้นตอนง่ายๆ ไม่กี่ขั้นตอน

  • ยกตัวอย่างวัตถุ Annotator ด้วยเส้นทางเอกสารอินพุตหรือสตรีมด้วย LoadOptions ที่สร้างอินสแตนซ์ด้วย ImportAnnotations = จริง
  • สร้างการใช้งาน AnnotationBase และตั้งค่า Id ของคำอธิบายประกอบที่มีอยู่ (หากไม่พบคำอธิบายประกอบที่มีรหัสนั้น จะไม่มีอะไรเปลี่ยนแปลง) หรือรายการพาธของคำอธิบายประกอบ (คำอธิบายประกอบที่มีอยู่ทั้งหมดจะถูกลบออก)
  • เรียกใช้เมธอดการอัปเดตของออบเจกต์ Annotator พร้อมคำอธิบายประกอบที่ส่งผ่าน
  • วิธีการบันทึกการโทรพร้อมเส้นทางเอกสารผลลัพธ์หรือสตรีมและวัตถุ SaveOptions

String outputPath = "UpdateAnnotation.bmp";

// Create an instance of Annotator class
Annotator annotator = new Annotator("input.bmp");

// Create an instance of Reply class for first example and add comments
Reply reply1 = new Reply();
reply1.setComment("Original first comment");
reply1.setRepliedOn(Calendar.getInstance().getTime());

Reply reply2 = new Reply();
reply2.setComment("Original second comment");
reply2.setRepliedOn(Calendar.getInstance().getTime());

java.util.List replies = new ArrayList();
replies.add(reply1);
replies.add(reply2);

// Create an instance of AreaAnnotation class and set options
AreaAnnotation original = new AreaAnnotation();
original.setId(1);
original.setBackgroundColor(65535);
original.setBox(new Rectangle(100, 100, 100, 100));
original.setCreatedOn(Calendar.getInstance().getTime());
original.setMessage("This is original annotation");
original.setReplies(replies);

// Add original annotation
annotator.add(original);
annotator.save(outputPath);
annotator.dispose();

LoadOptions loadOptions = new LoadOptions();

// Open annotated document
Annotator annotator1 = new Annotator(outputPath, loadOptions);

// Create an instance of Reply class for update first example
Reply reply3 = new Reply();
reply3.setComment("Updated first comment");
reply3.setRepliedOn(Calendar.getInstance().getTime());

Reply reply4 = new Reply();
reply4.setComment("Updated second comment");
reply4.setRepliedOn(Calendar.getInstance().getTime());

java.util.List replies1 = new ArrayList();
replies1.add(reply3);
replies1.add(reply4);

// Suggest we want change some properties of existed annotation
AreaAnnotation updated = new AreaAnnotation();
updated.setId(1);
updated.setBackgroundColor(255);
updated.setBox(new Rectangle(0, 0, 50, 200));
updated.setCreatedOn(Calendar.getInstance().getTime());
updated.setMessage("This is updated annotation");
updated.setReplies(replies1);

// Update and save annotation
annotator1.update(updated);
annotator1.save(outputPath);
annotator1.dispose();

ขั้นตอนในการแยกคำอธิบายประกอบจาก DJVU ใน Java

GroupDocs.Annotation ทำให้นักพัฒนา Java สามารถใส่คำอธิบายประกอบเอกสารและดึงข้อมูลคำอธิบายประกอบจากไฟล์ DJVU ได้อย่างง่ายดายภายในแอปพลิเคชันที่ใช้ Java โดยใช้ขั้นตอนง่ายๆ ไม่กี่ขั้นตอน

  • สร้างวัตถุตอบกลับพร้อมความคิดเห็นและวันที่
  • ยกตัวอย่างวัตถุ LoadOptions และเรียก SetImportAnnotations ด้วยอาร์กิวเมนต์จริง
  • กำหนดตัวแปรด้วยประเภท List
  • เรียกใช้เมธอด get และส่งคืนผลลัพธ์ไปยังตัวแปรด้านบน

// For using this example input file ("annotated.bmp") must be with annotations
LoadOptions loadOptions = new LoadOptions();

// Create an instance of Annotator class and get annotations
final Annotator annotator = new Annotator("annotated.bmp", loadOptions);
List annotations = annotator.get();

การสาธิตสดเพื่อเพิ่ม ลบ แก้ไข แยกคำอธิบายประกอบในเอกสารและรูปภาพ

เพิ่ม ลบ แก้ไข และแยกคำอธิบายประกอบลงในไฟล์ DJVU ทันทีโดยไปที่เว็บไซต์ GroupDocs.Annotation Live Demos การสาธิตสดมีประโยชน์ดังต่อไปนี้

ไม่จำเป็นต้องดาวน์โหลดเอพีไอ

ไม่จำเป็นต้องเขียนรหัสใดๆ

เพียงแค่อัปโหลดแฟ้มแหล่งที่มา

รับลิงค์ดาวน์โหลดเพื่อบันทึกไฟล์

เกี่ยวกับรูปแบบไฟล์ DJVU

DjVu ออกเสียงว่า “เดจาวู” เป็นรูปแบบไฟล์กราฟิกที่มีไว้สำหรับเอกสารและหนังสือที่สแกน โดยเฉพาะไฟล์ที่มีข้อความ ภาพวาด รูปภาพ และภาพถ่ายรวมกัน ได้รับการพัฒนาโดย AT&T Labs มันใช้เทคนิคหลายอย่าง เช่น การแยกชั้นรูปภาพของข้อความและภาพพื้นหลัง การโหลดแบบก้าวหน้า การเข้ารหัสเลขคณิต และการบีบอัดแบบสูญเสียสำหรับภาพบิตัล เนื่องจากไฟล์ DJVU สามารถบรรจุรูปภาพสี ภาพถ่าย ข้อความ และภาพวาดที่มีการบีบอัดแต่มีคุณภาพสูง และสามารถบันทึกได้ในพื้นที่น้อย ดังนั้นจึงใช้บนเว็บเป็น eBooks คู่มือ หนังสือพิมพ์ เอกสารโบราณ ฯลฯ

อ่านต่อ เกี่ยวกับรูปแบบไฟล์ DJVU

การทำงานกับรูปแบบเอกสารยอดนิยมอื่นๆ

อัปเดตคุณสมบัติคำอธิบายประกอบจากรูปแบบไฟล์ยอดนิยมบางรูปแบบตามที่ระบุไว้ด้านล่าง

Annotate PDF document

(Adobe Portable Document Format)

Annotate DOC document

(Microsoft Word Document)

Annotate DOCM document

(Microsoft Word Macro-Enabled Document)

Annotate DOCX document

(Microsoft Word Open XML Document)

Annotate DOT document

(Microsoft Word Document Template)

Annotate DOTX document

(Word Open XML Document Template)

Annotate RTF document

(Rich Text Document)

Annotate ODT document

(Open Document Text)

Annotate XLS document

(Microsoft Excel Binary File Format)

Annotate XLSX document

(Microsoft Excel Open XML Spreadsheet)

Annotate XLSM document

(Microsoft Excel Macro-Enabled Spreadsheet)

Annotate XLSB document

(Microsoft Excel Binary Worksheet)

Annotate ODS document

(Open Document Spreadsheet)

Annotate PPT document

(PowerPoint Presentation)

Annotate PPTX document

(PowerPoint Open XML Presentation)

Annotate PPSX document

(PowerPoint Open XML Slide Show)

Annotate POTM document

(Microsoft PowerPoint Template)

Annotate PPTM document

(Microsoft PowerPoint Presentation)

Annotate PPS document

(Microsoft PowerPoint 97-2003 Slide Show)

Annotate ODP document

(OpenDocument Presentation)

Annotate HTML document

(HyperText Markup Language)

Annotate TIFF document

(Tagged Image File Format)

Annotate PNG document

(Portable Network Graphic)

Annotate EML document

(E-mail Message)

Annotate MSG document

(Microsoft Outlook E-mail Message)

Annotate VSD document

(Microsoft Visio 2003-2010 Drawing)

Annotate VSDX document

(Microsoft Visio Drawing)

Annotate VSS document

(Microsoft Visio 2003-2010 Stencil)

Annotate VST document

(Microsoft Visio 2013 Stencil)

Annotate DWG document

(Autodesk Design Data Formats)

Annotate DXF document

(AutoCAD Drawing Interchange)

Annotate DCM document

(Digital Imaging and Communications in Medicine)

Annotate WMF document

(Windows Metafile)

Annotate EMF document

(Enhanced Metafile Format)

Back to top
 ไทย