PdfFileSecurity

PdfFileSecurity

Overview

PdfFileSecurity เป็นคลาสใน Aspose.PDF FOSS สําหรับ Java. ทายาทจาก: Closeable.

ให้วิธีการจัดการความปลอดภัยของเอกสาร PDF: การเข้ารหัส, การปลดรบคําผ่าน และอนุญาตในการเข้าถึง.

หมวดนี้ให้ 38 วิธีในการทํางานกับวัตถุ PdfFileSecurity ในโปรแกรม Java. วิธีการที่ใช้ได้แก่: PdfFileSecurity, bindPdf, changePassword, close, decryptFile, encryptFile, getDocument, getInputFile, getOutputFile, getOutputStream, isAllowExceptions, isEncrypted,และ 11 วิธีเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Java ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Java. คุณสมบัติ: allowExceptions, document, encrypted, inputFile, outputFile, outputStream.

Properties

NameTypeAccessDescription
inputFileStringReadกลับเส้นทางไฟล์ input ที่ถูกตั้งค่า.
outputFileStringReadส่งทางไฟล์การออกที่ตั้งค่ากลับ.
documentDocumentReadกลับเอกสารที่ผูกพัน, หรือ {@code null}.
outputStreamOutputStreamReadส่งกลับการออกไฟที่ตั้งค่า.
allowExceptionsbooleanReadกลับข้อมูลที่ว่าวิธีหน้าต่างควรโยนทันทีเมื่อการปฏิบัติพลาดหรือไม่.
encryptedbooleanReadกลับข้อมูลที่ว่าเอกสารที่ถูกเชื่อมโยงถูกเข้ารหัสหรือไม่.

Methods

SignatureDescription
PdfFileSecurity()สร้างตัวอย่างใหม่ {@code PdfFileSecurity}.
PdfFileSecurity(inputFile: String, outputFile: String)สร้างหน้าผิวที่เชื่อมต่อกับไฟล์การเข้าและออกที่กําหนดไว้.
PdfFileSecurity(inputStream: InputStream, outputStream: OutputStream)สร้างหน้าผิวที่เชื่อมต่อกับการเข้าและออกของไฟฟ้าที่กําหนดไว้.
PdfFileSecurity(document: Document, outputStream: OutputStream)สร้างหน้าผิวที่เชื่อมต่อกับเอกสารและคลื่นผลิตที่ถูกกําหนดไว้.
getInputFile()Stringกลับเส้นทางไฟล์ input ที่ถูกตั้งค่า.
setInputFile(inputFile: String)กําหนดเส้นทางไฟล์ input ที่ถูกตั้งค่าไว้.
getOutputFile()Stringส่งทางไฟล์การออกที่ตั้งค่ากลับ.
setOutputFile(outputFile: String)กําหนดเส้นทางไฟล์การออกที่ตั้งค่า.
setInputStream(inputStream: InputStream)กําหนดการเข้าไฟที่ตั้งค่าไว้.
getDocument()Documentกลับเอกสารที่ผูกพัน, หรือ {@code null}.
getOutputStream()OutputStreamส่งกลับการออกไฟที่ตั้งค่า.
setOutputStream(outputStream: OutputStream)กําหนดการออกไฟฟ้าที่ตั้งค่าไว้.
isAllowExceptions()booleanกลับข้อมูลที่ว่าวิธีหน้าต่างควรโยนทันทีเมื่อการปฏิบัติพลาดหรือไม่.
setAllowExceptions(allowExceptions: boolean)ตั้งสัญลักษณ์การกระทําพิเศษ.
bindPdf(inputFile: String)booleanเชื่อมไฟล์ PDF กับหน้ากองรักษาความปลอดภัยนี้.
bindPdf(inputStream: InputStream)booleanการผูกพัน PDF จากการส่งเข้า.
bindPdf(document: Document)booleanเชื่อมต่อ {@link Document} ที่มีอยู่กับหน้ากากความปลอดภัยนี้.
save(outputFile: String)booleanเก็บเอกสารที่ผูกเข้าเป็นไฟล์.
save(outputStream: OutputStream)booleanเก็บเอกสารที่เชื่อมต่อไปยังสตรีมการออก.
save()booleanเก็บเอกสารที่เชื่อมต่อไปยังจุดหมายการออกแบบที่ตั้งค่า.
decryptFile(password: String)booleanแปลรหัสเอกสาร PDF ที่ติดต่อไว้.
isEncrypted()booleanกลับข้อมูลที่ว่าเอกสารที่ถูกเชื่อมโยงถูกเข้ารหัสหรือไม่.
setPrivilege(userPassword: String, ownerPassword: String, permissions: int)booleanวางสิทธิพิเศษเอกสาร โดยใช้รหัสผ่านที่ชัดเจน และบิตมาสก์ Raw.
setPrivilege(privilege: DocumentPrivilege)booleanวางสิทธิอนุญาตเอกสารโดยใช้รหัสผ่านเปล่า.
setPrivilege(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege)booleanตั้งสิทธิพิเศษเอกสาร และใช้การเข้ารหัสมาตรฐานโดยใช้น้ําหมายผ่านที่ให้บริการ.
encryptFile(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege, keySize: KeySize)booleanการเข้ารหัสเอกสาร โดยใช้ขนาดกุญแจที่กําหนด.
encryptFile(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege, keySize: KeySize, algorithm: Algorithm)booleanการเข้ารหัสเอกสาร โดยใช้ขนาดกุญแจและครอบครัวอัลโกทิมที่กําหนดไว้.
changePassword(oldPassword: String, newPassword: String, newOwnerPassword: String)booleanเปลี่ยนคํารหัสเอกสารโดยรักษาอนุญาตและอัลโกริธมปัจจุบัน.
changePassword(oldPassword: String, newPassword: String, newOwnerPassword: String, privilege: DocumentPrivilege, keySize: KeySize)booleanเปลี่ยนคํารหัสและสัญลักษณ์สิทธิพิเศษ โดยใช้ขนาดคีย์ที่กําหนด.
changePassword(oldPassword: String, newPassword: String, newOwnerPassword: String, privilege: DocumentPrivilege, keySize: KeySize, algorithm: Algorithm)booleanเปลี่ยนคําผ่าน แผงสิทธิพิเศษ และครอบครัวอัลโกริธม.
trySetPrivilege(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege)booleanพยายามตั้งสิทธิพิเศษและคืน {@code false} แทนการโยน.
tryEncryptFile(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege, keySize: KeySize)booleanพยายามเข้ารหัสและคืน {@code false} แทนที่จะโยน.
tryEncryptFile(userPassword: String, ownerPassword: String, privilege: DocumentPrivilege, keySize: KeySize, algorithm: Algorithm)booleanพยายามเข้ารหัสและคืน {@code false} แทนที่จะโยน.
tryDecryptFile(password: String)booleanพยายามที่จะปลดรหัสและคืน {@code false} แทนการโยน.
tryChangePassword(oldPassword: String, newPassword: String, newOwnerPassword: String)booleanพยายามเปลี่ยนรหัสผ่านและคืน {@code false} แทนที่จะโยน.
tryChangePassword(oldPassword: String, newPassword: String, newOwnerPassword: String, privilege: DocumentPrivilege, keySize: KeySize)booleanพยายามเปลี่ยนรหัสผ่านและคืน {@code false} แทนที่จะโยน.
tryChangePassword(oldPassword: String, newPassword: String, newOwnerPassword: String, privilege: DocumentPrivilege, keySize: KeySize, algorithm: Algorithm)booleanพยายามเปลี่ยนรหัสผ่านและคืน {@code false} แทนที่จะโยน.
close()ปิดหน้าตึกความปลอดภัย และปล่อยเอกสารที่ติดไว้.

See Also

 ภาษาไทย