HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
Static Public Attributes | |
const int | DEFAULT_COMPRESSION = -1 |
const int | NO_COMPRESSION = 0 |
const int | BEST_SPEED = 1 |
const int | BEST_COMPRESSION = 9 |
![]() | |
static PdfName | FONT = PdfName.FONT |
static PdfName | OUTLINES = PdfName.OUTLINES |
static PdfName | PAGE = PdfName.PAGE |
static PdfName | PAGES = PdfName.PAGES |
static PdfName | CATALOG = PdfName.CATALOG |
![]() | |
const int | BOOLEAN = 1 |
const int | NUMBER = 2 |
const int | STRING = 3 |
const int | NAME = 4 |
const int | ARRAY = 5 |
const int | DICTIONARY = 6 |
const int | STREAM = 7 |
const int | NULL = 8 |
const int | INDIRECT = 10 |
const string | NOTHING = "" |
const string | TEXT_PDFDOCENCODING = "PDF" |
const string | TEXT_UNICODE = "UnicodeBig" |
Protected Member Functions | |
PdfStream () | |
virtual void | SuperToPdf (PdfWriter writer, Stream os) |
![]() | |
PdfObject (int type) | |
PdfObject (int type, string content) | |
PdfObject (int type, byte[] bytes) | |
Protected Attributes | |
bool | compressed = false |
int | compressionLevel = NO_COMPRESSION |
MemoryStream | streamBytes = null |
Stream | inputStream |
PdfIndirectReference | iref |
int | inputStreamLength = -1 |
PdfWriter | writer |
int | rawLength |
![]() | |
byte[] | bytes |
int | type |
PRIndirectReference | indRef |
Properties | |
int | RawLength [get] |
![]() | |
ICollection | Keys [get] |
int | Size [get] |
![]() | |
int | Length [get] |
string | Content [set] |
int | Type [get] |
PRIndirectReference | IndRef [get, set] |
PdfStream
is the Pdf stream object.
A stream, like a string, is a sequence of characters. However, an application can read a small portion of a stream at a time, while a string must be read in its entirety. For this reason, objects with potentially large amounts of data, such as images and page descriptions, are represented as streams.
A stream consists of a dictionary that describes a sequence of characters, followed by the keyword stream, followed by zero or more lines of characters, followed by the keyword endstream.
All streams must be PdfIndirectObject
s. The stream dictionary must be a direct object. The keyword stream that follows the stream dictionary should be followed by a carriage return and linefeed or just a linefeed.
Remark: In this version only the FLATEDECODE-filter is supported.
This object is described in the 'Portable Document Format Reference Manual version 1.3' section 4.8 (page 41-53).
iTextSharp.text.pdf.PdfStream.PdfStream | ( | byte[] | bytes | ) |
iTextSharp.text.pdf.PdfStream.PdfStream | ( | Stream | inputStream, |
PdfWriter | writer | ||
) |
Creates an efficient stream. No temporary array is ever created. The InputStream
is totally consumed but is not closed. The general usage is:
InputStream in = ...; PdfStream stream = new PdfStream(in, writer); stream.FlateCompress(); writer.AddToBody(stream); stream.WriteLength(); in.Close();
inputStream | the data to write to this stream |
writer | the PdfWriter for this stream |
|
protected |
Constructs a PdfStream
-object.
void iTextSharp.text.pdf.PdfStream.FlateCompress | ( | ) |
Compresses the stream.
void iTextSharp.text.pdf.PdfStream.FlateCompress | ( | int | compressionLevel | ) |
Compresses the stream.
compressionLevel | the compression level (0 = best speed, 9 = best compression, -1 is default) |
|
protectedvirtual |
|
virtual |
Returns the PDF representation of this PdfDictionary
.
byte
Reimplemented from iTextSharp.text.pdf.PdfDictionary.
Reimplemented in iTextSharp.text.pdf.PRStream.
override String iTextSharp.text.pdf.PdfStream.ToString | ( | ) |
void iTextSharp.text.pdf.PdfStream.WriteContent | ( | Stream | os | ) |
Writes the data content to an Stream
.
os | the destination to write to |
IOException | on error |
void iTextSharp.text.pdf.PdfStream.WriteLength | ( | ) |
Writes the stream length to the PdfWriter
.
This method must be called and can only be called if the contructor PdfStream(InputStream,PdfWriter) is used to create the stream.
IOException | on error |
|
static |
A possible compression level.
|
static |
A possible compression level.
|
protected |
is the stream compressed?
|
protected |
The level of compression.
|
static |
A possible compression level.
|
protected |
|
protected |
|
protected |
|
static |
A possible compression level.
|
protected |
|
protected |
|
protected |
|
get |