Add PDF writer.
This commit is contained in:
parent
c05b7b6315
commit
9c116b1efd
72 changed files with 1819 additions and 114 deletions
37
src/publishing/pdf/PdfXRefTable.h
Normal file
37
src/publishing/pdf/PdfXRefTable.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct XRefRecord
|
||||
{
|
||||
unsigned mOffsetBytes{0};
|
||||
unsigned mGenerationNumber{0};
|
||||
bool mIsFree{false};
|
||||
};
|
||||
|
||||
struct TableSubSection
|
||||
{
|
||||
unsigned mStartIndex{0};
|
||||
std::vector<XRefRecord> mRecords;
|
||||
};
|
||||
|
||||
class PdfXRefTable
|
||||
{
|
||||
public:
|
||||
|
||||
PdfXRefTable();
|
||||
|
||||
std::string ToString();
|
||||
|
||||
unsigned GetNextOffset();
|
||||
|
||||
void AddRecord(unsigned numBytes, unsigned generation, unsigned isFree);
|
||||
|
||||
unsigned GetNumEntries();
|
||||
|
||||
private:
|
||||
unsigned mLastAddedBytes{0};
|
||||
std::vector<TableSubSection> mSections;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue