iTextSharp.text.pdf.PdfFileSpecification.FileEmbedded C# (CSharp) Метод

FileEmbedded() публичный статический Метод

public static FileEmbedded ( PdfWriter writer, String filePath, String fileDisplay, byte fileStore ) : PdfFileSpecification
writer PdfWriter
filePath String
fileDisplay String
fileStore byte
Результат PdfFileSpecification
        public static PdfFileSpecification FileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore) {
            return FileEmbedded(writer, filePath, fileDisplay, fileStore, PdfStream.BEST_COMPRESSION);
        }

Same methods

PdfFileSpecification::FileEmbedded ( PdfWriter writer, String filePath, String fileDisplay, byte fileStore, String mimeType, PdfDictionary fileParameter, int compressionLevel ) : PdfFileSpecification
PdfFileSpecification::FileEmbedded ( PdfWriter writer, String filePath, String fileDisplay, byte fileStore, bool compress ) : PdfFileSpecification
PdfFileSpecification::FileEmbedded ( PdfWriter writer, String filePath, String fileDisplay, byte fileStore, bool compress, String mimeType, PdfDictionary fileParameter ) : PdfFileSpecification
PdfFileSpecification::FileEmbedded ( PdfWriter writer, String filePath, String fileDisplay, byte fileStore, int compressionLevel ) : PdfFileSpecification

Usage Example

Пример #1
0
        /**
         * Use this method to add a file attachment at the document level.
         * @param description the file description
         * @param fileStore an array with the file. If it's <CODE>null</CODE>
         * the file will be read from the disk
         * @param file the path to the file. It will only be used if
         * <CODE>fileStore</CODE> is not <CODE>null</CODE>
         * @param fileDisplay the actual file name stored in the pdf
         * @param mimeType mime type of the file
         * @param afRelationshipValue AFRelationship key value, @see AFRelationshipValue. If <CODE>null</CODE>, @see AFRelationshipValue.Unspecified will be added.
         *
         * @throws IOException on error
         */
        public void AddFileAttachment(String description, byte[] fileStore, String file, String fileDisplay,
                                      String mimeType, PdfName afRelationshipValue)
        {
            PdfFileSpecification pdfFileSpecification = PdfFileSpecification.FileEmbedded(this, file, fileDisplay,
                                                                                          fileStore, mimeType, null, PdfStream.BEST_COMPRESSION);

            if (afRelationshipValue != null)
            {
                pdfFileSpecification.Put(PdfName.AFRELATIONSHIP, afRelationshipValue);
            }
            else
            {
                pdfFileSpecification.Put(PdfName.AFRELATIONSHIP, AFRelationshipValue.Unspecified);
            }

            AddFileAttachment(description, pdfFileSpecification);
        }
All Usage Examples Of iTextSharp.text.pdf.PdfFileSpecification::FileEmbedded