THE DVIPDFMx PROJECT
The DVIPDFMx (formerly dvipdfm-cjk) project provides an eXtended version of the dvipdfm, a DVI to PDF translator developed by Mark A. Wicks. The primary goal of this project is to support multi-byte character encodings and large character sets for East Asian languages by CID-keyed font technology. The secondary goal is to support as many features as pdfTeX developed by Han The Thanh. This project is a combined work of the dvipdfm-jpn project by Shunsaku Hirata and its modified one, dvipdfm-kor, by Jin-Hwan Cho.
What's New
From ChangeLog:
- Type 1 -> Type 1C conversion.
- CFF/OpenType support is now available for single-byte font.
- A little enhancement to PDF inclusion.
- Unicode support for single-byte font (TrueType): Unicode TrueType font without post table version 2.0, like Palatino Linotype, is (partially) supported, automatic creation and embedding of ToUnicode CMap is available for TrueType font, glyph name uniXXXX supported for Unicode TrueType...
- Fixed a bug on the algorithm converting arc to cubic bezier curves in arc() (tpic.c), which is reported by Werner Lemberg.
- PNG transparency support is available in CVS.
- A bug related to CFF embedding have been fixed.
- Changed the default font map files for teTeX 2.x as suggested by Haruhiko Okumura.
- Add a missing line including pdfparse.h in dvi.c, which is reported by Akira Kakuto.
- Fixed a bug on the paper size checking routine in dvi_paper_size() (dvi.c), which is reported by Haruhiko Ok umura.
- Fixed a bug on the kerning routine in dev_set_string() (pdfdev.c), which is reported by Edward G.J. Lee.
- Revived the source specials "papersize" and "landscape" only in the first page of the DVI file.
- Changed to embed images only one time.
- A faked font name was used for TrueType fonts without any PS font name as suggested by Hin-Tak Leung
- Built-in codes (originally from libgcrypt-1.1.42) was used for PDF encryption instead of the OpenSSL library as suggested by Thomas Esser.
- Fixed a critical bug reported from Haruhiko Okumura, which occurs on the version compiled with gcc 3.x, but not with gcc 2.x.
- New feature, hexadecimal Unicode, was implemented, which is suggested by iNOUE Koich! and Akira Kakuto.
Obtaining DVIPDFMx
The DVIPDFMx project does not offer pre-compiled binary packages. See, section "Binary Distributions" below for obtaining binary packages for each platforms.
Source Code
You can download current snapshot from http://project.ktug.or.kr/dvipdfmx/snapshot/.
An anonymous access to the CVS Repository is also available. You can update your local copy of DVIPDFMx source code with the following commands:
cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot login cvs -d:pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot co dvipdfmx
When prompted for a password for anonymous
, simply press the Enter
key.
To compile DVIPDFMx, you need, at least, the kpathsea library. Using kpathsea library
version heigher than 3.3 is recommended. Please specify kpathsea installation directory via
configure
option:
--with-kpathsea=DIR
In addition to that, the zlib library is required for compression
support. Both zlib and libpng library is required for PNG
image inclusion.
You can use options for configure
to specify the location of include header files and
libraries:
--with-png=DIR --with-zlib=DIR
After successful installation, please edit DVIPDFMx configuration file and fontmap file
installed in $TEXMF/dvipdfm/config
.
Binary Distributions
FreeBSD and Linux
DVIPDFMx is available from the FreeBSD ports/package collection (print/dvipdfmx).
Microsoft Windows
-
A TeX implementation by Akira Kakuto based on Web2c. It includes pTeX and many localized version of TeX related programs especially useful for Japanese typesetting.
-
An up-to-date implementation of TeX and related programs for MS-Windows by Christian Schenk. (Cabinet binary packages: miktex-dvipdfmx.cab (20030313) for MiKTeX 2.2 and miktex-dvipdfmx.cab (20031110) for MiKTeX 2.3).
MacOS X
See, pTeX package for MacOSX (in Japanese) for Japanese environment.
Features
Most features/enhancement added to dvipdfm in DVIPDFMx is related to multi-byte encoding/font support, especially CJK.
Compatible TeX Variants
In addtion to TeX/LaTeX, the following TeX variants and TeX/LaTeX packages are supported:
-
Full support available including vertical writing extension, but the graphics package does not work well in vertical writing mode. You have to edit file '
tex/latex/graphics/dvipdfm.def
' to make scaling and rotation function properly in vertical writing mode. -
DVIPDFMx requires
.sfd
files to remap multiple single-byte fonts back to original double-byte fonts. -
See below.
-
Same as the CJK-LaTeX support, requires
.sfd
files. -
Support for NTT jTeX is not tested well. If you want CID-Keyed font support, you must install virtual-font package vf-n2bk.tar.gz distributed by Akira Kakuto.
-
I don't know much about this.
The ConTeXt driver file spec-dpx.tex for DVIPDFMx is contained in the beta vertion of ConTeXt since December 4, 2002. To generate a DVI file to be converted to PDF by DVIPDFMx, either use the following command line:
texexec --output=dvipdfmx foo
or give the following command in the top of your ConTeXt file.
\setupoutput [dvipdfmx]
Font/Encoding Support
The following font formats are supported (in addition to the original dvipdfm):
- OpenTypeAlways subsetted when embedding font.
- TrueTypeTrueType fonts can be embedded either as a CIDFontType 2 CID-Keyed font or a TrueType font. Embedded fonts are always subsetted.
For CID-Keyed fonts, dvipdfmx uses CIDs to identify each glyphs internally, hence if you want to embed TrueType font as CIDFontType 2 CID-Keyed font, you must install CID-to-code mapping CMap file for each TrueType fonts. (see, README for details)
As a convenience, DVIPDFMx recognizes following fonts:
MHei-Medium
(CNS1), MSung-Light
(CNS1),
STSong-Light
(GB1),
HeiseiMin-W3
(Japan1), HeiseiKakuGo-W5
(Japan1),
Ryumin-Light
(Japan1), GothicBBB-Medium
(Japan1),
HYGoThic-Medium
(Korea1), HYSMyeongJo-Medium
(Korea1).
Those fonts can be used in the fontmap file without having font itself.
Optional stylistic variant, ,Bold
, ,Italic
, and
,BoldItalic
available for some PDF viewers are also supported,
but this feature is highly dependent of PDF viewers.
DVIPDFMx have a build-in code-conversion engine which relies on external CMap PostScript resource files to create code-conversion table for multi-byte character code conversion. Adobe Glyph List (plain text, 74.6K bytes) file is used for conversion from PostScript glypn names to the corresponding Unicode values. Installation of this file is recommended if you want to embed TrueType font as a single-byte font. ToUnicode CMap support (available for OpenType and TrueType) also uses this file. See, README for details.
You can tell DVIPDFMx to do conversion of PDF strings appears inside the DVI
\special{ pdf: }
command. (contributed by Akira Kakuto)
For this feature a new PDF special command "pdf:tounicode
"
was implemented. After this command, every characters in PDF outlines (bookmarks), annotations, and document
information (conversion is not applied to file
specification and text inside the
content
command, etc.) will be converted according to the given CMap file.
To do that, put one of the following code in the preamble of your LaTeX document source:
\AtBeginDvi{\special{pdf:tounicode GBK-EUC-UCS2}} % GBK -> Unicode \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}} % EUC-JP -> Unicode \AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}} % SJIS -> Unicode \AtBeginDvi{\special{pdf:tounicode KSCms-UHC-UCS2}} % EUC-KR -> Unicode
In this examples, PDF strings are converted from CJK encodings to UCS-2. This feature is useful for including CJK characters in PDF outlines, annotations, and document information.
Typographic Features
OpenType Layout Featrue table is not fully supported.
Vertical variants of glyphs are automatically selected accroding to the
description of the vert
/vert2
feature GSUB
subtables
in the case of OpenType font with TrueType outline.
This substitution will be applied all fonts that uses -V
(WMode 2) CMaps.
PDF Encryption
Encrypted PDF files can be generated if the -S
option is given.
Key bits (40-128 bits) and Permission flag are adjusted in the configuration file
dvipdfmx.cfg
or with command line options -K
(Key bits) and
-P
(Permission flag).
Graphics Support
Changes from the original dvipdfm:
- Full PNG transparency support and indexed-color image support (without converting to RGB).
- CJK support for
MetaPost
PostScript inclusion.
Examples
Some of example PDF presented in this section contains embedded CJK TrueType fonts. So, you need PDF viewers that support PDF-1.3. For examples, AFPL Ghostscript 7.x or 8.x, GNU Ghstscript 6.x or 7.x, Adobe Acrobat Reader 4, 5, or 6, or Xpdf 2.x.
ConTeXt
Most of examples are contributed by Lei Wang.
-
GBK encoding was used in the source. TrueType font embedded, 182K bytes. By Lei Wang.
-
GBK encoding is used in the source. TrueType font embedded in PDF, 43.9K bytes. By Lei Wang.
-
GBK encoding is used in the source. TrueType font embedded in PDF, 35.7K bytes. By Lei Wang.
-
GBK encoding is used in the source. TrueType font embedded in PDF, 64.8K bytes. By Lei Wang.
-
PostScript Type1 font embedded in PDF.
Omega/Lambda
-
The Gentium TrueType font is embedded as a CID-keyed font. Lambda source file and OFMs for Gentium: lambda-example1.zip. It requires antomega, hyperref, and color packages.
-
Pseudo-vertical typesetting using Omega and dvipdfmx. You must have Japanese font installed to view the above example PDF file (no embedded font). Lambda source: lambda-example2.zip. It requires Omega-J available from Akira Kakuto's W32TeX or omega-japanese package by Vincent Zoonekynd.
CJK-LaTeX Package
-
UTF8 encoding. TrueType font embedded, 88K bytes. Contributed by Kangsoo Kim.
-
UTF8 encoding. TrueType embedded, 257K bytes.
- CJK mixed text typesetted with CJKGB, Big5, JIS, SJIS, KS encodings are used in the source. PDF output with embedded TrueType (80K bytes) and without embedded font (9K bytes). MS-Windows CJK TrueType fonts simsun.ttc, mingliu.ttc, msmincho.ttc, and batang.ttc are used.
-
UTF8 encoding was used in the source. Bitstream Cyberbit TrueType font is embedded, 43K bytes.
ASCII pTeX
-
A short document on using graphics in dvipdfmx. 107K bytes.
-
A Japanese translation of Chinese classics by Li Po. Examples found at Shinsaku Fujita's Home Page. (the author of XyMTeX) TrueType font embedded, 46K bytes.
HLaTeX Package
-
KS encoding was used in the source. TrueType (no embedded font) with stylistic variants, 19K bytes. You need MS-Windows Korean TrueType fonts, batang.ttc and gulim.ttc.
-
KS encoding. TrueType embedded, 1.1M bytes. Contributed by the lshort-kr project team.
Resources
This section contains documents related to DVIPDFMx, some useful information for typesetting CJK text with TeX, and a small list of freely available fonts, etc...
DVIPDFMx Documents
There are no HTML/PDF manulas for DVIPDFMx.
CJK and TeX Information
The CJK.INF by Ken Lunde provide detailed information on CJK (Chinese, Japanese, and Korean) character sets and encodings. CJK Quick Start contains shareware/freeware information for reading/writing CJK text in English Windows.
If you want to consult others about typesetting CJK text with TeX, please visit
-
A page maintained by Haruhiko Okumura. (In Japanese)
-
Korean TeX Users Group. (In Korean)
There is a mailing list for CJK package users which can be found at http://cjk.ffii.org.
CJK/Unicode Font
Many CJK/Unicode fonts are freely available in various formats and in a variety of qualities.
-
Several OpenType CID-keyed fonts are freely available from Adobe for use with Adobe Acrobat Reader. HYSMyeongJoStd-Medium-Acro (Korea1), KozMinPro-Regular-Acro (Japan1), STSongStd-Light-Acro (GB1), and MSungStd-Light-Acro (CNS1) are available. Older versions of font packs had contained HeiseiMin-W3-Acro, HeiseiKakuGo-W5-Acro (Japan1), HYGoThic-Medium-Acro, HYSMyeongJo-Medium-Acro (Korea1), MSung-Light-Acro, MHei-Medium-Acro (CNS1), and STSong-Light-Acro (GB1). It also contains several CMap resources for standard CJK encodings and useful ToUnicode CMaps.
-
You can find CJK TrueType fonts as a part of additional language packs for use with Microsoft Windows OS. MS Hei, MS Song (Simplified Chinese), MingLiu (Traditional Chinese), GulimChe (Koream), and MS Gothic (Japanese) are available.
-
Short explanation of font formats, list of available Chinese fonts, and font utilities.
-
Alan Wood's Unicode Resources have a list of Unicode TrueType fonts.
- Arphic TrueType and Wang TrueType FontSeveral Chinese TrueType fonts can be found from ftp://freebsd.sinica.edu.tw/pub/keith/.
- Korean AsiaSoft FontsAvailable from AsiaSoft Co. Ltd.. (in Korean)
- Japanese Handwritten OpenType FontsAquablue Original Font (Aquafont, in Japanese) and Kotori Moji Font (in Japanese) contains basic set of characters for daily-use Japanese. Aquafont can be used without restriction for non-commercial, personal use. But it requires permission of the creator for commercial use. Kotori Moji Font is free for personal use. But it requires permission of the author of the font in the case of commercial use. Please send 1,000 yen to support her if you want to use Kotori Moji Font in commercial materials.
- Gentium - a typeface for the nationsAvailable from SIL international. Gentium is a typeface family designed to enable the diverse ethnic groups around the world who use the Latin script to produce readable, high-quality publications. It supports a wide range of Latin-based alphabets and includes glyphs that correspond to all the Latin ranges of Unicode.
Luc Devroye's "On snot and fonts" contains many links to font related things.
Specifications
Useful documents and resources for developers.
-
Resources for Developers, Print Service Providers, and others interested in making the most of Adobe products and technologies.
-
OpenType™ Specification from Microsoft Corporation.
DVI standard is available from CTAN:dviware/driv-standard
.