blob: 5c67f59a0a79132b60fbca52a95f936e42c0c7a8 (
plain) (
blame)
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
|
#include <qpdf/QPDFObjectHandle.hh>
#include <qpdf/QUtil.hh>
#include <iostream>
#include <stdlib.h>
#include <string.h>
static char const* whoami = 0;
void
usage()
{
std::cerr << "Usage: " << whoami << " infile" << std::endl;
exit(2);
}
int
main(int argc, char* argv[])
{
if ((whoami = strrchr(argv[0], '/')) == NULL) {
whoami = argv[0];
} else {
++whoami;
}
if (argc != 2) {
usage();
}
char const* infilename = argv[1];
for (auto const& line: QUtil::read_lines_from_file(infilename)) {
QPDFObjectHandle str = QPDFObjectHandle::newString(line);
std::cout << str.getUTF8Value() << std::endl;
}
return 0;
}
|