⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdfencryptor.html

📁 java编程java编程java编程java编程java编程java编程java编程
💻 HTML
📖 第 1 页 / 共 3 页
字号:

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</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">PdfReader</A>&nbsp;reader,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html">OutputStream</A>&nbsp;os,                           byte[]&nbsp;userPassword,                           byte[]&nbsp;ownerPassword,                           int&nbsp;permissions,                           boolean&nbsp;strength128Bits)                    throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">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> - true for 128 bit key length. false for 40 bit key length<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">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">PdfReader</A>&nbsp;reader,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html">OutputStream</A>&nbsp;os,                           boolean&nbsp;strength,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>&nbsp;userPassword,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>&nbsp;ownerPassword,                           int&nbsp;permissions)                    throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">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> - true for 128 bit key length. false 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">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - on error</DL>
</DD>
</DL>
<HR>

<A NAME="go()"><!-- --></A><H3>
go</H3>
<PRE>
protected void <B>go</B>()           throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>,                  <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Does the actual document manipulation to encrypt it.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - on error</DL>
</DD>
</DL>
<HR>

<A NAME="getNewObjectNumber(com.lowagie.text.pdf.PdfReader, int, int)"><!-- --></A><H3>
getNewObjectNumber</H3>
<PRE>
int <B>getNewObjectNumber</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html">PdfReader</A>&nbsp;reader,                       int&nbsp;number,                       int&nbsp;generation)</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html#getNewObjectNumber(com.lowagie.text.pdf.PdfReader, int, int)">getNewObjectNumber</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html">PdfWriter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getReaderFile(com.lowagie.text.pdf.PdfReader)"><!-- --></A><H3>
getReaderFile</H3>
<PRE>
<A HREF="../../../../com/lowagie/text/pdf/RandomAccessFileOrArray.html">RandomAccessFileOrArray</A> <B>getReaderFile</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html">PdfReader</A>&nbsp;reader)</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html#getReaderFile(com.lowagie.text.pdf.PdfReader)">getReaderFile</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html">PdfWriter</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/lowagie/text/pdf/PdfEncryption.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/lowagie/text/pdf/PdfFont.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PdfEncryptor.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_com.lowagie.text.pdf.PdfWriter">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -