#include <PdfXRef.h>
|
| virtual void | BeginWrite (OutputStreamDevice &device, charbuff &buffer) |
| virtual void | WriteSubSection (OutputStreamDevice &device, uint32_t first, uint32_t count, charbuff &buffer) |
| virtual void | WriteXRefEntry (OutputStreamDevice &device, const PdfReference &ref, const PdfXRefEntry &entry, charbuff &buffer) |
| virtual void | EndWriteImpl (OutputStreamDevice &device, charbuff &buffer) |
Creates an XRef table.
This is an internal class of PoDoFo used by PdfWriter.
◆ AddFreeObject()
Add a free object to the XRef table.
- Parameters
-
| ref | reference of this object |
| offset | the offset where on the device the object was written |
| bUsed | specifies whether this is an used or free object. Set this value to true for all normal objects and to false for free object references. |
◆ AddInUseObject()
Add an used object to the XRef table. The object should have been written to an output device already.
- Parameters
-
| ref | reference of this object |
| offset | the offset where on the device the object was written if std::nullopt, the object will be accounted for trailer's /Size but not written in the entries list |
◆ BeginWrite()
| void PdfXRef::BeginWrite |
( |
OutputStreamDevice & | device, |
|
|
charbuff & | buffer ) |
|
protectedvirtual |
Called at the start of writing the XRef table. This method can be overwritten in subclasses to write a general header for the XRef table.
- Parameters
-
| device | the output device to which the XRef table should be written. |
Reimplemented in PoDoFo::PdfXRefStream.
◆ EndWriteImpl()
| void PdfXRef::EndWriteImpl |
( |
OutputStreamDevice & | device, |
|
|
charbuff & | buffer ) |
|
protectedvirtual |
Sub classes can overload this method to finish a XRef table.
- Parameters
-
| device | the output device to which the XRef table should be written. |
Reimplemented in PoDoFo::PdfXRefStream.
◆ GetOffset()
| virtual uint64_t PoDoFo::PdfXRef::GetOffset |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- the offset in the file at which the XRef table starts after it was written
Reimplemented in PoDoFo::PdfXRefStream.
◆ GetSize()
| uint32_t PdfXRef::GetSize |
( |
| ) |
const |
Get the size of the XRef table. I.e. the highest object number + 1.
- Returns
- the size of the xref table
◆ SetFirstEmptyBlock()
| void PdfXRef::SetFirstEmptyBlock |
( |
| ) |
|
◆ ShouldSkipWrite()
Should skip writing for this object
- Parameters
-
| ref | reference of the object |
Reimplemented in PoDoFo::PdfXRefStream.
◆ Write()
| void PdfXRef::Write |
( |
OutputStreamDevice & | device, |
|
|
charbuff & | buffer ) |
Write the XRef table to an output device.
- Parameters
-
| device | an output device (usually a PDF file) |
◆ WriteSubSection()
| void PdfXRef::WriteSubSection |
( |
OutputStreamDevice & | device, |
|
|
uint32_t | first, |
|
|
uint32_t | count, |
|
|
charbuff & | buffer ) |
|
protectedvirtual |
Begin an XRef subsection. All following calls of WriteXRefEntry belong to this XRef subsection.
- Parameters
-
| device | the output device to which the XRef table should be written. |
| first | the object number of the first object in this subsection |
| count | the number of entries in this subsection |
Reimplemented in PoDoFo::PdfXRefStream.
◆ WriteXRefEntry()
| void PdfXRef::WriteXRefEntry |
( |
OutputStreamDevice & | device, |
|
|
const PdfReference & | ref, |
|
|
const PdfXRefEntry & | entry, |
|
|
charbuff & | buffer ) |
|
protectedvirtual |
Write a single entry to the XRef table
- Parameters
-
| device | the output device to which the XRef table should be written. |
| ref | the reference of object of the entry |
| entry | the XRefEntry of this object |
Reimplemented in PoDoFo::PdfXRefStream.