If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
List of issues#2471 A lot of issues when converting an e-book page to frame:svg
Author:
Cuite_Piglin
Cuite_PiglinDate created:
Type: bug
Visibility: Everybody
Assigned to:
State: upgraded 

> What steps will reproduce the problem?
Using command:
java -jar ffdec.jar -config textExportExportFontFace=true/false
java -jar ffdec.jar -format frame:svg -select 1 -export frame test 1.swf/2.swf
And modify font names in the GUI interface.
> What is the expected output? What do you see instead?
The texts should be displayed correctly, but some wrong with converting.
For 1.swf, the problems are:
1. Whether or not using the FontFace, the title can't be displayed(1_disableFontFace.png)
but in flash player is normally(1_original.png). The title reappears after deleting
"DefineShape3 (chid: 11)".
2. When using the FontFace, part of the text overlaps(1_usingFontFace.png). And some fonts
can't be converted, but convert correctly after renaming the font name.
For 2.swf, the problem is:
When using the FontFace, because of fonts were not loaded, all of characters are
upside-down. After renaming a specific font, it loads successfully but displays text at an
excessively large size(2_ChangeFontName.png).
> What version of the product are you using? Is it "nightly build"? Which operating system
do you have?
version 23.0.1 with Java build 21-ea+25-2212. Not. Windows 10 21H2
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
1.swf (484 KiB)
2.swf (645 KiB)
1_original.png (177 KiB)
1_usingFontFace.png (351 KiB)
1_disableFontFace.png (120 KiB)
2_usingFontFace.png (511 KiB)
2_disableFontFace.png (116 KiB)
2_ChangeFontName.png (371 KiB)nightly 3212 with updates regarding this was released.
I got good news and bad news...
Ad 1.swf:
The title is be visible now.
Also the text does not overlap anymore.
Correct fonts are used.
Ad 2.swf:
The fonts load now,
it is not a large size anymore,
but there is still a problem:
The fonts stored in this SWF file do not provide advance width attribute for space
character (0x20, also en space 0x2002). It is set to 1 twip.
For SWF display this does not matter since DefineTexts have advance value stored in each
of their character reference.
But for SVG, this is a problem.
This effectively means that in SVG, you won't see any spaces in between words.
I cannot fix this anyhow automatically.
This propably can be solved by manually modifying Font in FFDec and setting (In "raw
edit") the advance value of the space glyphs to some normal value. But what is normal,
that is a question.
The fonts are also unusual that they are bigger than 1024 em square so this cannot be
solved by replacing space character from other font in FFDec.
It seems that authors of the e-book software producing this SWF tried to use some kind of
protection against ripping - in SWF file the fonts are written upside down and all texts
are matrix transformed to the normal position, plus the problem with the space character.
State: new→upgraded
I tried to set the space advance width manually to 5120,
it seems to work. But the file has another problem - the last advance width of each text
is stripped - set to 0. This way full width of the text cannot be calculated, resulting in
some SVG texts to be shrinked - like the page number "23". I don't know how to overcome
this :-(.
State: upgraded→closed
This is highly improved in nightly 3308.
I introduced font/text normalization which is executed before PDF/SVG export
and it fixes many of these SWF issues.
I think the result is pretty usable.
State: closed→upgraded
Thank you for all your hard work on this so far.
I'm sorry for the long delay in replying.
However, I found a few problems during my using:
1. In black_rectangle_error.swf, a black rectangle is overlaying the image.
2. In font_test.swf, the font weight looks bolder than it should after conversion to
pdf/svg. It caused some of characters are just like a block.
3. In font_test2.swf, the letter "f" has multiple glyph variants(ff,ffh,fi etc.) in the
font. It displays the correct variant in the viewer, but it becomes the wrong one after
conversion to pdf/svg. What confused me is that simply editing the text will reset it to
the default variant.
4. In formula_test.swf, some of the symbols have the wrong variant or appear flipped.
5. In formula_test2.swf, it's much the same as the previous one: every symbols looks
completely messed up.
In addition, I hope that font importer can support some features of onetype font such as
ligature. There is an onetype font for example. (MinionPro-Regular.otf)
black_rectangle_error.swf (491 KiB)
font_test.swf (833 KiB)
font_test2.swf (213 KiB)
formula_test.swf (98 KiB)
formula_test2.swf (101 KiB)
MinionPro-Regular.otf (230 KiB)