stuff-from-scratch/src/publishing/pdf/PdfPage.h
2022-12-02 08:44:04 +00:00

42 lines
770 B
C++

#pragma once
#include "PdfObject.h"
#include "PdfStream.h"
#include "PdfXRefTable.h"
class PdfPageTree;
class PdfProcSet : public PdfObject
{
public:
std::string toString(PdfXRefTable* xRefTable) override;
};
class PdfFont : public PdfObject
{
public:
std::string toString(PdfXRefTable* xRefTable) override;
void updateDictionary();
};
class PdfPage : public PdfObject
{
public:
PdfPage(PdfPageTree* parent);
unsigned indexObjects(unsigned count);
std::string toString(PdfXRefTable* xRefTable) override;
void updateDictionary();
private:
unsigned mWidth{612};
unsigned mHeight{792};
std::unique_ptr<PdfStream> mContent;
std::unique_ptr<PdfFont> mDefaultFont;
PdfObjectPtr mProcSet;
PdfPageTree* mParent;
};