swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] Patch for pdf2swf (CID codemap file options)


From: Moriyoshi Koizumi
Subject: Re: [Swftools-common] Patch for pdf2swf (CID codemap file options)
Date: Fri, 15 Oct 2004 02:10:20 +0900

Hi,

On 2004/10/14, at 2:03, Matthias Kramm wrote:

Thanks for the patch. I'm currently looking over it.
Why do you need to specify the parameters on the command line,
btw.? What's wrong with /etc/xpdfrc? Do you need to switch
between mappings from one pdf2swf run to the next?

I want to keep the parameters dependent from the settings of
the other application (XPDF) because I think of pdf2swf as a standalone
application and it should fully be configurable via the command line.
(It can eventually be affected by .xpdfrc though.)

BTW, does pdf2swf really attempt to read /etc/xpdfrc ? It seems not..

I also don't understand the reason for this:

     if(!(fontname = searchForSuitableFont(gfxFont))) {
-       fontname = "Times-Roman";
+       if (!gfxFont->isCIDFont()) {
+           fontname = "Times-Roman";
+       } else {
+           fontname = oldname;
+       }
     }
     filename = searchFont(fontname);

If replaceFont() (the function where this section of code
appears) is called, searchFont(oldname) already failed.
So what's the point in trying that again for CID fonts?

Nevermind :) This is kind of leftover from the try-and-error
session I forgot to remove.


p.s. Note that you will need fontconfig support in most cases where
you are processing a PDF that contains non-embedded CJK fonts.

Ok, I'll add a note to the docs.
Btw., would you be interested in writing a quick HOWTO on how to get
pdf2swf working with Japanese Fonts? Where to put the xpdf language
packs etc.?

I'm afraid I don't have enough time to mention the full details
at this moment, but the following tiny instruction will help a bit,
hopefully.

1. Place necessary fonts in some directory that will be searched by fontconfig.
2. Fetch XPDF's Japanese resource files from
   ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz
3. Expand the archive somewhere suitable (e.g. /usr/local/share/swftools/encodings). 4. Append the content of add-to-xpdfrc which is enclosed in the archive to one of
   xpdfrc files in the search path.
5. Fix paths in the xpdfrc file so that they point to the actual locations.
5. Run pdf2swf.

Oh, and do you happen to have any good PDFs for testing?

Maybe I can send you some.

Thanks,
Moriyoshi





reply via email to

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