Your truetype fonts should all live under /usr/share/fonts/truetype.    You
can force your system's fontconfig to be refreshed by using  "fc-cache -fv".

Which Linux distribution are you using?    Ubuntu 10.04 makes all of the
cmap/etc stuff very easy with the cmap-adobe-(language) and xpdf-(language)
packages in the OS.

-Irving


On Tue, Oct 19, 2010 at 4:03 AM, <[email protected]> wrote:

> Question 1:
>
> Could someone explaines in detail the format of add-to-xpdfrc?  How
> should I add character collection and ttf font?
>
> Question 2:
>
> I have Adobe-Japan1-4, why does swftools complain about not having
> Adobe-Japan1?
>
> ----
>
> What I tried:
>
> I downloaded the CJK font at
> http://partners.adobe.com/public/developer/font/index.html , and put
> them in /usr/share/xpdf/xpdf-chinese-simplified.
>
>        $ ls
>        00_ReadMe.pdf    Adobe-GB1-UCS2          GBK-EUC-UCS2    H
>        83pv-RKSJ-H      Adobe-GB1.cidToUnicode  GBK-EUC-V
> ISO-2022-CN.unicodeMap
>        90ms-RKSJ-H      Adobe-Japan1-4          GBK.unicodeMap  README
>        90ms-RKSJ-UCS2   Adobe-Japan1-UCS2       GBK2K-H
> UniGB-UCS2-H
>        90ms-RKSJ-V      CMap                    GBK2K-V
> UniGB-UCS2-V
>        90msp-RKSJ-H     EUC-CN.unicodeMap       GBKp-EUC-H
>  UniJIS-UCS2-H
>        90msp-RKSJ-V     EUC-H                   GBKp-EUC-V
>  UniJIS-UCS2-HW-H
>        90pv-RKSJ-H      EUC-V                   GBT-EUC-H
> UniJIS-UCS2-HW-V
>        90pv-RKSJ-UCS2   Ext-RKSJ-H              GBT-EUC-V
> UniJIS-UCS2-V
>        90pv-RKSJ-UCS2C  Ext-RKSJ-V              GBpc-EUC-H      V
>        Add-RKSJ-H       GB-EUC-H                GBpc-EUC-UCS2
> add-to-xpdfrc
>        Add-RKSJ-V       GB-EUC-V                GBpc-EUC-UCS2C  ls.txt
>        Adobe-GB1-4      GBK-EUC-H               GBpc-EUC-V
>
> Then, I began to convert some pdfs.
>
>        $ pdf2swf  167680001.pdf -o tmp/test.swf -s
> languagedir=/usr/share/xpdf/xpdf-chinese-simplified/
>        NOTICE  Adding /usr/share/xpdf/xpdf-chinese-simplified/ to language
> pack directories
>        Error: Couldn't open cidToUnicode file
> '/usr/share/xpdf/xpdf-chcinese-simplified/GBpc-EUC-H'
>        Error: Unknown character collection 'Adobe-GB1'
>        Error: Couldn't find a font for 'STXihei'
>        Error: Couldn't find a font for 'STXihei'
>
> I didn't have the font.  I downloaded it here:
> http://cid-a304a3ed04e117fd.office.live.com/self.aspx/Font/STXIHEI.TTF
>
> Then I copied it to /usr/share/xpdf/xpdf-chinese-simplified/ folder.
> And add a line to add-to-xpdfrc
>
>                displayCIDFontTT        Adobe-GB1
> /usr/share/xpdf/xpdf-chinese-simplified/STXIHEI.TTF
>
> Re-run the command:
>
>        $ pdf2swf  167680001.pdf -o tmp/test.swf -s
> languagedir=/usr/share/xpdf/xpdf-chinese-simplified/
>
> Now, it works.
>
>        NOTICE  processing PDF page 61 (505x647:0:0) (move:-541:-36)
>        NOTICE  Writing SWF file tmp/1676.61.swf
>        NOTICE  processing PDF page 62 (505x647:0:0) (move:-36:-36)
>        NOTICE  Writing SWF file tmp/1676.62.swf
>
> I moved on to another pdf:
>
>        $ pdf2swf  165660001.pdf -o tmp/1676.%.swf -s
> languagedir=/usr/share/xpdf/xpdf-chinese-simplified/
>        NOTICE  Adding /usr/share/xpdf/xpdf-chinese-simplified/ to language
> pack directories
>        NOTICE  outputting one file per page
>        Error: Unknown character collection 'Adobe-Japan1'
>
> I thought i had Adobe-Japan1,
>
>        $ ls Adobe-J*
>        Adobe-Japan1-4  Adobe-Japan1-UCS2
>
> I read that one should edit the add-to-xpdfrc file as following for
> CJK compability, I sensed I messed up there.
>
> Here's my add-to-xpdfrc
>
>        $ cat add-to-xpdfrc
>        #----- begin Chinese Simplified support package (2004-jul-27)
>        cidToUnicode    Adobe-GB1
> /usr/share/xpdf/xpdf-chinese-simplified/Adobe-GB1.cidToUnicode
>        #cidToUnicode   Adobe-Japan1
>  /usr/share/xpdf/xpdf-chinese-simplified/Adobe-Japan1-4
>        unicodeMap      Adobe-Japan1
>  /usr/share/xpdf/xpdf-chinese-simplified/Adobe-Japan1-4
>        unicodeMap      ISO-2022-CN
> /usr/share/xpdf/xpdf-chinese-simplified/ISO-2022-CN.unicodeMap
>        unicodeMap      EUC-CN
>  /usr/share/xpdf/xpdf-chinese-simplified/EUC-CN.unicodeMap
>        unicodeMap      Adobe-GB1
> /usr/share/xpdf/xpdf-chcinese-simplified/GBpc-EUC-H
>        unicodeMap      GBK
> /usr/share/xpdf/xpdf-chinese-simplified/GBK.unicodeMap
>        cMapDir         Adobe-GB1
> /usr/share/xpdf/xpdf-chinese-simplified/CMap
>        toUnicodeDir
>  /usr/share/xpdf/xpdf-chinese-simplified/CMap
>        displayCIDFontTT        Adobe-GB1
> /usr/share/xpdf/xpdf-chinese-simplified/STXIHEI.TTF
> #----- end Chinese Simplified support package
>
> How should I add more font?  Or, do I have to add those font one by
> one? If so, how?  I don't understand the format here, like should i
> prefix GBpc-EUC-H with cidToUnicode or unicodeMap ?
>
>

Reply via email to