Debian Codegraph @

texmf-dist/doc/latex/bxpdfver/README.md

raw
1 BXpdfver Package
2 ================
3
4 LaTeX: To specify the version and compression level of output PDF files
5
6 This package enables users to specify in their sources the following
7 settings on the PDF document to output:
8
9 * PDF version (1.4, 1.5 etc.);
10 * whether or not to compress streams;
11 * whether or not to use object streams.
12 * precision of decimal numbers used in PDF commands
13 * whether or not to preserve (not shorten) PDF destination names
14
15 ### SYSTEM REQUIREMENT
16
17 * TeX format: LaTeX.
18 * TeX engine: pdfTeX, XeTeX, LuaTeX, and any DVI-output engines.
19 * DVI-ware (in DVI mode): dvipdfmx.
20 * Required packages:
21 - atbegshi (when using dvipdfmx driver)
22
23 ### INSTALLATION
24
25 - `*.sty` → $TEXMF/tex/latex/BXpdfver
26
27 ### LICENSE
28
29 This package is distributed under the MIT license.
30
31
32 bxpdfver package
33 ----------------
34
35 ### PACKAGE LOADING
36
37 \usepackage[<option>,...]{bxpdfver}
38
39 The available options are:
40
41 * `1.4`, `1.5`, `1.6`, `1.7` or `2.0`: Sets PDF version.
42 * `nocompress`: Suppresses stream compression.
43 * `compress` (default): Does not suppress stream compression.
44 * `noobjcompress`: Suppresses use of object streams.
45 * `objcompress` (default): Does not suppress use of object streams.
46 * Driver options: As below:
47 + When the new PDF management of LaTeX is activated, the package
48 will automatically switch to “latex-pdf” mode. You need not
49 give driver options.
50 + When using a PDF-output engine, you need not give driver options
51 since the appropriate one is auto-detected.
52 + `dvipdfmx`: Uses dvipdfmx driver.
53 + `nodvidriver`/`disabled`: Disables all functions of the package.
54 NB. This option sets `lenient+` by default.
55 * `ignorepdfmanagement`: Avoids switching to “latex-pdf” mode, even
56 when the new PDF management of LaTeX is activated.
57 * `lenient`: Turns the errors for unsupported features into warnings.
58 * `lenient+`: Suppreseses the errors for unsupported features.
59 * `nolenient`: Negation of `lenient(+)`.
60
61 Note that the options `compress` and `objcompress` mean that this
62 package *does not suppress* a feature. They do not reactivate a feature
63 when it is already suppressed by other means.
64
65 ### USAGE
66
67 * `\setpdfversion{<version>}`: Sets PDF version.
68 Here `<version>` is either one of the following:
69 + `1.4`, `1.5`, `1.6`, `1.7` or `2.0`; the version itself.
70 + the name of a PDF file; the version is set equal to that of
71 the given file.
72 * `\suppresspdfcompression`: Suppresses stream compression.
73 * `\suppresspdfobjcompression`: Suppresses use of object streams.
74 * `\setpdfdecimaldigits{<precision>}`: Sets the precision (the number
75 of digits after decimal points) of the decimal numbers that appear
76 in PDF command sequences.
77 * `\preservepdfdestinations`: Stops shortening the PDF destination
78 names and uses the original names given in the LaTeX documents. This
79 is necessary for cross-document links to work correctly.
80 * `\setpdfpkresolution{<resolution>}`: Sets the resolution (in dpi)
81 of the PK fonts embedded in the PDF file.
82
83 ### NOTE ON DRIVERS
84
85 \ Drivers (engines) pdfTeX dvipdfmx
86 Features / LuaTeX / XeTeX latex-pdf
87 --------------------------- --------- --------- ---------
88 \setpdfversion Yes Yes Yes
89 \suppresspdfcompression Yes Maybe(*2) Yes(*4)
90 \suppresspdfobjcompression Yes Maybe(*2) Yes(*4)
91 \setpdfdecimaldigits Yes Maybe(*2) No
92 \preservepdfdestinations No-op(*1) Maybe(*2) No
93 \setpdfpkresolution Yes Maybe(*3) No
94
95 1. In pdfTeX and LuaTeX, PDF destination names are never shortened;
96 that is, it can be thought as if `\preservepdfdestinations` were
97 always in effect.
98 2. These features are available only when the version of (x)dvipdfmx
99 is 20160307 or later.
100 3. These features are available only when the version of (x)dvipdfmx
101 is 20211016 or later.
102 4. As for '\suppresspdfcompression' and '\suppresspdfobjcompression',
103 when one of them is executed, the other will be activated. It is
104 because l3pdf module does not support activating only one of them.
105
106 On the detection of dvipdfmx version:
107
108 * Shell escape must be accepted (with or without restriction) so that
109 `kpsewhich` and `extractbb` will be allowed to run, because those
110 programs are used in order to detect the dvipdfmx version.
111 * The detection process is slow, so the result is cached in the
112 auxiliary file (`.aux`). When the environment is changed, you need
113 to delete the auxiliary file.
114
115 More notices:
116
117 * If you try to use unavailable features, an error will occur.
118 NB. Option `lenient` turns the errors into warnings, and `lenient+`
119 completely suppresses the errors.
120 * The package recognizes some “unsupported” driver options such as
121 `dvips`; when such drivers are used, use of any feature will cause
122 an error.
123 * The use of `nodvidriver` sets `lenient+` by default; use of any
124 feature will do nothing (nor issue an error).
125
126
127 REVISION HISTORY
128 ----------------
129
130 * Version 0.8b ‹2026/05/19›
131 - Bug fix.
132 - Add driver option `dvisvgm`.
133 * Version 0.8a ‹2025/02/18›
134 - Give up checking dvipdfmx version when the scratch extractbb
135 is used.
136 * Version 0.8 ‹2024/08/03›
137 - Support some features even when the new PDF management of the
138 LaTeX kernel is activated (“latex-pdf” mode).
139 * Version 0.7 ‹2024/07/24›
140 - Support (officialy) `\setpdfpkresolution`.
141 * Version 0.6 ‹2022/04/28›
142 - Added the `lenient+` and `nolenient` options.
143 * Version 0.5a ‹2021/02/14›
144 - Adjustment for the new version of hyperref.
145 * Version 0.5 ‹2020/04/19›
146 - Suuport PDF version value `2.0`.
147 * Version 0.4 ‹2017/02/11›
148 - Add `\setpdfdecimaldigits` and `\preservepdfdestinations`.
149 * Version 0.3 ‹2016/08/11›
150 - Supported all features on dvipdfmx/XeTeX.
151 * Version 0.2b ‹2016/08/10›
152 - Added the `lenient` option.
153 - Supported the newer version of LuaTeX.
154 * Version 0.2a ‹2015/08/05›
155 - Minor fix.
156 * Version 0.2 ‹2014/07/04›
157 - First public version.
158
159 --------------------
160 Takayuki YATO (aka. "ZR")
161 https://github.com/zr-tex8r