📄 pdfencryptor.html
字号:
Tells you if copying is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isDegradedPrintingAllowed(int)">isDegradedPrintingAllowed</A></B>(int permissions)</CODE><BR> Tells you if degraded printing is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isFillInAllowed(int)">isFillInAllowed</A></B>(int permissions)</CODE><BR> Tells you if filling in fields is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isModifyAnnotationsAllowed(int)">isModifyAnnotationsAllowed</A></B>(int permissions)</CODE><BR> Tells you if modifying annotations is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isModifyContentsAllowed(int)">isModifyContentsAllowed</A></B>(int permissions)</CODE><BR> Tells you if modifying content is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isPrintingAllowed(int)">isPrintingAllowed</A></B>(int permissions)</CODE><BR> Tells you if printing is allowed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/PdfEncryptor.html#isScreenReadersAllowed(int)">isScreenReadersAllowed</A></B>(int permissions)</CODE><BR> Tells you if repurposing for screenreaders is allowed.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="PdfEncryptor()"><!-- --></A><H3>PdfEncryptor</H3><PRE>private <B>PdfEncryptor</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="encrypt(com.lowagie.text.pdf.PdfReader, java.io.OutputStream, byte[], byte[], int, boolean)"><!-- --></A><H3>encrypt</H3><PRE>public static void <B>encrypt</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os, byte[] userPassword, byte[] ownerPassword, int permissions, boolean strength128Bits) throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Entry point to encrypt a PDF document. The encryption parameters are the same as in <code>PdfWriter</code>. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the read PDF<DD><CODE>os</CODE> - the output destination<DD><CODE>userPassword</CODE> - the user password. Can be null or empty<DD><CODE>ownerPassword</CODE> - the owner password. Can be null or empty<DD><CODE>permissions</CODE> - the user permissions<DD><CODE>strength128Bits</CODE> - <code>true</code> for 128 bit key length, <code>false</code> for 40 bit key length<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error</DL></DD></DL><HR><A NAME="encrypt(com.lowagie.text.pdf.PdfReader, java.io.OutputStream, byte[], byte[], int, boolean, java.util.HashMap)"><!-- --></A><H3>encrypt</H3><PRE>public static void <B>encrypt</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os, byte[] userPassword, byte[] ownerPassword, int permissions, boolean strength128Bits, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A> newInfo) throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Entry point to encrypt a PDF document. The encryption parameters are the same as in <code>PdfWriter</code>. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the read PDF<DD><CODE>os</CODE> - the output destination<DD><CODE>userPassword</CODE> - the user password. Can be null or empty<DD><CODE>ownerPassword</CODE> - the owner password. Can be null or empty<DD><CODE>permissions</CODE> - the user permissions<DD><CODE>strength128Bits</CODE> - <code>true</code> for 128 bit key length, <code>false</code> for 40 bit key length<DD><CODE>newInfo</CODE> - an optional <CODE>String</CODE> map to add or change the info dictionary. Entries with <CODE>null</CODE> values delete the key in the original info dictionary<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error</DL></DD></DL><HR><A NAME="encrypt(com.lowagie.text.pdf.PdfReader, java.io.OutputStream, boolean, java.lang.String, java.lang.String, int)"><!-- --></A><H3>encrypt</H3><PRE>public static void <B>encrypt</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os, boolean strength, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> userPassword, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> ownerPassword, int permissions) throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Entry point to encrypt a PDF document. The encryption parameters are the same as in <code>PdfWriter</code>. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the read PDF<DD><CODE>os</CODE> - the output destination<DD><CODE>strength</CODE> - <code>true</code> for 128 bit key length, <code>false</code> for 40 bit key length<DD><CODE>userPassword</CODE> - the user password. Can be null or empty<DD><CODE>ownerPassword</CODE> - the owner password. Can be null or empty<DD><CODE>permissions</CODE> - the user permissions<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error</DL></DD></DL><HR><A NAME="encrypt(com.lowagie.text.pdf.PdfReader, java.io.OutputStream, boolean, java.lang.String, java.lang.String, int, java.util.HashMap)"><!-- --></A><H3>encrypt</H3><PRE>public static void <B>encrypt</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os, boolean strength, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> userPassword, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> ownerPassword, int permissions, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A> newInfo) throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Entry point to encrypt a PDF document. The encryption parameters are the same as in <code>PdfWriter</code>. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the read PDF<DD><CODE>os</CODE> - the output destination<DD><CODE>strength</CODE> - <code>true</code> for 128 bit key length, <code>false</code> for 40 bit key length<DD><CODE>userPassword</CODE> - the user password. Can be null or empty<DD><CODE>ownerPassword</CODE> - the owner password. Can be null or empty<DD><CODE>permissions</CODE> - the user permissions<DD><CODE>newInfo</CODE> - an optional <CODE>String</CODE> map to add or change the info dictionary. Entries with <CODE>null</CODE> values delete the key in the original info dictionary<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error</DL></DD></DL><HR><A NAME="encrypt(com.lowagie.text.pdf.PdfReader, java.io.OutputStream, int, java.lang.String, java.lang.String, int, java.util.HashMap)"><!-- --></A><H3>encrypt</H3><PRE>public static void <B>encrypt</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> os, int type, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> userPassword, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> ownerPassword, int permissions, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A> newInfo) throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Entry point to encrypt a PDF document. The encryption parameters are the same as in <code>PdfWriter</code>. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the read PDF<DD><CODE>os</CODE> - the output destination<DD><CODE>type</CODE> - the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext<DD><CODE>userPassword</CODE> - the user password. Can be null or empty<DD><CODE>ownerPassword</CODE> - the owner password. Can be null or empty<DD><CODE>permissions</CODE> - the user permissions<DD><CODE>newInfo</CODE> - an optional <CODE>String</CODE> map to add or change the info dictionary. Entries with <CODE>null</CODE> values delete the key in the original info dictionary<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error</DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -