views:

120

answers:

2

I saw that thread: http://stackoverflow.com/questions/2055061/swftools-segmentation-fault

When I tried to convert a PDF to SWF using pdf2swf I got an error:

/usr/local/bin/pdf2swf /var/www/html/ny-sto-p.watchitoo.com/content/userContent/2/1GRKm/1GRKm.pdf -i -p 5 -o /var/www/html/ny-sto-p.watchitoo.com/content/userContent/2/1GRKm/1GRKm-5.swf
    NOTICE  processing PDF page 5 (720x540:0:0) (move:0:0)
    NOTICE  File contains pbm pictures
    NOTICE  File contains shaded fills
    NOTICE  File contains axial shaded fills
    NOTICE  File contains soft masks
    Segmentation fault

When I added "-O 1" everything worked:

/usr/local/bin/pdf2swf /var/www/html/ny-sto-p.watchitoo.com/content/userContent/2/1GRKm/1GRKm.pdf -i -O 1 -p 5 -o /var/www/html/ny-sto-p.watchitoo.com/content/userContent/2/1GRKm/1GRKm-5.swf
NOTICE  processing PDF page 5 (720x540:0:0) (move:0:0)
NOTICE  Writing SWF file /var/www/html/ny-sto-p.watchitoo.com/content/userContent/2/1GRKm/1GRKm-5.swf

Anyone can tell what is that "-O 1" flag dose? I search http://swftools.org/ with no success.

Thans, eldad.

+1  A: 

The levels are

-O 1 == -s poly2bitmap
-O 2 == -s poly2bitmap -s bitmapfonts
-O 3 == -s poly2bitmap -s bitmapfonts -s ignoredraworder

This probably means that there is crash converting vector art / letters into simpler vectors for Flash. I haven't worked with swftools for a while (not since it used libart for that sort of thing) but we generally had fewer problems with using very recent snapshots or CVS rather than numbered releases in case that helps.

Rup
+1  A: 

I tried -O 2 and it worked, but the swf page is bitmapped only:

pdf2swf my.pdf -O 2 -o my%.swf

% outputs 1 swf per page of pdf.

Jay