|
pdfmm 0.9.20
|
#include <PdfXRef.h>
Public Member Functions | |
| void | AddInUseObject (const PdfReference &ref, nullable< uint64_t > offset) |
| void | AddFreeObject (const PdfReference &ref) |
| void | Write (PdfOutputDevice &device) |
| uint32_t | GetSize () const |
| void | SetFirstEmptyBlock () |
| virtual bool | ShouldSkipWrite (const PdfReference &ref) |
| virtual uint64_t | GetOffset () const |
Protected Member Functions | |
| virtual void | BeginWrite (PdfOutputDevice &device) |
| virtual void | WriteSubSection (PdfOutputDevice &device, uint32_t first, uint32_t count) |
| virtual void | WriteXRefEntry (PdfOutputDevice &device, const PdfReference &ref, const PdfXRefEntry &entry) |
| virtual void | EndWriteImpl (PdfOutputDevice &device) |
Creates an XRef table.
This is an internal class of pdfmm used by PdfWriter.
| void PdfXRef::AddFreeObject | ( | const PdfReference & | ref | ) |
Add a free object to the XRef table.
| 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. |
| void PdfXRef::AddInUseObject | ( | const PdfReference & | ref, |
| nullable< uint64_t > | offset | ||
| ) |
Add an used object to the XRef table. The object should have been written to an output device already.
| 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 |
|
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.
| device | the output device to which the XRef table should be written. |
Reimplemented in mm::PdfXRefStream.
|
protectedvirtual |
Sub classes can overload this method to finish a XRef table.
| device | the output device to which the XRef table should be written. |
Reimplemented in mm::PdfXRefStream.
|
inlinevirtual |
Reimplemented in mm::PdfXRefStream.
| uint32_t PdfXRef::GetSize | ( | ) | const |
Get the size of the XRef table. I.e. the highest object number + 1.
| void PdfXRef::SetFirstEmptyBlock | ( | ) |
Mark as empty block.
|
virtual |
Should skip writing for this object
| ref | reference of the object |
Reimplemented in mm::PdfXRefStream.
| void PdfXRef::Write | ( | PdfOutputDevice & | device | ) |
Write the XRef table to an output device.
| device | an output device (usually a PDF file) |
|
protectedvirtual |
Begin an XRef subsection. All following calls of WriteXRefEntry belong to this XRef subsection.
| 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 mm::PdfXRefStream.
|
protectedvirtual |
Write a single entry to the XRef table
| 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 mm::PdfXRefStream.