#include <PdfFileStream.h>
Public Member Functions | |
PdfFileStream (PdfObject *pParent, PdfOutputDevice *pDevice) | |
void | SetEncrypted (PdfEncrypt *pEncrypt) |
virtual void | Write (PdfOutputDevice *pDevice, PdfEncrypt *pEncrypt=NULL) |
virtual void | GetCopy (char **pBuffer, long *lLen) const |
virtual unsigned long | GetLength () const |
Protected Member Functions | |
virtual const char * | GetInternalBuffer () const |
virtual unsigned long | GetInternalBufferSize () const |
virtual void | BeginAppendImpl (const TVecFilters &vecFilters) |
virtual void | AppendImpl (const char *pszString, size_t lLen) |
virtual void | EndAppendImpl () |
Most of the time it will contain either drawing commands to draw onto a page or binary data like a font or an image.
A PdfFileStream writes all data directly to an output device without keeping it in memory. PdfFileStream is used automatically when creating PDF files using PdfImmediateWriter.
PdfMemoryStream
PoDoFo::PdfFileStream::PdfFileStream | ( | PdfObject * | pParent, | |
PdfOutputDevice * | pDevice | |||
) |
Create a new PdfFileStream 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.
pParent | parent object | |
pDevice | output device |
void PoDoFo::PdfFileStream::AppendImpl | ( | const char * | pszString, | |
size_t | lLen | |||
) | [protected, virtual] |
Append a binary buffer to the current stream contents.
pszString | a buffer | |
lLen | length of the buffer |
Implements PoDoFo::PdfStream.
void PoDoFo::PdfFileStream::BeginAppendImpl | ( | const TVecFilters & | vecFilters | ) | [protected, virtual] |
Begin appending data to this stream. Clears the current stream contents.
vecFilters | use this filters to encode any data written to the stream. |
Implements PoDoFo::PdfStream.
void PoDoFo::PdfFileStream::EndAppendImpl | ( | ) | [protected, virtual] |
Finish appending data to the stream
Implements PoDoFo::PdfStream.
void PoDoFo::PdfFileStream::GetCopy | ( | char ** | pBuffer, | |
long * | lLen | |||
) | const [virtual] |
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.
This is currently not implemented for PdfFileStreams and will raise an ePdfError_InternalLogic exception
pBuffer | pointer to the buffer | |
lLen | pointer to the buffer length |
Implements PoDoFo::PdfStream.
const char * PoDoFo::PdfFileStream::GetInternalBuffer | ( | ) | const [inline, protected, virtual] |
Required for the GetFilteredCopy implementation
Implements PoDoFo::PdfStream.
unsigned long PoDoFo::PdfFileStream::GetInternalBufferSize | ( | ) | const [inline, protected, virtual] |
Required for the GetFilteredCopy implementation
Implements PoDoFo::PdfStream.
unsigned long PoDoFo::PdfFileStream::GetLength | ( | ) | const [inline, virtual] |
Get the streams length with all filters applied (eg the compressed length of a Flate compressed stream).
Implements PoDoFo::PdfStream.
void PoDoFo::PdfFileStream::SetEncrypted | ( | PdfEncrypt * | pEncrypt | ) |
Set an encryption object which is used to encrypt all data written to this stream.
pEncrypt | an encryption object or NULL if no encryption should be done |
void PoDoFo::PdfFileStream::Write | ( | PdfOutputDevice * | pDevice, | |
PdfEncrypt * | pEncrypt = NULL | |||
) | [virtual] |
Write the stream to an output device
pDevice | write to this outputdevice. | |
pEncrypt | encrypt stream data using this object |
Implements PoDoFo::PdfStream.