PdfContentEditor
ภาพรวม
PdfContentEditor เป็นคลาสใน Aspose.PDF FOSS สําหรับ Java. ทายาทจาก: AutoCloseable.
ให้วิธีการแก้ไขเนื้อหา PDF โดยเฉพาะปฏิบัติงานแทนที่ข้อความ.
หมวดนี้ให้ 17 วิธีในการทํางานกับวัตถุ PdfContentEditor ในโปรแกรม Java. วิธีการที่ใช้ได้แก่: PdfContentEditor, bindPdf, close, createText, deleteStampById, getDocument, getReplaceTextStrategy, getStamps, getTextReplaceOptions, replaceText, save, setTextReplaceOptions. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Java ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Java. คุณสมบัติ: document, replaceTextStrategy, textReplaceOptions.
คุณสมบัติ
| ชื่อ | ประเภท | Access | คําอธิบาย |
|---|---|---|---|
textReplaceOptions | TextReplaceOptions | อ่าน | กลับตัวเลือกสํารองข้อความที่ใช้โดยผู้แก้ไขนี้. |
replaceTextStrategy | ReplaceTextStrategy | อ่าน | การคืนการตั้งค่าของกลยุทธ์ทดแทนข้อความ. |
document | Document | อ่าน | ส่งเอกสารที่ติดต่อกลับ. |
วิธีการ
| Signature | คําอธิบาย |
|---|---|
PdfContentEditor() | สร้างตัวอย่างใหม่ {@code PdfContentEditor}. |
getTextReplaceOptions() → TextReplaceOptions | กลับตัวเลือกสํารองข้อความที่ใช้โดยผู้แก้ไขนี้. |
setTextReplaceOptions(options: TextReplaceOptions) | ตั้งค่าตัวเลือกการแทนที่ข้อความ. |
getReplaceTextStrategy() → ReplaceTextStrategy | การคืนการตั้งค่าของกลยุทธ์ทดแทนข้อความ. |
bindPdf(inputFile: String) → boolean | เชื่อมไฟล์ PDF กับการจัดทํานี้. |
bindPdf(inputStream: InputStream) → boolean | การผูกพัน PDF จากการส่งเข้า. |
bindPdf(document: Document) → boolean | เชื่อมต่อ {@link Document} ที่มีอยู่กับผู้แก้ไขนี้. |
save(outputFile: String) → boolean | เก็บเอกสารที่ผูกเข้าเป็นไฟล์. |
save(outputStream: OutputStream) → boolean | เก็บเอกสารที่เชื่อมต่อไปยังสตรีมการออก. |
replaceText(searchText: String, replaceText: String) → boolean | เปลี่ยนแปลงทุกครั้งที่คํานวณที่ถูกกําหนดเกิดขึ้นในเอกสารทั้งหมด. |
replaceText(searchText: String, pageNumber: int, replaceText: String) → boolean | เปลี่ยนแปลงทุกครั้งที่บทความที่ถูกกําหนดอยู่ในหน้าเฉพาะเจาะจง. |
getDocument() → Document | ส่งเอกสารที่ติดต่อกลับ. |
getStamps(pageNumber: int) → StampInfo[] | ส่งกลับเมตาเดทตราที่เก็บไว้ในหน้า. |
deleteStampById(pageNumber: int, stampId: int) → boolean | ลบรายการเมตาข้อมูลของตราโดย ID ตรา. |
deleteStampById(stampId: int) → boolean | ลบรายการเมตาเดทราคาโดย id ของตราจากทุกหน้า. |
createText(rect: org.aspose.pdf.Rectangle, title: String, contents: String, open: boolean, icon: String, pageNumber: int) → boolean | สร้าง {@link org.aspose.pdf.annotations.TextAnnotation} บนหน้าที่ให้ในสี่เหลี่ยมที่ได้รับการแสดง. |
close() | ปิด editor และปล่อยเอกสารที่ผูกพัน. |