stuff-from-scratch/src/publishing/pdf/PdfPage.h

43 lines
797 B
C
Raw Normal View History

2022-01-01 18:46:31 +00:00
#pragma once
#include "PdfObject.h"
#include "PdfStream.h"
#include "PdfXRefTable.h"
class PdfPageTree;
class PdfProcSet : public PdfObject
{
public:
2022-12-02 08:44:04 +00:00
std::string toString(PdfXRefTable* xRefTable) override;
2022-01-01 18:46:31 +00:00
};
class PdfFont : public PdfObject
{
public:
2022-12-02 08:44:04 +00:00
std::string toString(PdfXRefTable* xRefTable) override;
2022-01-01 18:46:31 +00:00
2023-01-23 11:32:18 +00:00
void updateDictionary() override;
2022-01-01 18:46:31 +00:00
};
class PdfPage : public PdfObject
{
public:
2022-12-02 08:44:04 +00:00
PdfPage(PdfPageTree* parent);
2022-01-01 18:46:31 +00:00
2023-01-23 11:32:18 +00:00
unsigned indexObjects(unsigned count) override;
2022-01-01 18:46:31 +00:00
2022-12-02 08:44:04 +00:00
std::string toString(PdfXRefTable* xRefTable) override;
2022-01-01 18:46:31 +00:00
2023-01-23 11:32:18 +00:00
void updateDictionary() override;
2022-01-01 18:46:31 +00:00
private:
unsigned mWidth{612};
unsigned mHeight{792};
std::unique_ptr<PdfStream> mContent;
std::unique_ptr<PdfFont> mDefaultFont;
PdfObjectPtr mProcSet;
PdfPageTree* mParent;
};