[Top][All Lists]

[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: Sun, 24 Oct 2004 04:27:51 +0900

On 2004/10/24, at 3:25, Matthias Kramm wrote:

Actually I'm not willing to type somewhat enigmatic parameter sequence
every time. It was just a kind of workaround, because I didn't think
it was a good idea to drastically change the codes related to one
feature in a mere tiny patch, XPDF part in particular as heavy-alteration of
an embedded package might often cause synchronisation problem in the

It's not that bad. There are quite a number of changes by now anyway
which have to be applied every time the xpdf package in swftools is

Um, I didn't know that. It is just what I learned from my little
experience in some opensource projects.

The situation is a bit more complicated; a PDF isn't always written in a
single language and we can't tell which language it is written :)

Are you saying that you need to use the "right" languagepack for
every PDF, but can't have more than one around?
Or would you also be able to just include *all* languagepacks, and then be
able to convert every PDF, no matter the language?

The "language pack" idea of the XPDF distribution is not quite an idea of PDF itself; I suppose they are provided just for convenience, so that users can download as many CMAP / ToUnicode files as they need to display a PDF in

A feasible way is rewrite the GlobalParams.cc to search for an
individual parameter file in each NLS directory, which may be put in
/usr/local/share/swftools/encodings or whatever. This way the necessary
files would be automatically collected at runtime and then all users
have to
do when they want to use misc. languages should be to extract the
in that directory.

Ok- I renamed the xpdfrc config files now anyway.
Config files now processed are:


So if you're o.k. with putting the languagepack parameters into, say,
~/.pdf2swf.conf, we wouldn't need any other changes to pdf2swf.
(Probably the only way to beat that approach in terms of convenience
 would be to introduce a --languagepack option to pdf2swf which you can
 point directly to the .tar.gz file you downloaded from the xpdf
 download page ;))

Things didn't go exactly the way I said :) To resummerise my idea, it
should be like the following:

- Suppose each "language pack" is installed in a separate directory in
  /usr/local/swftools/encodings, with the directory named its language
  name for example (e.g. /usr/local/swftools/encodings/japanese/).

- On startup, xpdf2swf seeks per-directory configuration files
  that are named by a certain rule in the subdirectories of
  /usr/local/swftools/encodings. For instance, if there are two
  directories in /usr/local/swftools/encodings,




  will be looked up in this scheme.

- they will all be concatenated and parsed at end of the startup
  phase, whose settings are possibly overridden by the command
  line parameters.


reply via email to

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