typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
pdf_writer.hpp
[詳解]
1#ifndef TYPESET_BACKEND_PDF_WRITER_HPP
2#define TYPESET_BACKEND_PDF_WRITER_HPP
3
4#include <memory>
5#include <string>
6#include <vector>
7
9
24
25class PdfWriter {
26public:
29
30 PdfWriter(const PdfWriter&) = delete;
31 PdfWriter& operator=(const PdfWriter&) = delete;
32
33 void setTitle(std::string title);
34 void setAuthor(std::string author);
35 void setCreator(std::string creator);
36
38 void setEmbedToUnicode(bool embed);
39
41 void setSubsetFonts(bool subset);
42
44 void setCompressStreams(bool compress);
45
49 void addPage(const dl::DisplayList& list);
50
51 size_t pageCount() const;
52
54 std::string build();
55
57 bool save(const std::string& path);
58
60 const std::vector<std::string>& warnings() const;
61
62private:
63 struct Impl;
64 std::unique_ptr<Impl> impl_;
65};
66
67} // namespace typeset::backend
68
69#endif // TYPESET_BACKEND_PDF_WRITER_HPP
bool save(const std::string &path)
ファイルへ書き出す
void setAuthor(std::string author)
void setEmbedToUnicode(bool embed)
ToUnicode CMap を埋め込む(既定 true)。GlyphRun::text が無いランでは埋まらない
std::string build()
PDF のバイト列を組み立てる
void setCompressStreams(bool compress)
ストリームを Flate で圧縮する(既定 true。デバッグ時に false にすると中身が読める)
void setCreator(std::string creator)
const std::vector< std::string > & warnings() const
埋め込めなかったフォント等
void addPage(const dl::DisplayList &list)
ページを追加する(表示リスト 1 本 = 1 ページ)
void setSubsetFonts(bool subset)
フォントを使用グリフだけにサブセット化する(既定 true。失敗したフォントは full embed)
void setTitle(std::string title)
PdfWriter(const PdfWriter &)=delete
PdfWriter & operator=(const PdfWriter &)=delete
backend/pdf_writer — 表示リストを PDF へ
1 ページ分の表示リスト