1 | %define name extractpdfmark |
---|
2 | %define version 1.0.2 |
---|
3 | %define release 3%{?_dist_release} |
---|
4 | |
---|
5 | Summary: Extract page mode and named destinations as PDFmark from PDF |
---|
6 | Summary(ja): PDFからページモードやリンクの宛先名を抽出しPDFmarkとして保存する |
---|
7 | Name: %{name} |
---|
8 | Version: %{version} |
---|
9 | Release: %{release} |
---|
10 | |
---|
11 | Source0: https://github.com/trueroad/extractpdfmark/releases/download/v%{version}/%{name}-%{version}.tar.gz |
---|
12 | |
---|
13 | License: GPLv3+ |
---|
14 | Group: Applications/Publishing |
---|
15 | URL: http://poppler.freedesktop.org/%{name}-%{version}.tar.xz |
---|
16 | |
---|
17 | BuildRequires: poppler-devel |
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
19 | |
---|
20 | Vendor: Project Vine |
---|
21 | Distribution: Vine Linux |
---|
22 | |
---|
23 | |
---|
24 | %description |
---|
25 | When you create a PDF document using a TeX system, |
---|
26 | you may include many small PDF files in the main PDF file. |
---|
27 | It is common for each of those files to use the same fonts. |
---|
28 | |
---|
29 | If the small PDF files contain embedded font subsets, |
---|
30 | the TeX system includes them as-is in the main PDF. |
---|
31 | As a result, several subsets of the same font are embedded |
---|
32 | in the main PDF. It is not possible to remove the duplicates |
---|
33 | since they are different subsets. This vastly increases |
---|
34 | the size of the main PDF file. |
---|
35 | |
---|
36 | On the other hand, if the small PDF files contain embedded |
---|
37 | full font sets, the TeX system also includes all of them |
---|
38 | in the main PDF. This time, the main PDF contains duplicates |
---|
39 | of the same full sets of fonts. |
---|
40 | Therefore, Ghostscript can remove the duplicates. |
---|
41 | This may considerably reduce the main PDF-file's size. |
---|
42 | #' |
---|
43 | |
---|
44 | Finally, if the small PDF files contain some fonts |
---|
45 | that are not embedded, the TeX system outputs the main PDF file |
---|
46 | with some fonts missing. In this case, Ghostscript can embed |
---|
47 | the necessary fonts. It can significantly reduce the required |
---|
48 | disk size. |
---|
49 | |
---|
50 | Either way, when Ghostscript reads the main PDF produced |
---|
51 | by the TeX system and outputs the final PDF it does not |
---|
52 | preserve PDF page-mode and named-destinations etc. |
---|
53 | As a result, when you open the final PDF, it is not displayed |
---|
54 | correctly. Also, remote PDF links will not work. |
---|
55 | |
---|
56 | This program is able to extract page mode and named destinations |
---|
57 | as PDFmark from PDF. By using this you can get the small PDF |
---|
58 | files that have preserved them. |
---|
59 | |
---|
60 | %description -l ja |
---|
61 | TeX のようなシステムを使って PDF のドキュメントを作る場合、 |
---|
62 | 図としてたくさんの小さな PDF を用意して、メインの PDF に |
---|
63 | 貼り付けるようなことが行われます。このとき、図の PDF では |
---|
64 | 同じフォントを使っていることが多いと思います。 |
---|
65 | |
---|
66 | 図の PDF にフォントのサブセットが埋め込まれていた場合、 |
---|
67 | TeX システムはそのフォントをそのままメインの PDF に埋め込みます。 |
---|
68 | 結果として、メイン PDF には重複した同じフォントの異なる |
---|
69 | サブセットが埋め込まれます。サブセットが異なるため重複した |
---|
70 | フォントを削除することはできません。 |
---|
71 | よってメイン PDF のファイルサイズは、かなり大きくなってしまいます。 |
---|
72 | |
---|
73 | 一方、図の PDF にフォントをフルセットで埋め込んだ場合、 |
---|
74 | TeX システムはフルセットのフォントをメインの PDF へ埋め込みます。 |
---|
75 | メイン PDF にはたくさんの重複したフォントが埋め込まれますが、 |
---|
76 | すべて同じフルセットのフォントです。そのため、Ghostscript |
---|
77 | を使えば重複を削除することができ、これによってメイン PDF |
---|
78 | のサイズを低減することができます。 |
---|
79 | |
---|
80 | さらに、図の PDF に一切フォントを埋め込まなかった場合、 |
---|
81 | TeX システムはフォントが欠けたメイン PDF を出力します。 |
---|
82 | この場合、Ghostscript は必要なフォントを埋め込むことができるので、 |
---|
83 | 必要なディスク容量を劇的に減らすことができるようになります。 |
---|
84 | |
---|
85 | いずれの方法でも、Ghostscript へ TeX システムの出力した |
---|
86 | メイン PDF を入力し、最終的な PDF を出力することになります。 |
---|
87 | しかし、残念ながら、この処理で Ghostscript は PDF のページモードや |
---|
88 | リンクの宛先名を残してくれません。そのため、最終的な PDF は |
---|
89 | 意図したとおりに開かれなかったり、リモートからのリンクが機能 |
---|
90 | しなくなったりしてしまいます。 |
---|
91 | |
---|
92 | Extract PDFmark は PDF からページモードやリンクの宛先名を抽出し、 |
---|
93 | PDFmark として保存することができます。このツールを使うと、 |
---|
94 | ページモードやリンク先名を残したまま、サイズの小さい PDF を得る |
---|
95 | ことができます。 |
---|
96 | |
---|
97 | |
---|
98 | %prep |
---|
99 | %setup -q |
---|
100 | |
---|
101 | %build |
---|
102 | %configure |
---|
103 | %{__make} %{?_smp_mflags} |
---|
104 | |
---|
105 | %install |
---|
106 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
107 | %makeinstall |
---|
108 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name} |
---|
109 | |
---|
110 | %clean |
---|
111 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
112 | |
---|
113 | |
---|
114 | %files |
---|
115 | %defattr(-,root,root) |
---|
116 | %doc COPYING README.ja.md README.md |
---|
117 | %{_bindir}/ |
---|
118 | %{_mandir}/man1/ |
---|
119 | |
---|
120 | %changelog |
---|
121 | * Wed Jan 03 2018 Toshiaki Ara <ara_t@384.jp> 1.0.2-3 |
---|
122 | - rebuild under poppler-0.61.1 |
---|
123 | |
---|
124 | * Thu Nov 30 2017 Toshiaki Ara <ara_t@384.jp> 1.0.2-2 |
---|
125 | - correct Group |
---|
126 | |
---|
127 | * Thu Nov 30 2017 Toshiaki Ara <ara_t@384.jp> 1.0.2-1 |
---|
128 | - initial build for Vine Linux |
---|
129 | |
---|