#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() override;
};

class PdfPage : public PdfObject
{
public:
    PdfPage(PdfPageTree* parent);

    unsigned indexObjects(unsigned count) override;

    std::string toString(PdfXRefTable* xRefTable) override;

    void updateDictionary() override;

private:
    unsigned mWidth{612};
    unsigned mHeight{792};
    std::unique_ptr<PdfStream> mContent;
    std::unique_ptr<PdfFont> mDefaultFont;
    PdfObjectPtr mProcSet;
    PdfPageTree* mParent;

};
