| 1 |
%% $Id: dvipdfmx.cfg 73862 2025-02-10 22:29:43Z karl $ |
| 2 |
%% dvipdfmx.cfg for dvipdfmx and xdvipdfmx. (Public domain.) |
| 3 |
%% (maintained in TeX Live /source/ tree, copied to Master.) |
| 4 |
%% |
| 5 |
%% PDF Version Setting |
| 6 |
%% |
| 7 |
%% PDF (minor) version stamp to use in output file. |
| 8 |
%% This also implies maximal version of PDF file allowed to be included. |
| 9 |
%% Dvipdfmx does not support 1.0, 1.1, 1.2 since TrueType font embedded |
| 10 |
%% as CIDFontType2 requires at least version 1.3. Transparent imaging |
| 11 |
%% model requires version 1.4. So if you want soft-masking support for |
| 12 |
%% PNG image with alpha channels, you should set version to 4 or higher. |
| 13 |
%% PDF 1.5 enables object compression. |
| 14 |
%% In 2025, we switched to PDF 1.7 by default, since that's now |
| 15 |
%% recommended by the PDF Association. |
| 16 |
%% https://tug.org/pipermail/tex-live/2025-February/051090.html |
| 17 |
|
| 18 |
V 7 |
| 19 |
|
| 20 |
%% Dvipdfmx Compatibility Flags |
| 21 |
%% |
| 22 |
%% 0x0002 Use semi-transparent filling for tpic shading command, |
| 23 |
%% instead of opaque gray color. (requires PDF 1.4) |
| 24 |
%% 0x0004 Treat all CIDFont as fixed-pitch font. |
| 25 |
%% This is only for backward compatibility. Don't use that. |
| 26 |
%% 0x0008 Do not replace duplicate fontmap entries. |
| 27 |
%% Dvipdfm's (not 'x') behaviour. |
| 28 |
%% 0x0010 Do not optimize PDF destinations. Use this if you want to |
| 29 |
%% refer from other files to destinations in the current file. |
| 30 |
|
| 31 |
%C 0x0000 |
| 32 |
|
| 33 |
%% PDF Document Settings |
| 34 |
%% |
| 35 |
%% Papersize Option: |
| 36 |
%% |
| 37 |
%% p papersize-spec |
| 38 |
%% |
| 39 |
%% papersize-spec is 'paper-format' or length-pair, e.g., 'a4', 'letter', |
| 40 |
%% '20cm,30cm'. Recognized unit is 'cm', 'mm', 'bp', 'pt', 'in'. |
| 41 |
|
| 42 |
p a4 |
| 43 |
|
| 44 |
%% Annotation Box Margin: |
| 45 |
%% |
| 46 |
%% g length |
| 47 |
%% |
| 48 |
%% Add margin to annotation rectangle created via various \specials. Many |
| 49 |
%% TeX macro packages set the annotation bounding box equal to the TeX box |
| 50 |
%% that encloses the material. That's not always what you want. |
| 51 |
%% Annotations created by pdf:bannot/pdf:eannot is also affected. |
| 52 |
|
| 53 |
%g 0 |
| 54 |
|
| 55 |
%% Bookmark Open Level: |
| 56 |
%% |
| 57 |
%% O integer |
| 58 |
%% |
| 59 |
%% Mark bookmark (outline) item as initial state 'open' if the depth |
| 60 |
%% of that item (from root node) is less than or equal to the integer |
| 61 |
%% specified with this option. |
| 62 |
|
| 63 |
O 0 |
| 64 |
|
| 65 |
%% PDF Security (Encryption) Setting |
| 66 |
%% |
| 67 |
%% Those options won't take effects unless you use flag 'S'. |
| 68 |
%% |
| 69 |
%% Key bits for PDF encryption (40 - 128) |
| 70 |
|
| 71 |
K 40 |
| 72 |
|
| 73 |
%% Permission flag for PDF encryption: Revision will be 3 if the key size |
| 74 |
%% is greater than 40 bits. |
| 75 |
%% |
| 76 |
%% 0x0004 (Revision 2) Print the document. |
| 77 |
%% (Revision 3) Print the document (possibly not at the highest quality |
| 78 |
%% level, depending on whether bit 12[0x0800] is also set). |
| 79 |
%% 0x0008 Modify the contents of the document by operations other than those |
| 80 |
%% controlled by bits 6[0x0020], 9[0x0100], and 11[0x0400]. |
| 81 |
%% 0x0010 (Revision 2) Copy or otherwise extract text and graphics from the |
| 82 |
%% document, including extracting text and graphics (in support of |
| 83 |
%% accessibility to disabled users or for other purposes). |
| 84 |
%% (Revision 3) Copy or otherwise extract text and grphics from the |
| 85 |
%% document by operations other than that controlled by bit 10[0x0200]. |
| 86 |
%% 0x0020 Add or modify text annotations, fill in interactive form fields, |
| 87 |
%% and, if bit 4[0x0008] is also set, create or modify interactive |
| 88 |
%% form fields (including signature fields). |
| 89 |
%% |
| 90 |
%% (Revision 3 only) |
| 91 |
%% 0x0100 Fill in existing interactive form fields (including signature |
| 92 |
%% fields), even if bit 6 is clear. |
| 93 |
%% 0x0200 Extract text and graphics (in support of accessibility to disabled |
| 94 |
%% users or for other purposes). |
| 95 |
%% 0x0400 Assemble the document (insert, rotate, or delete pages and create |
| 96 |
%% bookmarks or thumbnail images), even if bit 4 is clear. |
| 97 |
%% 0x0800 Print the document to a representation from which a faithful digital |
| 98 |
%% copy of the PDF content could be generated. When this bit is clear |
| 99 |
%% (and bit 3 is set), printing is limited to a low-level representation |
| 100 |
%% of the appearance, possibly of degraded quality. |
| 101 |
|
| 102 |
P 0x003C |
| 103 |
|
| 104 |
%% Image Handler |
| 105 |
%% |
| 106 |
%% With 'D' option dvipdfmx may invoke shell command via system() |
| 107 |
%% function call. |
| 108 |
%% |
| 109 |
%% Command-line template for a-to-b conversion: |
| 110 |
%% |
| 111 |
%% Supported target format ('b') is currently PDF. |
| 112 |
%% Percent sign '%' is special character: |
| 113 |
%% |
| 114 |
%% %i Input file name (FQPN). Name of file to be converted to PDF. |
| 115 |
%% %o Output file name (FQPN). Temporary file to store conversion |
| 116 |
%% result. Removed after inclusion is finished. (regardless of |
| 117 |
%% success or failure) |
| 118 |
%% %b The "base" name of the input file, e.g., "foo" instead of |
| 119 |
%% "foo.eps". |
| 120 |
%% %v The PDF version to be converted to, e.g. "1.4" for PDF 1.4. |
| 121 |
%% %% Replaced with single '%'. |
| 122 |
|
| 123 |
%% Ghostscript (PS-to-PDF and PDF-to-PDF): |
| 124 |
%% |
| 125 |
%% In TeX Live, we use the rungs wrapper instead of ps2pdf, in order to |
| 126 |
%% use our own supplied gs on Windows. |
| 127 |
%% |
| 128 |
%% Without the -dEPSCROP below, an eps file with negative llx/lly (as |
| 129 |
%% created by MetaPost, for example) fails. In 2013, changes were made |
| 130 |
%% to the drivers xetex.def, dvipdfmx.def, etc., to handle non-zero |
| 131 |
%% llx/lly so we could use it. The file epsf-dvipdfmx.tex is available |
| 132 |
%% from CTAN/TL/etc. to support plain's epsf.tex. |
| 133 |
%% |
| 134 |
%% In 2014, we discovered that -sPAPERSIZE=a0 was needed to support |
| 135 |
%% pstricks under xetex; otherwise, images were cropped (see thread at |
| 136 |
%% https://tug.org/pipermail/xetex/2014-November/025664.html). |
| 137 |
%% Happily, it seems that using both -dEPSCROP and -sPAPERSIZE=a0 |
| 138 |
%% simultaneously works ok. So that's we do below. |
| 139 |
%% |
| 140 |
%% By default, gs encodes all images contained in a PS file using |
| 141 |
%% the lossy DCT (i.e., JPEG) filter. This can lead to inferior |
| 142 |
%% result (see the discussion at http://electron.mit.edu/~gsteele/pdf/). |
| 143 |
%% The "-dAutoFilterXXXImages" and "-dXXXImageFilter" options used |
| 144 |
%% below force all images to be encoded with the lossless Flate (zlib, |
| 145 |
%% same as PNG) filter. Note that if the PS file already contains DCT |
| 146 |
%% encoded images (which is possible in PS level 2), then these images |
| 147 |
%% will also be re-encoded using Flate. To turn the conversion off, |
| 148 |
%% remove the options mentioned above. |
| 149 |
%% |
| •150 |
%% The -- forces the remaining argument(s) to be considered as |
| 151 |
%% filenames, just in case someone manages to insert a Ghostscript option. |
| 152 |
%% Although it's traditional to end gs invocations with "-c quit", |
| 153 |
%% in this context it is not necessary, and we don't want that with the --, |
| 154 |
%% since we wouldn't want to randomly find input files named "-c" or |
| 155 |
%% "quit". |
| 156 |
%% |
| 157 |
%% Incidentally, more than one dvipdfmx.cfg may exist. |
| 158 |
%% You can find the one that is active by running: |
| 159 |
%% kpsewhich -progname=dvipdfmx -format=othertext dvipdfmx.cfg |
| •160 |
%% (add -all to see all files found) |
| 161 |
%% and control which one is found by setting DVIPDFMXINPUTS. |
| 162 |
%% |
| •163 |
%% Incidentally 2, the syntax of this value is a C string: "...". |
| 164 |
%% The embedded '...' quotes are interpreted by dvipdfmx, not a shell. |
| 165 |
%% |
| 166 |
D "rungs -q -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='%o' -- '%i'" |
| 167 |
%% If you change the above rungs invocation, also change dvipdfmx-unsafe.cfg! |
| 168 |
|
| 169 |
% other random ps converters people have experimented with. |
| 170 |
%D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'" |
| 171 |
%D "/usr/texbin/epstopdf '%i' -o '%o'" |
| 172 |
%D "/usr/bin/pstopdf '%i' -o '%o'" |
| 173 |
% |
| 174 |
%% Frank Siegert's PStill: |
| 175 |
%D "/usr/local/bin/pstill -c -o '%o' '%i'" |
| 176 |
% |
| 177 |
%% Batik + Fop (SVG-to-PDF): |
| 178 |
%% If you want both PS and SVG, you need to write a script or program |
| 179 |
%% that selectively invokes converters. |
| 180 |
%D "java -classpath classpaths -jar /path/to/batik-rasterizer.jar -m application/pdf -d '%o' '%i'" |
| 181 |
% |
| 182 |
%% There are no way to directly know suggested size of (raster) images. |
| 183 |
%% You may want to use %b here, since you can try reading the ebb file |
| 184 |
%% to see what is natural (physical) size of images. |
| 185 |
%D "ras2pdf -r 300x300 -b '%b.bb' -o '%o' '%i'" |
| 186 |
% |
| 187 |
%% ImageMagick: |
| 188 |
%% Easiest way to support various file formats. |
| 189 |
%D "convert '%i' 'epdf:%o'" |
| 190 |
|
| 191 |
%% Other Options |
| 192 |
%% |
| 193 |
%% DPI for PK font creation |
| 194 |
|
| 195 |
%r 600 |
| 196 |
|
| 197 |
%% Set number of fractional digit kept for various numbers in PDF page |
| 198 |
%% content output. By setting this to 2 (default), dvipdfmx rounds |
| 199 |
%% real numbers at 2nd fractional (decimal) digit; e.g., "3.14159" is |
| 200 |
%% written as "3.14". Increasing this to more than 2 isn't meaningful |
| 201 |
%% for old Acrobat due to implementation limit of Acrobat. |
| 202 |
%% Length 0.01 in unscaled coordinate system amount to width of 1 pixel |
| 203 |
%% in 7200ppi display. |
| 204 |
|
| 205 |
%d 5 |
| 206 |
|
| 207 |
%% Image cache life in hours |
| 208 |
%% 0 means erase all old images and leave new images |
| 209 |
%% -1 means erase all old images and also erase new images |
| 210 |
%% -2 means ignore image cache |
| 211 |
%I -2 |
| 212 |
|
| 213 |
%% Font Map Files |
| 214 |
%% |
| 215 |
%% teTeX 2.x and TeX Live using updmap (pdfTeX format) |
| 216 |
f pdftex.map |
| 217 |
|
| 218 |
%% teTeX 2.x and TeX Live using updmap (DVIPDFM format) |
| 219 |
%f dvipdfm.map |
| 220 |
|
| 221 |
%% teTeX 2.x and TeX Live using updmap (DVIPS format) |
| 222 |
%% MiKTeX 2.2 and 2.3 |
| 223 |
%f psfonts.map |
| 224 |
|
| 225 |
%% Put additional fontmap files here (usually for Type0 fonts) |
| 226 |
%f cid-x.map |
| 227 |
|
| 228 |
% the following file is generated by updmap(-sys) from the |
| 229 |
% KanjiMap entries in the updmap.cfg file. |
| 230 |
f kanjix.map |
| 231 |
% minimal example for Chinese and Korean users |
| 232 |
% improvements please to [email protected] |
| 233 |
f ckx.map |
| 234 |
|
| 235 |
%% Include other config files |
| 236 |
%i <filename> |