PDFAttachment Type

The attachment of PDF file.

Remarks

The attachment of PDF file.

Fields

ContentType
String

The Content-Type of the attachment.

File extensions are mapped to the following Content-Type:

ExtensionContent-Type
avivideo/avi
bmpimage/bmp
comapplication/octet-stream
csstext/css
docapplication/msword
exeapplication/octet-stream
gifimage/gif
htmtext/html
htmltext/html
jpgimage/jpeg
jpegimage/jpeg
midaudio/midi
midiaudio/midi
mjpgvideo/x-motion-jpeg
movvideo/quicktime
mp2audio/mpeg
mp3audio/mpeg
mpegvideo/mpeg
mpgvideo/mpeg
pdfapplication/pdf
pngimage/png
pptapplication/mspowerpoint
sgmtext/sgml
sgmltext/sgml
swfapplication/x-shockwave-flash
tarapplication/x-tar
tifimage/tiff
tiffimage/tiff
txttext/plain
wavaudio/wav
wmaaudio/x-ms-wma
wmvaudio/x-ms-wmv
xml"text/xml
zipapplication/x-compressed

If no extension is found the default is application/octet-stream.

Data
String

This field contains the attachment data.

When calling Save the data to use for the attachment will be obtained using the following search order. When a valid source of data is found the search stops.

After calling Load but before calling ParseAttachment the class will use the following search order to determine where the attachment data will be written. When a valid destination for the attachment data is found the search stops. When ParseAttachment is called the data will be written to the selected destination.

DataB
byte[]

This field contains the attachment data.

When calling Save the data to use for the attachment will be obtained using the following search order. When a valid source of data is found the search stops.

After calling Load but before calling ParseAttachment the class will use the following search order to determine where the attachment data will be written. When a valid destination for the attachment data is found the search stops. When ParseAttachment is called the data will be written to the selected destination.

Description
String

The description of the attachment.

Filename
String

This field optionally specifies the filename to use for input and output of the attachment data.

When calling Save the data to use for the attachment will be obtained using the following search order. When a valid source of data is found the search stops.

After calling Load but before calling ParseAttachment the class will use the following search order to determine where the attachment data will be written. When a valid destination for the attachment data is found the search stops. When ParseAttachment is called the data will be written to the selected destination.

InputStream
java.io.InputStream

This field optionally specifies the input stream to use for the attachment when Save is called.

When calling Save the data to use for the attachment will be obtained using the following search order. When a valid source of data is found the search stops.

Name
String

The name of the attachment. The default value is "" (empty string).

OutputStream
java.io.OutputStream

This field optionally specifies the output stream to use when ParseAttachment is called.

After calling Load but before calling ParseAttachment the class will use the following search order to determine where the attachment data will be written. When a valid destination for the attachment data is found the search stops. When ParseAttachment is called the data will be written to the selected destination.

Relationship
String

The relationship of attachment. e.g. Alternative, Source. Note: this field is used for ZUGFeRD XML invoices.

Constructors

public PDFAttachment();



public PDFAttachment(String filename);



public PDFAttachment(String name, byte[] data, String contentType);



public PDFAttachment(String name, String filename, String contentType);



Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 Java Edition - Version 20.0 [Build 7941]