public class ElementWriter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
e_overlay
The Constant e_overlay.
|
static int |
e_replacement
The Constant e_replacement.
|
static int |
e_underlay
Enumeration describing the placement of the element written to a page.
|
| Constructor and Description |
|---|
ElementWriter()
Instantiates a new element writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin(Doc doc)
Begin writing an Element sequence to a new stream.
|
void |
begin(Doc doc,
boolean compress)
Begin writing an Element sequence to a new stream.
|
void |
begin(Obj streamobj_to_update)
Begin writing an Element sequence to a stream.
|
void |
begin(Obj streamobj_to_update,
boolean compress)
Begin writing an Element sequence to a stream.
|
void |
begin(Page page)
Begin writing to the given page.
|
void |
begin(Page page,
int write_mode)
Begin writing to the given page.
|
void |
begin(Page page,
int write_mode,
boolean page_coord_sys)
Begin writing to the given page.
|
void |
begin(Page page,
int write_mode,
boolean page_coord_sys,
boolean compress)
Begin writing to the given page.
|
protected void |
clearList()
Clear list.
|
void |
destroy()
Frees the native memory of the object.
|
Obj |
end()
Finish writing to a page.
|
protected void |
finalize() |
void |
flush()
The Flush method flushes all pending Element writing operations.
|
void |
writeBuffer(byte[] data)
Writes an arbitrary buffer to the content stream.
|
void |
writeElement(Element element)
Writes the Element to the content stream.
|
void |
writePlacedElement(Element element)
A utility function that surrounds the given Element with a graphics state
Save/Restore Element (i.e.
|
void |
writeString(java.lang.String str)
Writes an arbitrary string to the content stream.
|
public static final int e_underlay
public static final int e_overlay
public static final int e_replacement
public ElementWriter()
throws PDFNetException
PDFNetExceptionpublic void destroy()
throws PDFNetException
PDFNetExceptionpublic void begin(Page page) throws PDFNetException
page - The page to write content.PDFNetExceptionpublic void begin(Page page, int write_mode) throws PDFNetException
page - The page to write content.write_mode - the write modePDFNetExceptionpublic void begin(Page page, int write_mode, boolean page_coord_sys) throws PDFNetException
page - The page to write content.write_mode - the write modepage_coord_sys - An optional flag used to select the target coordinate system
if true (default), the coordinates are relative to the lower-left corner of the page,
otherwise the coordinates are defined in PDF user coordinate system (which may,
or may not coincide with the page coordinates).PDFNetExceptionpublic void begin(Page page, int write_mode, boolean page_coord_sys, boolean compress) throws PDFNetException
page - The page to write content.write_mode - the write modepage_coord_sys - An optional flag used to select the target coordinate system
if true (default), the coordinates are relative to the lower-left corner of the page,
otherwise the coordinates are defined in PDF user coordinate system (which may,
or may not coincide with the page coordinates).compress - whether the page content stream should be compressed. This
may be useful for debugging content streams. Also some applications need
to do a clear text search on strings in the PDF files. By default, all
content streams are compressed.PDFNetExceptionpublic void begin(Obj streamobj_to_update) throws PDFNetException
streamobj_to_update - A low-level SDF stream object that will contain
the new stream. Old stream inside that object will be discarded.PDFNetExceptionpublic void begin(Obj streamobj_to_update, boolean compress) throws PDFNetException
streamobj_to_update - A low-level SDF stream object that will contain
the new stream. Old stream inside that object will be discarded.compress - whether the content stream should be compressed. This may
be useful for debugging content streams. Also some applications need to do
a clear text search on strings in the PDF filePDFNetExceptionpublic void begin(Doc doc) throws PDFNetException
doc - - A low-level SDF/Cos document that will contain the new stream. You can
access low-level document using PDFDoc::GetSDFDoc() or Obj::GetDoc() methods.PDFNetExceptionpublic void begin(Doc doc, boolean compress) throws PDFNetException
doc - the document that will contain the new stream.compress - whether the page content stream should be compressed. This
may be useful for debugging content streams. Also some applications need
to do a clear text search on strings in the PDF files.PDFNetExceptionpublic Obj end() throws PDFNetException
PDFNetExceptionpublic void writeElement(Element element) throws PDFNetException
element - the element to be written to the content streamPDFNetExceptionpublic void writePlacedElement(Element element) throws PDFNetException
element - the elementPDFNetExceptionpublic void flush()
throws PDFNetException
PDFNetExceptionpublic void writeBuffer(byte[] data)
throws PDFNetException
data - the dataPDFNetExceptionpublic void writeString(java.lang.String str)
throws PDFNetException
str - the strPDFNetExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected void clearList()
throws PDFNetException
PDFNetException