swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] pls explain the format of add-to-xpdfrc and a prob


From: bai . xiaoyu
Subject: Re: [Swftools-common] pls explain the format of add-to-xpdfrc and a problem on CJK
Date: Wed, 20 Oct 2010 16:36:33 +0800

Thank you Chris and Irving.  I solved the problem.

First, install all  neccesary fonts from xpdf.

        $sudo apt-cache search xpdf-*
        
Force system's fontconfig to be refreshed by using  "fc-cache -fv".

Go to /etc/xpdf/ , look around.  These are system-wide configuration files.

Since the pdf2swf takes the -s languagedir= option, we can specify it
to /etc/xpdf/ .

But it won't work!

        $ pdf2swf  165660001.pdf -o tmp/1967.%.swf -s languagedir=/etc/xpdf
        NOTICE  Adding /etc/xpdf to language pack directories
        ERROR   Could not open /etc/xpdf/add-to-xpdfrc

The reason is that pdf2swf seeks for add-to-xpdfrc file.  The file has
to be there!  Simply cp /etc/xpdf/includes /etc/xpdf/add-to-xpdfrc
will do the trick.  Since the includes file include all other
configuration file.

        /etc/xpdf$ cat includes
        # This file was automatically generated by /usr/sbin/update-xpdfrc.
        # Instead, add or remove files in /etc/xpdf/ then run
        # /usr/sbin/update-xpdfrc to regenerate this file.

        include /etc/xpdf/xpdfrc-greek
        include /etc/xpdf/xpdfrc-japanese
        include /etc/xpdf/xpdfrc-chinese-simplified
        include /etc/xpdf/xpdfrc-korean
        include /etc/xpdf/xpdfrc-cyrillic
        include /etc/xpdf/xpdfrc-hebrew
        include /etc/xpdf/xpdfrc-latin2
        include /etc/xpdf/xpdfrc-thai
        include /etc/xpdf/xpdfrc-arabic
        include /etc/xpdf/xpdfrc-chinese-traditional
        include /etc/xpdf/xpdfrc-turkish

Another way is to copy to includes file to somewhere else and rename
it to add-to-xpdfrc.  E.g, put it in your ~/pdf2swf.conf/add-to-xpdfrc
.  Then run,

        $pdf2swf file.pdf -o /tmp/file.%.swf -s languagedir = ~/pdf2swf.conf/
        

On a ubuntu gnu/linux with swftools 0.9.0, the aboved confi solved
most of fonts problem.  On a centos 5.5, I ended up compile everyting
from source: swftools, t1lib, xpdf, freetype2 AND copy the
/usr/share/fonts /usr/share/xpdf from ubuntu to centos.  The builds
for centos are too out-dated!

There's only one issue remain with cmap.

        Error: Illegal entry in bfchar block in ToUnicode CMap
        NOTICE  processing PDF page 1 (408x595:0:0) (move:-422:0)
        NOTICE  File contains jpeg pictures
        NOTICE  Writing SWF file tmp/test.1.swf
        NOTICE  processing PDF page 2 (408x591:0:0) (move:-3:-9)
        NOTICE  File contains shaded fills
        NOTICE  File contains axial shaded fills
        NOTICE  File contains soft masks
        NOTICE  File contains forms
        NOTICE  File contains transparency groups
        NOTICE  File contains pbm pictures
        WARNING multiply blended transparency groups not yet supported!
        NOTICE  Writing SWF file tmp/test.2.swf
        NOTICE  processing PDF page 3 (407x591:0:0) (move:-25:-25)
        NOTICE  Writing SWF file tmp/test.3.swf
        NOTICE  processing PDF page 4 (407x591:0:0) (move:-25:-25)
        NOTICE  Writing SWF file tmp/test.4.swf

The output swf is OK.  But I don't know what the error is about.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]