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

📄 pdfstamper.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
  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></DL></DD><DD><DL><DT><B>Parameters:</B><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> - if anything was already written to the output</DL></DD></DL><HR><A NAME="setEncryption(int, java.lang.String, java.lang.String, int)"><!-- --></A><H3>setEncryption</H3><PRE>public void <B>setEncryption</B>(int&nbsp;encryptionType,                          <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>&nbsp;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>&nbsp;ownerPassword,                          int&nbsp;permissions)                   throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></PRE><DL><DD>Sets the encryption options for this document. 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></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>encryptionType</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<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - if anything was already written to the output</DL></DD></DL><HR><A NAME="setEncryption(java.security.cert.Certificate[], int[], int)"><!-- --></A><H3>setEncryption</H3><PRE>public void <B>setEncryption</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/security/cert/Certificate.html?is-external=true" title="class or interface in java.security.cert">Certificate</A>[]&nbsp;certs,                          int[]&nbsp;permissions,                          int&nbsp;encryptionType)                   throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></PRE><DL><DD>Sets the certificate encryption options for this document. An array of one or more public certificates must be provided together with an array of the same size for the permissions for each certificate.  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. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/interfaces/PdfEncryptionSettings.html#setEncryption(java.security.cert.Certificate[], int[], int)">setEncryption</A></CODE> in interface <CODE><A HREF="../../../../com/lowagie/text/pdf/interfaces/PdfEncryptionSettings.html" title="interface in com.lowagie.text.pdf.interfaces">PdfEncryptionSettings</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>certs</CODE> - the public certificates to be used for the encryption<DD><CODE>permissions</CODE> - the user permissions for each of the certificates<DD><CODE>encryptionType</CODE> - the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - if the encryption was set too late</DL></DD></DL><HR><A NAME="getImportedPage(com.lowagie.text.pdf.PdfReader, int)"><!-- --></A><H3>getImportedPage</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/PdfImportedPage.html" title="class in com.lowagie.text.pdf">PdfImportedPage</A> <B>getImportedPage</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A>&nbsp;reader,                                       int&nbsp;pageNumber)</PRE><DL><DD>Gets a page from other PDF document. Note that calling this method more than once with the same parameters will retrieve the same object.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the PDF document where the page is<DD><CODE>pageNumber</CODE> - the page number. The first page is 1<DT><B>Returns:</B><DD>the template representing the imported page</DL></DD></DL><HR><A NAME="getWriter()"><!-- --></A><H3>getWriter</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html" title="class in com.lowagie.text.pdf">PdfWriter</A> <B>getWriter</B>()</PRE><DL><DD>Gets the underlying PdfWriter.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the underlying PdfWriter</DL></DD></DL><HR><A NAME="getReader()"><!-- --></A><H3>getReader</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/PdfReader.html" title="class in com.lowagie.text.pdf">PdfReader</A> <B>getReader</B>()</PRE><DL><DD>Gets the underlying PdfReader.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the underlying PdfReader</DL></DD></DL><HR><A NAME="getAcroFields()"><!-- --></A><H3>getAcroFields</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/AcroFields.html" title="class in com.lowagie.text.pdf">AcroFields</A> <B>getAcroFields</B>()</PRE><DL><DD>Gets the <CODE>AcroFields</CODE> object that allows to get and set field values and to merge FDF forms.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <CODE>AcroFields</CODE> object</DL></DD></DL><HR><A NAME="setFormFlattening(boolean)"><!-- --></A><H3>setFormFlattening</H3><PRE>public void <B>setFormFlattening</B>(boolean&nbsp;flat)</PRE><DL><DD>Determines if the fields are flattened on close. The fields added with <A HREF="../../../../com/lowagie/text/pdf/PdfStamper.html#addAnnotation(com.lowagie.text.pdf.PdfAnnotation, int)"><CODE>addAnnotation(PdfAnnotation,int)</CODE></A> will never be flattened.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>flat</CODE> - <CODE>true</CODE> to flatten the fields, <CODE>false</CODE> to keep the fields</DL></DD></DL><HR><A NAME="setFreeTextFlattening(boolean)"><!-- --></A><H3>setFreeTextFlattening</H3><PRE>public void <B>setFreeTextFlattening</B>(boolean&nbsp;flat)</PRE><DL><DD>Determines if the FreeText annotations are flattened on close.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>flat</CODE> - <CODE>true</CODE> to flatten the FreeText annotations, <CODE>false</CODE> (the default) to keep the FreeText annotations as active content.</DL></DD></DL><HR><A NAME="addAnnotation(com.lowagie.text.pdf.PdfAnnotation, int)"><!-- --></A><H3>addAnnotation</H3><PRE>public void <B>addAnnotation</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfAnnotation.html" title="class in com.lowagie.text.pdf">PdfAnnotation</A>&nbsp;annot,                          int&nbsp;page)</PRE><DL><DD>Adds an annotation of form field in a specific page. This page number can be overridden with <A HREF="../../../../com/lowagie/text/pdf/PdfAnnotation.html#setPlaceInPage(int)"><CODE>PdfAnnotation.setPlaceInPage(int)</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>annot</CODE> - the annotation<DD><CODE>page</CODE> - the page</DL></DD></DL><HR><A NAME="addComments(com.lowagie.text.pdf.FdfReader)"><!-- --></A><H3>addComments</H3><PRE>public void <B>addComments</B>(<A HREF="../../../../com/lowagie/text/pdf/FdfReader.html" title="class in com.lowagie.text.pdf">FdfReader</A>&nbsp;fdf)                 throws <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>Adds the comments present in an FDF file.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fdf</CODE> - the FDF file<DT><B>Throws:</B><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="setOutlines(java.util.List)"><!-- --></A><H3>setOutlines</H3><PRE>public void <B>setOutlines</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&nbsp;outlines)</PRE><DL><DD>Sets the bookmarks. The list structure is defined in <A HREF="../../../../com/lowagie/text/pdf/SimpleBookmark.html" title="class in com.lowagie.text.pdf"><CODE>SimpleBookmark</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>outlines</CODE> - the bookmarks or <CODE>null</CODE> to remove any</DL></DD></DL><HR><A NAME="setThumbnail(com.lowagie.text.Image, int)"><!-- --></A><H3>setThumbnail</H3><PRE>public void <B>setThumbnail</B>(<A HREF="../../../../com/lowagie/text/Image.html" title="class in com.lowagie.text">Image</A>&nbsp;image,                         int&nbsp;page)                  throws <A HREF="../../../../com/lowagie/text/pdf/PdfException.html" title="class in com.lowagie.text.pdf">PdfException</A>,                         <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></PRE><DL><DD>Sets the thumbnail image for a page.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - the image<DD><CODE>page</CODE> - the page<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowa

⌨️ 快捷键说明

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