📄 pdffilespecification.html
字号:
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>Creates a file specification with the file embedded. The file may come from the file system or from a byte array.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>writer</CODE> - the <CODE>PdfWriter</CODE><DD><CODE>filePath</CODE> - the file path<DD><CODE>fileDisplay</CODE> - the file information that is presented to the user<DD><CODE>fileStore</CODE> - the byte array with the file. If it is not <CODE>null</CODE> it takes precedence over <CODE>filePath</CODE><DD><CODE>compress</CODE> - sets the compression on the data. Multimedia content will benefit little from compression<DT><B>Returns:</B><DD>the file specification<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="fileEmbedded(com.lowagie.text.pdf.PdfWriter, java.lang.String, java.lang.String, byte[], boolean, java.lang.String, com.lowagie.text.pdf.PdfDictionary)"><!-- --></A><H3>fileEmbedded</H3><PRE>public static <A HREF="../../../../com/lowagie/text/pdf/PdfFileSpecification.html" title="class in com.lowagie.text.pdf">PdfFileSpecification</A> <B>fileEmbedded</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html" title="class in com.lowagie.text.pdf">PdfWriter</A> writer, <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> filePath, <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> fileDisplay, byte[] fileStore, boolean compress, <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> mimeType, <A HREF="../../../../com/lowagie/text/pdf/PdfDictionary.html" title="class in com.lowagie.text.pdf">PdfDictionary</A> fileParameter) 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>Creates a file specification with the file embedded. The file may come from the file system or from a byte array.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>writer</CODE> - the <CODE>PdfWriter</CODE><DD><CODE>filePath</CODE> - the file path<DD><CODE>fileDisplay</CODE> - the file information that is presented to the user<DD><CODE>fileStore</CODE> - the byte array with the file. If it is not <CODE>null</CODE> it takes precedence over <CODE>filePath</CODE><DD><CODE>compress</CODE> - sets the compression on the data. Multimedia content will benefit little from compression<DD><CODE>mimeType</CODE> - the optional mimeType<DD><CODE>fileParameter</CODE> - the optional extra file parameters such as the creation or modification date<DT><B>Returns:</B><DD>the file specification<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="fileExtern(com.lowagie.text.pdf.PdfWriter, java.lang.String)"><!-- --></A><H3>fileExtern</H3><PRE>public static <A HREF="../../../../com/lowagie/text/pdf/PdfFileSpecification.html" title="class in com.lowagie.text.pdf">PdfFileSpecification</A> <B>fileExtern</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html" title="class in com.lowagie.text.pdf">PdfWriter</A> writer, <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> filePath)</PRE><DL><DD>Creates a file specification for an external file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>writer</CODE> - the <CODE>PdfWriter</CODE><DD><CODE>filePath</CODE> - the file path<DT><B>Returns:</B><DD>the file specification</DL></DD></DL><HR><A NAME="getReference()"><!-- --></A><H3>getReference</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A> <B>getReference</B>() 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>Gets the indirect reference to this file specification. Multiple invocations will retrieve the same value.<P><DD><DL><DT><B>Returns:</B><DD>the indirect reference<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="setMultiByteFileName(byte[])"><!-- --></A><H3>setMultiByteFileName</H3><PRE>public void <B>setMultiByteFileName</B>(byte[] fileName)</PRE><DL><DD>Sets the file name (the key /F) string as an hex representation to support multi byte file names. The name must have the slash and backslash escaped according to the file specification rules<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fileName</CODE> - the file name as a byte array</DL></DD></DL><HR><A NAME="setUnicodeFileName(java.lang.String, boolean)"><!-- --></A><H3>setUnicodeFileName</H3><PRE>public void <B>setUnicodeFileName</B>(<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> filename, boolean unicode)</PRE><DL><DD>Adds the unicode file name (the key /UF). This entry was introduced in PDF 1.7. The filename must have the slash and backslash escaped according to the file specification rules.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - the filename<DD><CODE>unicode</CODE> - if true, the filename is UTF-16BE encoded; otherwise PDFDocEncoding is used;</DL></DD></DL><HR><A NAME="setVolatile(boolean)"><!-- --></A><H3>setVolatile</H3><PRE>public void <B>setVolatile</B>(boolean volatile_file)</PRE><DL><DD>Sets a flag that indicates whether an external file referenced by the file specification is volatile. If the value is true, applications should never cache a copy of the file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>volatile_file</CODE> - if true, the external file should not be cached</DL></DD></DL><HR><A NAME="addDescription(java.lang.String, boolean)"><!-- --></A><H3>addDescription</H3><PRE>public void <B>addDescription</B>(<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> description, boolean unicode)</PRE><DL><DD>Adds a description for the file that is specified here.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>description</CODE> - some text<DD><CODE>unicode</CODE> - if true, the text is added as a unicode string</DL></DD></DL><HR><A NAME="addCollectionItem(com.lowagie.text.pdf.collection.PdfCollectionItem)"><!-- --></A><H3>addCollectionItem</H3><PRE>public void <B>addCollectionItem</B>(<A HREF="../../../../com/lowagie/text/pdf/collection/PdfCollectionItem.html" title="class in com.lowagie.text.pdf.collection">PdfCollectionItem</A> ci)</PRE><DL><DD>Adds the Collection item dictionary.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Hosted by <a href="http://www.hostbasket.com/">Hostbasket</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/lowagie/text/pdf/PdfException.html" title="class in com.lowagie.text.pdf"><B>PREV CLASS</B></A> <A HREF="../../../../com/lowagie/text/pdf/PdfFont.html" title="class in com.lowagie.text.pdf"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/lowagie/text/pdf/PdfFileSpecification.html" target="_top"><B>FRAMES</B></A> <A HREF="PdfFileSpecification.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -