|
PoDoFo 1.1.0
|
A PDF stream can be appended to any PdfObject and can contain arbitrary data. More...
#include <PdfObjectStream.h>
Public Member Functions | |
| PdfObjectOutputStream | GetOutputStreamRaw (bool append=false) |
| PdfObjectOutputStream | GetOutputStreamRaw (const PdfFilterList &filters, bool append=false) |
| PdfObjectOutputStream | GetOutputStream (bool append=false) |
| PdfObjectOutputStream | GetOutputStream (const PdfFilterList &filters, bool append=false) |
| PdfObjectInputStream | GetInputStream (bool raw=false) const |
| void | SetData (const bufferview &buffer, bool raw=false) |
| Set the data contents copying from a buffer All data will be Flate-encoded. | |
| void | SetData (const bufferview &buffer, const PdfFilterList &filters, bool raw=false) |
| Set the data contents copying from a buffer. | |
| void | SetData (InputStream &stream, bool raw=false) |
| Set the data contents reading from an InputStream All data will be Flate-encoded. | |
| void | SetData (InputStream &stream, const PdfFilterList &filters, bool raw=false) |
| Set the data contents reading from an InputStream. | |
| charbuff | GetCopy (bool raw=false) const |
| Get an unwrapped copy of the stream, unpacking non media filters. | |
| charbuff | GetCopySafe () const |
| Get an unwrapped copy of the stream, unpacking non media filters. | |
| void | CopyTo (charbuff &buffer, bool raw=false) const |
| Unwrap the stream to the given buffer, unpacking non media filters. | |
| void | CopyToSafe (charbuff &buffer) const |
| Unwrap the stream to the given buffer, unpacking non media filters. | |
| void | CopyTo (OutputStream &stream, bool raw=false) const |
| Unwrap the stream and write it to the given stream, unpacking non media filters. | |
| void | CopyToSafe (OutputStream &stream) const |
| Unwrap the stream and write it to the given stream, unpacking non media filters. | |
| void | Unwrap () |
| Unpack non media filters. | |
| void | Clear () |
| Clear the stream and reset filters. | |
| size_t | GetLength () const |
| Get the stream's length with all filters applied (e.g. | |
| const PdfFilterList & | GetFilters () |
| PdfObjectStream & | operator= (const PdfObjectStream &rhs) |
| Create a copy of a PdfObjectStream object. | |
| PdfObjectStream & | operator= (PdfObjectStream &&rhs) noexcept |
| const PdfObjectStreamProvider & | GetProvider () const |
| const PdfObject & | GetParent () const |
| PdfObject & | GetParent () |
Friends | |
| class | PdfObject |
| class | PdfObjectInputStream |
| class | PdfObjectOutputStream |
A PDF stream can be appended to any PdfObject and can contain arbitrary data.
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.
Unwrap the stream to the given buffer, unpacking non media filters.
| void PdfObjectStream::CopyTo | ( | OutputStream & | stream, |
| bool | raw = false |
||
| ) | const |
Unwrap the stream and write it to the given stream, unpacking non media filters.
Get an unwrapped copy of the stream, unpacking non media filters.
| size_t PdfObjectStream::GetLength | ( | ) | const |
Get the stream's length with all filters applied (e.g.
if the stream is Flate-compressed, the length of the compressed data stream).
| PdfObjectStream & PdfObjectStream::operator= | ( | const PdfObjectStream & | rhs | ) |
Create a copy of a PdfObjectStream object.
| rhs | the object to clone |
| void PdfObjectStream::SetData | ( | const bufferview & | buffer, |
| bool | raw = false |
||
| ) |
Set the data contents copying from a buffer All data will be Flate-encoded.
| buffer | buffer containing the stream data |
| raw | if true the data will be set without applying any filter, clearing the filters list unconditionally |
| void PdfObjectStream::SetData | ( | const bufferview & | buffer, |
| const PdfFilterList & | filters, | ||
| bool | raw = false |
||
| ) |
Set the data contents copying from a buffer.
Use PdfFilterFactory::CreateFilterList() if you want to use the contents of the stream dictionary's existing filter key.
| buffer | buffer containing the stream data |
| filters | a list of filters to use when appending data |
| raw | if true the data will be set without applying any filter, setting the supplied filters list unconditionally |
| void PdfObjectStream::SetData | ( | InputStream & | stream, |
| bool | raw = false |
||
| ) |
Set the data contents reading from an InputStream All data will be Flate-encoded.
| stream | read stream contents from this InputStream |
| raw | if true the data will be set without applying any filter, clearing the filters list unconditionally |
| void PdfObjectStream::SetData | ( | InputStream & | stream, |
| const PdfFilterList & | filters, | ||
| bool | raw = false |
||
| ) |
Set the data contents reading from an InputStream.
Use PdfFilterFactory::CreateFilterList() if you want to use the contents of the stream dictionary's existing filter key.
| stream | read stream contents from this InputStream |
| filters | a list of filters to use when appending data |
| raw | if true the data will be set without applying any filter, setting the supplied filters list unconditionally |