Codebase list extractpdfmark / 58ca9fc
New upstream version 1.1.0 Dr. Tobias Quathamer 4 years ago
21 changed file(s) with 960 addition(s) and 96 deletion(s). Raw diff Collapse all Expand all
0 Release 1.1.0 (2019-02-11):
1 Add stable poppler-cpp interface for poppler 0.74.0+
2
03 Release 1.0.3 (2018-12-09):
14 Support poppler 0.72.0
25
2727 `-dPDFDontUseFontObjectNum` コマンドラインオプションが必要です。
2828 Ghostscript 9.22 以降は重複フォント削除ができなくなくなったため、
2929 フルセット埋め込みの方法を採ることができません。
30 詳細は https://ghostscript.com/pipermail/gs-devel/2017-September/date.html
31 や http://lists.gnu.org/archive/html/lilypond-devel/2017-09/index.html
32 をご覧ください。
3033 この場合は、次に示すフォントを一切埋め込まない方法を採る必要があります。)
3134
3235 さらに、図の PDF に一切フォントを埋め込まなかった場合、
3336 TeX システムはフォントが欠けたメイン PDF を出力します。
3437 この場合、Ghostscript は必要なフォントを埋め込むことができるので、
3538 必要なディスク容量を劇的に減らすことができるようになります。
39 (注意: Ghostscript 9.26 以降で CID フォントを埋め込みたい場合は、
40 https://bugs.ghostscript.com/show_bug.cgi?id=700367
41 と https://bugs.ghostscript.com/show_bug.cgi?id=700436
42 をご覧ください。)
3643
3744 いずれの方法でも、
3845 Ghostscript へ TeX システムの出力したメイン PDF を入力し、
5360 ## 使い方
5461
5562 $ extractpdfmark TeX出力.pdf > 抽出したPDFmark.ps
56 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFDontUseFontObjectNum \
63 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
64 -dPDFDontUseFontObjectNum -dPrinted=false \
5765 -sOutputFile=最終.pdf TeX出力.pdf 抽出したPDFmark.ps
66
67 (注意: Ghostscript 9.26 以降は `-dPrinted=false`
68 コマンドラインオプションが必要です。詳細は
69 https://bugs.ghostscript.com/show_bug.cgi?id=699830
70 をご覧ください。)
5871
5972 ## バイナリパッケージからのインストール
6073
7285 * Cygwin:
7386 [2017-05](https://sourceware.org/ml/cygwin-announce/2017-05/msg00030.html).
7487
75 ## [ソース tarball](https://github.com/trueroad/extractpdfmark/releases/download/v1.0.3/extractpdfmark-1.0.3.tar.gz) からのインストール
88 ## [ソース tarball](https://github.com/trueroad/extractpdfmark/releases/download/v1.1.0/extractpdfmark-1.1.0.tar.gz) からのインストール
7689
7790 ### 必要なもの
7891
92 Extract PDFmark は poppler にある 2 種類のインタフェースのうち、
93 どちらかを必要とします。
94 Extract PDFmark をビルドする際に、どちらを使用するか選択してください。
95
96 #### poppler-cpp I/F (推奨)
97
98 [poppler](https://poppler.freedesktop.org/) 0.74.0 以降が必要です。
99 Extract PDFmark の configure スクリプトは、
100 pkg-config が poppler-cpp >= 0.74.0 を見つけたら
101 poppler-cpp I/F を選択します。
102
103 configure スクリプトのオプション `--with-poppler=cpp` によって、
104 本 I/F の使用を明示的に指定できます。
105
106 パッケージを使って準備したい場合には、以下が便利でしょう。
107
108 * Debian / Ubuntu
109 + libpoppler-cpp-dev
110 * Fedora
111 + poppler-cpp-devel
112 * Cygwin
113 + libpoppler-cpp-devel
114
115 #### poppler-core I/F
116
79117 [poppler](https://poppler.freedesktop.org/) 0.13.3 以降
80 --enable-xpdf-headers (poppler 0.59.0 まで)
81 または
82 -DENABLE_XPDF_HEADERS=ON (poppler 0.60.0 以降)
83 オプション付き
84 (推奨 poppler 0.48.0 以降)
118 に以下のオプションをつけてビルドしたものが必要です
119 (推奨 poppler 0.48.0 以降)。
120 poppler 0.74.0 以降の場合は poppler-cpp I/F の方を推奨します。
121
122 * --enable-xpdf-headers (poppler 0.59.0 まで)
123 * -DENABLE_XPDF_HEADERS=ON (poppler 0.60.0 から 0.72.0)
124 * -DENABLE_UNSTABLE_API_ABI_HEADERS=ON (poppler 0.73.0 以降)
125
126 Extract PDFmark の configure スクリプトは、
127 pkg-config が poppler-cpp >= 0.74.0 を見つけられず、
128 かつ poppler >= 0.24.4 を見つけたら
129 poppler-core I/F を選択します。
130 本 I/F には private 版と通常版の 2 種類があります。
131 poppler 0.24.4 から 0.47.0 の場合は private 版が選択されます。
132 poppler 0.48.0 以降の場合は通常版が選択されます。
133
134 configure スクリプトのオプション `--with-poppler=core-private` によって、
135 private 版の使用を明示的に指定できます(poppler 0.13.3 以降用)。
136 configure スクリプトのオプション `--with-poppler=core` によって、
137 通常版の使用を明示的に指定できます(poppler 0.48.0 以降用)。
138 poppler 0.13.3 から 0.24.3 を使うには、
139 configure スクリプトのオプション `--with-poppler=core-private` を
140 明示的に指定する必要があります。
141 しかし、これらのバージョンでは Extract PDFmark の `make check`
142 で一部のテストに失敗します。
85143
86144 パッケージを使って準備したい場合には、以下が便利でしょう。
87145
88146 * Debian / Ubuntu
89 + libpoppler-private-dev
90 + libpoppler-dev
147 + libpoppler-private-dev
148 + libpoppler-dev
91149 * Fedora
92 + poppler-devel
150 + poppler-devel
93151 * Cygwin
94 + libpoppler-devel
152 + libpoppler-devel
95153
96154 ### ビルド・インストール方法
97155
140198
141199 ## ライセンス
142200
143 Copyright (C) 2016-2018 Masamichi Hosoda
201 Copyright (C) 2016-2019 Masamichi Hosoda
144202
145203 Extract PDFmark is free software: you can redistribute it and/or modify
146204 it under the terms of the GNU General Public License as published by
2525 commandline option for removing duplicate fonts.
2626 If you use Ghostscript 9.22+, you cannot use this "full set embedding" method
2727 since it cannot remove duplicate fonts.
28 See https://ghostscript.com/pipermail/gs-devel/2017-September/date.html
29 and http://lists.gnu.org/archive/html/lilypond-devel/2017-09/index.html .
2830 In this case, you can use "*not* embedding" method as following.)
2931
3032 Finally,
3234 the TeX system outputs the main PDF file with some fonts missing.
3335 In this case, Ghostscript can embed the necessary fonts.
3436 It can significantly reduce the required disk size.
37 (Note: If you use Ghostscript 9.26+ and want to embed CID fonts,
38 see https://bugs.ghostscript.com/show_bug.cgi?id=700367
39 and https://bugs.ghostscript.com/show_bug.cgi?id=700436 .)
3540
3641 Either way,
3742 when Ghostscript reads the main PDF produced by the TeX system
5358 ## Usage
5459
5560 $ extractpdfmark TeX-System-Outputted.pdf > Extracted-PDFmark.ps
56 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFDontUseFontObjectNum \
61 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
62 -dPDFDontUseFontObjectNum -dPrinted=false \
5763 -sOutputFile=Final.pdf TeX-System-Outputted.pdf Extracted-PDFmark.ps
64
65 (Note: Ghostscript 9.26+ needs `-dPrinted=false` commandline option.
66 See https://bugs.ghostscript.com/show_bug.cgi?id=699830 .)
5867
5968 ## Install from binary package
6069
7281 * Cygwin:
7382 [2017-05](https://sourceware.org/ml/cygwin-announce/2017-05/msg00030.html).
7483
75 ## Install from [source tarball](https://github.com/trueroad/extractpdfmark/releases/download/v1.0.3/extractpdfmark-1.0.3.tar.gz)
84 ## Install from [source tarball](https://github.com/trueroad/extractpdfmark/releases/download/v1.1.0/extractpdfmark-1.1.0.tar.gz)
7685
7786 ### Required
7887
79 [poppler](https://poppler.freedesktop.org/) 0.13.3+
80 with --enable-xpdf-headers (poppler 0.59.0 and before)
81 or -DENABLE_XPDF_HEADERS=ON (poppler 0.60.0 and after) option
82 (recommended poppler 0.48.0+)
88 Extract PDFmark requires one of the two interfaces of poppler.
89 Please choose which to use when building Extrat PDFmark.
90
91 #### poppler-cpp I/F (recommended)
92
93 [poppler](https://poppler.freedesktop.org/) 0.74.0+ is required.
94 Extract PDFmark's configure script selects poppler-cpp I/F
95 if pkg-config finds poppler-cpp >= 0.74.0.
96
97 The configure script's option `--with-poppler=cpp` specifies
98 explicitly using this interface.
8399
84100 When you would like to use packages for preparing the required library,
85101 the following might be convenient.
86102
87103 * Debian / Ubuntu
88 + libpoppler-private-dev
89 + libpoppler-dev
104 + libpoppler-cpp-dev
90105 * Fedora
91 + poppler-devel
106 + poppler-cpp-devel
92107 * Cygwin
93 + libpoppler-devel
108 + libpoppler-cpp-devel
109
110 #### poppler-core I/F
111
112 [poppler](https://poppler.freedesktop.org/) 0.13.3+
113 built with the following option is required
114 (recommended poppler 0.48.0+).
115 If you have poppler 0.74.0+, poppler-cpp I/F is recommended.
116
117 * --enable-xpdf-headers (poppler 0.59.0 and before)
118 * -DENABLE_XPDF_HEADERS=ON (poppler 0.60.0 - 0.72.0)
119 * -DENABLE_UNSTABLE_API_ABI_HEADERS=ON (poppler 0.73.0 and after)
120
121 Extract PDFmark's configure script selects poppler-core I/F
122 if pkg-config does not find poppler-cpp >= 0.74.0
123 and finds poppler >= 0.24.4.
124 There are two versions of this interface, private and normal.
125 For popler 0.24.4 - 0.47.0, private version is selected.
126 For popler 0.48.0+, normal version is selected.
127
128 The configure script's option `--with-poppler=core-private` specifies
129 explicitly using private version (for poppler 0.13.3+).
130 The configure script's option `--with-poppler=core` specifies
131 explicitly using normal version (for poppler 0.48.0+).
132 If you would like to use poppler 0.13.3 - 0.24.3,
133 it is necessary to specify explicitly configure script's option
134 `--with-poppler=core-private`.
135 However, Extract PDFmark with these versions of popler fails
136 some tests in `make check`.
137
138 When you would like to use packages for preparing the required library,
139 the following might be convenient.
140
141 * Debian / Ubuntu
142 + libpoppler-private-dev
143 + libpoppler-dev
144 * Fedora
145 + poppler-devel
146 * Cygwin
147 + libpoppler-devel
94148
95149 ### Build & install
96150
139193
140194 ## Licence
141195
142 Copyright (C) 2016-2018 Masamichi Hosoda
196 Copyright (C) 2016-2019 Masamichi Hosoda
143197
144198 Extract PDFmark is free software: you can redistribute it and/or modify
145199 it under the terms of the GNU General Public License as published by
11 # Process this file with autoconf to produce a configure script.
22
33 AC_PREREQ([2.69])
4 AC_INIT([Extract PDFmark], [1.0.3], , [extractpdfmark],
4 AC_INIT([Extract PDFmark], [1.1.0], , [extractpdfmark],
55 [https://github.com/trueroad/extractpdfmark])
66 AM_INIT_AUTOMAKE([foreign])
77 AC_CONFIG_SRCDIR([src/main.cc])
88 AC_CONFIG_HEADERS([config.h])
99
10 PACKAGE_COPYRIGHT="Copyright (C) 2016-2018 Masamichi Hosoda"
10 PACKAGE_COPYRIGHT="Copyright (C) 2016-2019 Masamichi Hosoda"
1111 PACKAGE_LICENSE="License: GPL3+"
1212
1313 AC_SUBST([PACKAGE_COPYRIGHT])
7575 PKG_PROG_PKG_CONFIG
7676
7777 AC_ARG_WITH([poppler],
78 AS_HELP_STRING([--with-poppler=@<:@auto|glib|core|core-private@:>@],
78 AS_HELP_STRING([--with-poppler=@<:@auto|cpp|glib|core|core-private@:>@],
7979 [Poppler I/F (default: auto)]),
8080 ,
8181 [with_poppler=auto])
8282 AS_CASE(["$with_poppler"],
83 ["cpp"],
84 [AC_MSG_NOTICE([--with-poppler=cpp requires poppler >= 0.74.0])
85 PKG_CHECK_MODULES([POPPLER_CPP], [poppler-cpp >= 0.74.0])],
8386 ["glib"],
84 [AC_MSG_NOTICE([--with-poppler=glib requires poppler >= 0.48.0])
85 PKG_CHECK_MODULES([POPPLER_GLIB], [poppler-glib >= 0.48.0])],
87 [AC_MSG_NOTICE([--with-poppler=glib requires poppler >= 0.74.0])
88 PKG_CHECK_MODULES([POPPLER_GLIB], [poppler-glib >= 0.74.0])],
8689 ["core"],
8790 [AC_MSG_NOTICE([--with-poppler=core requires poppler >= 0.48.0])
8891 PKG_CHECK_MODULES([POPPLER], [poppler >= 0.48.0])],
8992 ["core-private"],
9093 [AC_MSG_NOTICE(
9194 [--with-poppler=core-private requires poppler >= 0.13.3])
92 PKG_CHECK_MODULES([POPPLER], [poppler >= 0.13.3])],
95 PKG_CHECK_MODULES([POPPLER], [poppler >= 0.19.2],,
96 [PKG_CHECK_MODULES([POPPLER], [poppler >= 0.13.3])
97 AC_DEFINE_UNQUOTED([POPPLER_CORE_IF_VERSION],
98 ["`$PKG_CONFIG --modversion poppler`"],
99 [Define poppler version if POPPLER_VERSION cannot be used.])])],
93100 ["auto"],
94101 [AC_MSG_NOTICE([selecting for --with-poppler=auto])
95 AC_MSG_NOTICE([ trying for glib (experiment)])
102 AC_MSG_NOTICE([ trying for cpp (poppler-cpp >= 0.74.0)])
96103 PKG_CHECK_MODULES(
97 [POPPLER_GLIB], [poppler-glib >= 99.99.99],
98 [with_poppler="glib"],
104 [POPPLER_CPP], [poppler-cpp >= 0.74.0],
105 [with_poppler="cpp"],
99106 [AC_MSG_NOTICE([ trying for core (poppler >= 0.48.0)])
100107 PKG_CHECK_MODULES(
101108 [POPPLER], [poppler >= 0.48.0],
102109 [with_poppler="core"],
103110 [AC_MSG_NOTICE(
104 [ trying for core-private (poppler >= 0.13.3)])
105 PKG_CHECK_MODULES([POPPLER], [poppler >= 0.13.3],
111 [ trying for core-private (poppler >= 0.24.4)])
112 PKG_CHECK_MODULES([POPPLER], [poppler >= 0.24.4],
106113 [with_poppler="core-private"])])])]
107114 AC_MSG_NOTICE([use --with-poppler=$with_poppler]),
108115 [AC_MSG_ERROR([unrecognized --with-poppler argument: $with_poppler])])
109116 AS_CASE(["$with_poppler"],
117 ["cpp"],
118 [POPPLER_IF="poppler-cpp"
119 use_library="cpp"],
110120 ["glib"],
111121 [POPPLER_IF="poppler-glib"
112122 use_library="glib"],
121131 [AC_MSG_ERROR([programming error])])
122132 AM_CONDITIONAL([USE_POPPLER_CORE], [test $use_library = core])
123133 AM_CONDITIONAL([USE_POPPLER_GLIB], [test $use_library = glib])
134 AM_CONDITIONAL([USE_POPPLER_CPP], [test $use_library = cpp])
124135 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING (with $POPPLER_IF)"],
125136 [Define to the full name and version, method of this package.])
126137
189200 src/Makefile
190201 src/poppler-core/Makefile
191202 src/poppler-glib/Makefile
203 src/poppler-cpp/Makefile
192204 man/Makefile
193205 test/Makefile])
194206 AC_OUTPUT
00 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
1 # https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
22 # ===========================================================================
33 #
44 # SYNOPSIS
7878 # and this notice are preserved. This file is offered as-is, without any
7979 # warranty.
8080
81 #serial 11
81 #serial 13
8282
8383 dnl #########################################################################
8484 AC_DEFUN([AX_COMPARE_VERSION], [
145145 ],
146146 [.+],[
147147 AC_WARNING(
148 [illegal OP numeric parameter: $2])
148 [invalid OP numeric parameter: $2])
149149 ],[])
150150
151151 # Pad zeros at end of numbers to make same length.
161161 [ne],[
162162 test "x$A" != "x$B" && ax_compare_version=true
163163 ],[
164 AC_WARNING([illegal OP parameter: $2])
164 AC_WARNING([invalid OP parameter: $2])
165165 ])
166166 ])
167167
00 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
1 # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
22 # ===========================================================================
33 #
44 # SYNOPSIS
3232 # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
3333 # Copyright (c) 2015 Paul Norman <penorman@mac.com>
3434 # Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
35 # Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
3536 #
3637 # Copying and distribution of this file, with or without modification, are
3738 # permitted in any medium without royalty provided the copyright notice
3839 # and this notice are preserved. This file is offered as-is, without any
3940 # warranty.
4041
41 #serial 4
42 #serial 10
4243
4344 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
4445 dnl (serial version number 13).
4546
4647 AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
47 m4_if([$1], [11], [],
48 [$1], [14], [],
49 [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
48 m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
49 [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
50 [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
5051 [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
5152 m4_if([$2], [], [],
5253 [$2], [ext], [],
5859 [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
5960 AC_LANG_PUSH([C++])dnl
6061 ac_success=no
61 AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
62 ax_cv_cxx_compile_cxx$1,
63 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
64 [ax_cv_cxx_compile_cxx$1=yes],
65 [ax_cv_cxx_compile_cxx$1=no])])
66 if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
67 ac_success=yes
68 fi
6962
7063 m4_if([$2], [noext], [], [dnl
7164 if test x$ac_success = xno; then
72 for switch in -std=gnu++$1 -std=gnu++0x; do
65 for alternative in ${ax_cxx_compile_alternatives}; do
66 switch="-std=gnu++${alternative}"
7367 cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
7468 AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
7569 $cachevar,
9589 dnl HP's aCC needs +std=c++11 according to:
9690 dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
9791 dnl Cray's crayCC needs "-h std=c++11"
98 for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
99 cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
100 AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
101 $cachevar,
102 [ac_save_CXX="$CXX"
103 CXX="$CXX $switch"
104 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
105 [eval $cachevar=yes],
106 [eval $cachevar=no])
107 CXX="$ac_save_CXX"])
108 if eval test x\$$cachevar = xyes; then
109 CXX="$CXX $switch"
110 if test -n "$CXXCPP" ; then
111 CXXCPP="$CXXCPP $switch"
92 for alternative in ${ax_cxx_compile_alternatives}; do
93 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
94 cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
95 AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
96 $cachevar,
97 [ac_save_CXX="$CXX"
98 CXX="$CXX $switch"
99 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
100 [eval $cachevar=yes],
101 [eval $cachevar=no])
102 CXX="$ac_save_CXX"])
103 if eval test x\$$cachevar = xyes; then
104 CXX="$CXX $switch"
105 if test -n "$CXXCPP" ; then
106 CXXCPP="$CXXCPP $switch"
107 fi
108 ac_success=yes
109 break
112110 fi
113 ac_success=yes
111 done
112 if test x$ac_success = xyes; then
114113 break
115114 fi
116115 done
147146 _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
148147 )
149148
149 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
150 _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
151 _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
152 _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
153 )
150154
151155 dnl Tests for new features in C++11
152156
517521
518522 }
519523
520 namespace test_digit_seperators
524 namespace test_digit_separators
521525 {
522526
523527 constexpr auto ten_million = 100'000'000;
559563 #endif // __cplusplus >= 201402L
560564
561565 ]])
566
567
568 dnl Tests for new features in C++17
569
570 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
571
572 // If the compiler admits that it is not ready for C++17, why torture it?
573 // Hopefully, this will speed up the test.
574
575 #ifndef __cplusplus
576
577 #error "This is not a C++ compiler"
578
579 #elif __cplusplus < 201703L
580
581 #error "This is not a C++17 compiler"
582
583 #else
584
585 #include <initializer_list>
586 #include <utility>
587 #include <type_traits>
588
589 namespace cxx17
590 {
591
592 namespace test_constexpr_lambdas
593 {
594
595 constexpr int foo = [](){return 42;}();
596
597 }
598
599 namespace test::nested_namespace::definitions
600 {
601
602 }
603
604 namespace test_fold_expression
605 {
606
607 template<typename... Args>
608 int multiply(Args... args)
609 {
610 return (args * ... * 1);
611 }
612
613 template<typename... Args>
614 bool all(Args... args)
615 {
616 return (args && ...);
617 }
618
619 }
620
621 namespace test_extended_static_assert
622 {
623
624 static_assert (true);
625
626 }
627
628 namespace test_auto_brace_init_list
629 {
630
631 auto foo = {5};
632 auto bar {5};
633
634 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
635 static_assert(std::is_same<int, decltype(bar)>::value);
636 }
637
638 namespace test_typename_in_template_template_parameter
639 {
640
641 template<template<typename> typename X> struct D;
642
643 }
644
645 namespace test_fallthrough_nodiscard_maybe_unused_attributes
646 {
647
648 int f1()
649 {
650 return 42;
651 }
652
653 [[nodiscard]] int f2()
654 {
655 [[maybe_unused]] auto unused = f1();
656
657 switch (f1())
658 {
659 case 17:
660 f1();
661 [[fallthrough]];
662 case 42:
663 f1();
664 }
665 return f1();
666 }
667
668 }
669
670 namespace test_extended_aggregate_initialization
671 {
672
673 struct base1
674 {
675 int b1, b2 = 42;
676 };
677
678 struct base2
679 {
680 base2() {
681 b3 = 42;
682 }
683 int b3;
684 };
685
686 struct derived : base1, base2
687 {
688 int d;
689 };
690
691 derived d1 {{1, 2}, {}, 4}; // full initialization
692 derived d2 {{}, {}, 4}; // value-initialized bases
693
694 }
695
696 namespace test_general_range_based_for_loop
697 {
698
699 struct iter
700 {
701 int i;
702
703 int& operator* ()
704 {
705 return i;
706 }
707
708 const int& operator* () const
709 {
710 return i;
711 }
712
713 iter& operator++()
714 {
715 ++i;
716 return *this;
717 }
718 };
719
720 struct sentinel
721 {
722 int i;
723 };
724
725 bool operator== (const iter& i, const sentinel& s)
726 {
727 return i.i == s.i;
728 }
729
730 bool operator!= (const iter& i, const sentinel& s)
731 {
732 return !(i == s);
733 }
734
735 struct range
736 {
737 iter begin() const
738 {
739 return {0};
740 }
741
742 sentinel end() const
743 {
744 return {5};
745 }
746 };
747
748 void f()
749 {
750 range r {};
751
752 for (auto i : r)
753 {
754 [[maybe_unused]] auto v = i;
755 }
756 }
757
758 }
759
760 namespace test_lambda_capture_asterisk_this_by_value
761 {
762
763 struct t
764 {
765 int i;
766 int foo()
767 {
768 return [*this]()
769 {
770 return i;
771 }();
772 }
773 };
774
775 }
776
777 namespace test_enum_class_construction
778 {
779
780 enum class byte : unsigned char
781 {};
782
783 byte foo {42};
784
785 }
786
787 namespace test_constexpr_if
788 {
789
790 template <bool cond>
791 int f ()
792 {
793 if constexpr(cond)
794 {
795 return 13;
796 }
797 else
798 {
799 return 42;
800 }
801 }
802
803 }
804
805 namespace test_selection_statement_with_initializer
806 {
807
808 int f()
809 {
810 return 13;
811 }
812
813 int f2()
814 {
815 if (auto i = f(); i > 0)
816 {
817 return 3;
818 }
819
820 switch (auto i = f(); i + 4)
821 {
822 case 17:
823 return 2;
824
825 default:
826 return 1;
827 }
828 }
829
830 }
831
832 namespace test_template_argument_deduction_for_class_templates
833 {
834
835 template <typename T1, typename T2>
836 struct pair
837 {
838 pair (T1 p1, T2 p2)
839 : m1 {p1},
840 m2 {p2}
841 {}
842
843 T1 m1;
844 T2 m2;
845 };
846
847 void f()
848 {
849 [[maybe_unused]] auto p = pair{13, 42u};
850 }
851
852 }
853
854 namespace test_non_type_auto_template_parameters
855 {
856
857 template <auto n>
858 struct B
859 {};
860
861 B<5> b1;
862 B<'a'> b2;
863
864 }
865
866 namespace test_structured_bindings
867 {
868
869 int arr[2] = { 1, 2 };
870 std::pair<int, int> pr = { 1, 2 };
871
872 auto f1() -> int(&)[2]
873 {
874 return arr;
875 }
876
877 auto f2() -> std::pair<int, int>&
878 {
879 return pr;
880 }
881
882 struct S
883 {
884 int x1 : 2;
885 volatile double y1;
886 };
887
888 S f3()
889 {
890 return {};
891 }
892
893 auto [ x1, y1 ] = f1();
894 auto& [ xr1, yr1 ] = f1();
895 auto [ x2, y2 ] = f2();
896 auto& [ xr2, yr2 ] = f2();
897 const auto [ x3, y3 ] = f3();
898
899 }
900
901 namespace test_exception_spec_type_system
902 {
903
904 struct Good {};
905 struct Bad {};
906
907 void g1() noexcept;
908 void g2();
909
910 template<typename T>
911 Bad
912 f(T*, T*);
913
914 template<typename T1, typename T2>
915 Good
916 f(T1*, T2*);
917
918 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
919
920 }
921
922 namespace test_inline_variables
923 {
924
925 template<class T> void f(T)
926 {}
927
928 template<class T> inline T g(T)
929 {
930 return T{};
931 }
932
933 template<> inline void f<>(int)
934 {}
935
936 template<> int g<>(int)
937 {
938 return 5;
939 }
940
941 }
942
943 } // namespace cxx17
944
945 #endif // __cplusplus < 201703L
946
947 ]])
0 # ============================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
2 # ============================================================================
0 # =============================================================================
1 # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
2 # =============================================================================
33 #
44 # SYNOPSIS
55 #
3232 # and this notice are preserved. This file is offered as-is, without any
3333 # warranty.
3434
35 #serial 17
35 #serial 18
3636
3737 AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
3838 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
0 .TH EXTRACTPDFMARK 1 "December 9, 2018"
0 .TH EXTRACTPDFMARK 1 "January 26, 2019"
11 .SH NAME
22 extractpdfmark \- Extract page mode and named destinations as PDFmark from PDF
33 .SH SYNOPSIS
1515 If the small PDF files contain embedded font subsets, the TeX system
1616 includes them as-is in the main PDF.
1717 As a result, several subsets of the same font are embedded in the main PDF.
18 It is not possible to remove the duplicates since they are different subsets.
18 It is not possible to remove the duplicates since the subsets differ.
1919 This vastly increases the size of the main PDF file.
2020 .PP
2121 On the other hand, if the small PDF files contain embedded full font
3535 embedded, the TeX system outputs the main PDF file with some fonts
3636 missing.
3737 In this case, Ghostscript can embed the necessary fonts.
38 It can significantly reduce the required disk size.
38 It can also significantly reduce the required disk size.
3939 .PP
4040 Either way, when Ghostscript reads the main PDF produced by the
4141 TeX system and outputs the final PDF it does not preserve PDF
42 page\-mode and named\-destinations etc.
42 page\-mode and named\-destinations, etc.
4343 As a result, when you open the final PDF, it is not displayed correctly.
4444 Also, remote PDF links will not work.
4545 .PP
46 This program is able to extract page mode and named destinations
46 This program is able to extract the page mode and named destinations
4747 as PDFmark from PDF.
4848 By using this you can get the small PDF files that have preserved them.
4949 .SH EXAMPLE
50 .RS
50 .EX
5151 $ extractpdfmark TeX-System-Outputted.pdf > Extracted-PDFmark.ps
52 .RE
53 .RS
54 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFDontUseFontObjectNum -sOutputFile=Final.pdf TeX-System-Outputted.pdf Extracted-PDFmark.ps
55 .RE
52 $ gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \e
53 -dPDFDontUseFontObjectNum -dPrinted=false \e
54 -sOutputFile=Final.pdf \e
55 TeX-System-Outputted.pdf Extracted-PDFmark.ps
56 .EE
57 .PP
58 (Note: Ghostscript 9.26+ needs
59 .I -dPrinted=false
60 commandline option.)
2424 extractpdfmark_DEPENDENCIES += ./poppler-glib/libextractpdfmark-poppler-glib.a
2525 endif
2626
27 if USE_POPPLER_CPP
28 SUBDIRS += poppler-cpp
29 extractpdfmark_LDADD += -lextractpdfmark-poppler-cpp $(POPPLER_CPP_LIBS)
30 extractpdfmark_LDFLAGS += -L./poppler-cpp
31 extractpdfmark_DEPENDENCIES += ./poppler-cpp/libextractpdfmark-poppler-cpp.a
32 endif
33
2734 if USE_ICONV
2835 extractpdfmark_SOURCES += iconv_wrapper.hh
2936 extractpdfmark_LDADD += $(LIBICONV)
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
3030 std::unique_ptr<output_pdfmark> opdfmark {create_output_pdfmark ()};
3131 std::string output_filename;
3232
33 cmd.add_default ();
33 cmd.add_default_help ();
34 cmd.add_handler ('V', "version",
35 cmdlineparse::arg_mode::no_argument,
36 [&cmd, &opdfmark](const std::string &)->bool
37 {
38 std::cout << cmd.get_version_string ()
39 << std::endl
40 << opdfmark->version ();
41 return false;
42 },
43 " Print version and exit");
3444 cmd.add_string ('o', "output", &output_filename, "",
3545 " Output filename\n"
3646 " (Default: standard output)",
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
3131 virtual bool open (const std::string &pdf_filename) = 0;
3232 virtual std::string pagemode (void) = 0;
3333 virtual std::string destname (void) = 0;
34 virtual std::string version (void) = 0;
3435
3536 void add_options (cmdlineparse::parser *cmd);
3637 void parse_options (void);
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
4949
5050 return true;
5151 }
52
53 std::string poppler_core::version (void)
54 {
55 std::string retval;
56
57 retval = "Compiled with poppler-core";
58 #ifndef HAVE_POPPLER_CORE_IF
59 retval += " private";
60 #endif
61 #ifdef POPPLER_CORE_IF_VERSION
62 retval += " ";
63 retval += POPPLER_CORE_IF_VERSION;
64 #else
65 #ifdef POPPLER_VERSION
66 retval += " ";
67 retval += POPPLER_VERSION;
68 #endif
69 #endif
70 retval += ".\n";
71
72 return retval;
73 }
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
3232 bool open (const std::string &pdf_filename);
3333 std::string pagemode (void);
3434 std::string destname (void);
35 std::string version (void);
3536
3637 private:
3738 std::string build_destname (const std::string &name, LinkDest *link_dest);
0 noinst_LIBRARIES = libextractpdfmark-poppler-cpp.a
1 libextractpdfmark_poppler_cpp_a_SOURCES = poppler-cpp.cc poppler-cpp.hh \
2 pagemode-cpp.cc destname-cpp.cc
3 libextractpdfmark_poppler_cpp_a_CPPFLAGS = -I$(srcdir)/.. \
4 $(POPPLER_CPP_CFLAGS)
0 // This file is part of Extract PDFmark.
1 //
2 // Copyright (C) 2019 Masamichi Hosoda
3 //
4 // Extract PDFmark is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Extract PDFmark is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Extract PDFmark. If not, see <http://www.gnu.org/licenses/>.
16
17 #include "config.h"
18
19 #include "poppler-cpp.hh"
20
21 #include <sstream>
22 #include <string>
23 #include <poppler-destination.h>
24
25 std::string poppler_cpp::walk (const std::string &name,
26 const poppler::destination &dest)
27 {
28 std::stringstream ss;
29
30 switch (dest.type ())
31 {
32 case poppler::destination::type_enum::xyz:
33 ss
34 << "[ /Dest " << encode_name (name)
35 << " /Page " << dest.page_number ()
36 << " /View [/XYZ " << dest.left ()
37 << " " << dest.top ()
38 << " " << dest.zoom ()
39 << "] /DEST pdfmark" << std::endl;
40 break;
41 case poppler::destination::type_enum::fit:
42 ss
43 << "[ /Dest " << encode_name (name)
44 << " /Page " << dest.page_number ()
45 << " /View [/Fit] /DEST pdfmark" << std::endl;
46 break;
47 case poppler::destination::type_enum::fit_h:
48 ss
49 << "[ /Dest " << encode_name (name)
50 << " /Page " << dest.page_number ()
51 << " /View [/FitH " << dest.top ()
52 << "] /DEST pdfmark" << std::endl;
53 break;
54 case poppler::destination::type_enum::fit_v:
55 ss
56 << "[ /Dest " << encode_name (name)
57 << " /Page " << dest.page_number ()
58 << " /View [/FitV " << dest.left ()
59 << "] /DEST pdfmark" << std::endl;
60 break;
61 case poppler::destination::type_enum::fit_r:
62 ss
63 << "[ /Dest " << encode_name (name)
64 << " /Page " << dest.page_number ()
65 << " /View [/FitR " << dest.left ()
66 << " " << dest.bottom ()
67 << " " << dest.right ()
68 << " " << dest.top ()
69 << "] /DEST pdfmark" << std::endl;
70 break;
71 case poppler::destination::type_enum::fit_b:
72 ss
73 << "[ /Dest " << encode_name (name)
74 << " /Page " << dest.page_number ()
75 << " /View [/FitB] /DEST pdfmark" << std::endl;
76 break;
77 case poppler::destination::type_enum::fit_b_h:
78 ss
79 << "[ /Dest " << encode_name (name)
80 << " /Page " << dest. page_number ()
81 << " /View [/FitBH " << dest.top ()
82 << "] /DEST pdfmark" << std::endl;
83 break;
84 case poppler::destination::type_enum::fit_b_v:
85 ss
86 << "[ /Dest " << encode_name (name)
87 << " /Page " << dest.page_number ()
88 << " /View [/FitBV " << dest.left ()
89 << "] /DEST pdfmark" << std::endl;
90 break;
91 case poppler::destination::type_enum::unknown:
92 ss << "% dest type is unknown." << std::endl;
93 break;
94 default:
95 ss << "% dest type error." << std::endl;
96 break;
97 }
98
99 return ss.str ();
100 }
101
102 std::string poppler_cpp::destname (void)
103 {
104 auto map {doc->create_destination_map ()};
105 std::string retval;
106
107 for (const auto& pair: map)
108 retval += walk (pair.first, pair.second);
109
110 return retval;
111 }
0 // This file is part of Extract PDFmark.
1 //
2 // Copyright (C) 2019 Masamichi Hosoda
3 //
4 // Extract PDFmark is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Extract PDFmark is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Extract PDFmark. If not, see <http://www.gnu.org/licenses/>.
16
17 #include "config.h"
18
19 #include "poppler-cpp.hh"
20
21 #include <iostream>
22 #include <sstream>
23 #include <string>
24 #include <poppler-document.h>
25
26 std::string poppler_cpp::pagemode (void)
27 {
28 std::stringstream ss;
29
30 if (!doc)
31 {
32 std::cerr << "% document is null" << std::endl;
33 return "";
34 }
35
36 switch (doc->page_mode ())
37 {
38 case poppler::document::page_mode_enum::use_none:
39 ss << "[ /PageMode /UseNone /DOCVIEW pdfmark" << std::endl;
40 break;
41 case poppler::document::page_mode_enum::use_outlines:
42 ss << "[ /PageMode /UseOutlines /DOCVIEW pdfmark" << std::endl;
43 break;
44 case poppler::document::page_mode_enum::use_thumbs:
45 ss << "[ /PageMode /UseThumbs /DOCVIEW pdfmark" << std::endl;
46 break;
47 case poppler::document::page_mode_enum::fullscreen:
48 ss << "[ /PageMode /FullScreen /DOCVIEW pdfmark" << std::endl;
49 break;
50 case poppler::document::page_mode_enum::use_oc:
51 ss << "% PageMode use_oc" << std::endl;
52 break;
53 case poppler::document::page_mode_enum::use_attach:
54 ss << "% PageMode use_attach" << std::endl;
55 break;
56 default:
57 ss << "% PageMode unknown" << std::endl;
58 break;
59 }
60
61 return ss.str ();
62 }
0 // This file is part of Extract PDFmark.
1 //
2 // Copyright (C) 2019 Masamichi Hosoda
3 //
4 // Extract PDFmark is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Extract PDFmark is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Extract PDFmark. If not, see <http://www.gnu.org/licenses/>.
16
17 #include "config.h"
18
19 #include "poppler-cpp.hh"
20
21 #include <iostream>
22 #include <string>
23 #include <poppler-document.h>
24 #include <poppler-version.h>
25
26 std::unique_ptr<output_pdfmark> create_output_pdfmark (void)
27 {
28 return std::unique_ptr<output_pdfmark> (new poppler_cpp ());
29 }
30
31 bool poppler_cpp::open (const std::string &pdf_filename)
32 {
33 doc = poppler::document::load_from_file (pdf_filename);
34
35 if (!doc)
36 {
37 std::cerr << "poppler::document::load_from_file failed: "
38 << pdf_filename;
39 return false;
40 }
41 return true;
42 }
43
44 std::string poppler_cpp::version (void)
45 {
46 std::string retval;
47
48 retval = "Compiled with poppler-cpp ";
49 retval += POPPLER_VERSION;
50 retval += ".\nRunning with poppler-cpp ";
51 retval += poppler::version_string ();
52 retval += ".\n";
53
54 return retval;
55 }
0 // This file is part of Extract PDFmark.
1 //
2 // Copyright (C) 2019 Masamichi Hosoda
3 //
4 // Extract PDFmark is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Extract PDFmark is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Extract PDFmark. If not, see <http://www.gnu.org/licenses/>.
16
17 #ifndef INCLUDE_GUARD_POPPLER_CPP_HH
18 #define INCLUDE_GUARD_POPPLER_CPP_HH
19
20 #include <string>
21 #include <poppler-destination.h>
22 #include <poppler-document.h>
23
24 #include "output-pdfmark.hh"
25
26 class poppler_cpp : public output_pdfmark
27 {
28 public:
29 bool open (const std::string &pdf_filename);
30 std::string pagemode (void);
31 std::string destname (void);
32 std::string version (void);
33
34 private:
35 std::string walk (const std::string &name,
36 const poppler::destination &dest);
37
38 poppler::document *doc = nullptr;
39 };
40
41 #endif // INCLUDE_GUARD_POPPLER_CPP_HH
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
2727 gpointer value,
2828 gpointer user_data)
2929 {
30 GBytes *name = static_cast<GBytes*> (key);
30 gchar *name = static_cast<char*> (key);
3131 PopplerDest *dest = static_cast<PopplerDest*> (value);
3232 poppler_glib *pg = static_cast<poppler_glib*> (user_data);
3333
3434 return pg->walk (name, dest);
3535 }
3636
37 bool poppler_glib::walk (GBytes *name, PopplerDest *dest)
37 bool poppler_glib::walk (gchar *name, PopplerDest *dest)
3838 {
39 std::string n {static_cast<const char*> (g_bytes_get_data (name, nullptr)),
40 static_cast<std::string::size_type> (g_bytes_get_size (name))};
39 gsize len;
40 void *data {poppler_named_dest_to_bytestring (name, &len)};
41 std::string n {static_cast<char*> (data),
42 static_cast<std::string::size_type> (len)};
4143 std::stringstream ss;
4244 if (dest)
4345 {
122124 std::string poppler_glib::destname (void)
123125 {
124126 std::unique_ptr<GTree, decltype (&g_tree_destroy)>
125 tree {poppler_document_build_dests_tree (document), g_tree_destroy};
127 tree {poppler_document_create_dests_tree (document), g_tree_destroy};
126128 dests.clear ();
127129
128130 g_tree_foreach (tree.get (), walk_entry, this);
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
2020
2121 #include <iostream>
2222 #include <memory>
23 #include <sstream>
2324 #include <string>
2425 #include <poppler.h>
2526
8788 }
8889 return true;
8990 }
91
92 std::string poppler_glib::version (void)
93 {
94 std::stringstream ss;
95
96 ss << "Compiled with poppler-glib "
97 << POPPLER_MAJOR_VERSION << "."
98 << POPPLER_MINOR_VERSION << "."
99 << POPPLER_MICRO_VERSION
100 << ", glib "
101 << GLIB_MAJOR_VERSION << "."
102 << GLIB_MINOR_VERSION << "."
103 << GLIB_MICRO_VERSION
104 << ".\nRunning with poppler-glib "
105 << poppler_get_version ()
106 << ", glib "
107 << glib_major_version << "."
108 << glib_minor_version << "."
109 << glib_micro_version
110 << ".\n";
111
112 return ss.str ();
113 }
00 // This file is part of Extract PDFmark.
11 //
2 // Copyright (C) 2016 Masamichi Hosoda
2 // Copyright (C) 2016, 2019 Masamichi Hosoda
33 //
44 // Extract PDFmark is free software: you can redistribute it and/or modify
55 // it under the terms of the GNU General Public License as published by
2828 bool open (const std::string &pdf_filename);
2929 std::string pagemode (void);
3030 std::string destname (void);
31 std::string version (void);
3132
3233 ~poppler_glib ()
3334 {
3839 static gboolean walk_entry (gpointer key,
3940 gpointer value,
4041 gpointer user_data);
41 bool walk (GBytes *name, PopplerDest *dest);
42 bool walk (gchar *name, PopplerDest *dest);
4243
4344 PopplerDocument *document = nullptr;
4445 std::string dests;