-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelpers.hh
More file actions
42 lines (32 loc) · 1.32 KB
/
Helpers.hh
File metadata and controls
42 lines (32 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef HELPERS_HH
#define HELPERS_HH
#include <qpdf/QPDFObjectHandle.hh>
#include <qpdf/QPDF.hh>
#include "TextBuilder.hh"
namespace Helpers
{
std::vector<std::string> break_into_words(std::string const& text);
int get_lines(TextBuilder& tb, double max_width,
std::vector<std::string> const& words);
int wrap_text(TextBuilder& tb, double max_width, std::string const& text,
bool move_to_top, double hmargin, double vmargin,
QPDFObjectHandle::Rectangle* rect = nullptr);
QPDFObjectHandle make_link_annotation(
QPDF& q, std::string const& url,
QPDFObjectHandle::Rectangle const& rect);
QPDFObjectHandle make_text_field(
QPDF& q, std::string const& text_object,
QPDFObjectHandle resources,
std::string const& da, int flags,
QPDFObjectHandle::Rectangle const& appearance_bbox,
QPDFObjectHandle::Rectangle const& field_rect,
std::string const& field_name,
std::string const& value);
QPDFObjectHandle make_page(QPDF& q, QPDFObjectHandle resources);
QPDFObjectHandle make_attachment_annotation(
QPDF& q, QPDFObjectHandle fs, QPDFObjectHandle ap,
QPDFObjectHandle::Rectangle const& rect,
std::string const& name);
void load_resources(QPDF&);
}
#endif // HELPERS_HH