#include <PdfStream.h>
Inheritance diagram for PoDoFo::PdfStream:
Public Member Functions | |
PdfStream (PdfObject *pParent) | |
virtual void | Write (PdfOutputDevice *pDevice, PdfEncrypt *pEncrypt=NULL)=0 |
void | Set (const char *szBuffer, pdf_long lLen, const TVecFilters &vecFilters) |
void | Set (const char *szBuffer, pdf_long lLen) |
void | Set (PdfInputStream *pStream) |
void | Set (PdfInputStream *pStream, const TVecFilters &vecFilters) |
void | Set (const char *pszString) |
void | SetRawData (PdfInputStream *pStream, pdf_long lLen=-1) |
void | BeginAppend (bool bClearExisting=true) |
void | BeginAppend (const TVecFilters &vecFilters, bool bClearExisting=true, bool bDeleteFilters=true) |
void | Append (const char *pszString, size_t lLen) |
void | Append (const char *pszString) |
void | Append (const std::string &sString) |
void | EndAppend () |
bool | IsAppending () const |
virtual pdf_long | GetLength () const =0 |
virtual void | GetCopy (char **pBuffer, pdf_long *lLen) const =0 |
virtual void | GetCopy (PdfOutputStream *pStream) const =0 |
void | GetFilteredCopy (char **pBuffer, pdf_long *lLen) const |
void | GetFilteredCopy (PdfOutputStream *pStream) const |
const PdfStream & | operator= (const PdfStream &rhs) |
Protected Member Functions | |
virtual const char * | GetInternalBuffer () const =0 |
virtual pdf_long | GetInternalBufferSize () const =0 |
virtual void | BeginAppendImpl (const TVecFilters &vecFilters)=0 |
virtual void | AppendImpl (const char *pszString, size_t lLen)=0 |
virtual void | EndAppendImpl ()=0 |
Most of the time it will contain either drawing commands to draw onto a page or binary data like a font or an image.
You have to use a concrete implementation of a stream, which can be retrieved from a StreamFactory.
PdfMemoryStream
|
Create a new PdfStream object which has a parent PdfObject. The stream will be deleted along with the parent. This constructor will be called by PdfObject::Stream() for you.
|
|
Append to the current stream contents. Make sure BeginAppend has been called before.
|
|
Append a null-terminated string to the current stream contents. Make sure BeginAppend has been called before.
|
|
Append a binary buffer to the current stream contents. Make sure BeginAppend has been called before.
|
|
Append a binary buffer to the current stream contents.
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Start appending data to this stream. This method has to be called before any of the append methods. Use PdfFilterFactory::CreateFilterList if you want to use the contents of the stream dictionary's existing filter key.
|
|
Start appending data to this stream. This method has to be called before any of the append methods. All appended data will be flate decoded!
|
|
Begin appending data to this stream. Clears the current stream contents. Use PdfFilterFactory::CreateFilterList if you want to use the contents of the stream dictionary's existing filter key.
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Finish appending data to this stream. BeginAppend() has to be called before this method.
|
|
Finish appending data to the stream Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Get a copy of a the stream and write it to a PdfOutputStream
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Get a malloced buffer of the current stream. No filters will be applied to the buffer, so if the stream is Flate compressed the compressed copy will be returned. The caller has to free() the buffer.
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Get a filtered copy of a the stream and write it to a PdfOutputStream
|
|
Get a malloced buffer of the current stream which has been filtered by all filters as specified in the dictionary's /Filter key. For example, if the stream is Flate compressed, the buffer returned from this method will have been decompressed. The caller has to free() the buffer.
|
|
Required for the GetFilteredCopy implementation
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Required for the GetFilteredCopy implementation
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
Get the stream's length with all filters applied (eg if the stream is Flate compressed, the length of the compressed data stream).
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |
|
|
|
Create a copy of a PdfStream object
Reimplemented in PoDoFo::PdfMemStream. |
|
Set a null-terminated char* buffer as the streams contents. The string will be copied into a newly allocated buffer.
|
|
Set a binary buffer whose contents are read from a PdfInputStream Use PdfFilterFactory::CreateFilterList if you want to use the contents of the stream dictionary's existing filter key.
|
|
Set a binary buffer whose contents are read from a PdfInputStream All data will be flate encoded.
|
|
Set a binary buffer as stream data. All data will be flate encoded.
|
|
Set a binary buffer as stream data. Use PdfFilterFactory::CreateFilterList if you want to use the contents of the stream dictionary's existing filter key.
|
|
Sets raw data for this filter which is read from an input stream. This method does neither encode nor decode the read data. The filters of the object are not modified and the data is expected to be encoded as stated by the /Filters key in the streams object.
|
|
Write the stream to an output device
Implemented in PoDoFo::PdfFileStream, and PoDoFo::PdfMemStream. |