How to add a Flash SWF file to an existing PDF

By using the PDF3D SWF Injector utility you can add a Flash SWF file to an existing PDF. This can be done with the PDF3DSwfInjector (or PDF3DSwfInjector.exe in Windows) command. The usage of this tool is similar to the PDF3D Image Injector with the exception that PDF3D SWF Injector requires all 8 parameters.

NOTE: Flash is deprecated and not recommended. Adobe no longer supports it and many consider Flash security unsafe.

Parameters

Usage: PDF3DSwfInjector <pdf_filename> <swf_name> <caption_text> <page_number> <left_margin> <bottom_margin> <width> <height>

Description of parameters:

If width and height are floating point and less or equal to 1.0, the parameters are interpreted as SWF corner ratios of existing page size.
If that's the case, then:

Which would change the usage to: PDF3DSwfInjector <pdf_filename> <swf_name> <caption_text> <page_number> <x0> <x1> <y0> <y1>

Notes

Flash SWF aspect ratio may not be preserved unless parameters match input.

You can add Flash SWFs to a PDF that already has some of them. If the injected Flash SWF and/or caption text are added in the same area of an existing one, it will result in overlapping Flash SWFs and/or caption text.

When using floating point values (x0, x1, y0 and y1):

Examples

Image without caption text on the lower-left corner:

Image without caption text to match the whole page size:
PDF3DSwfInjector file.pdf clip.swf "" 1 0 1 0 1

Image with caption text on the lower-right corner:
PDF3DSwfInjector file.pdf clip.swf "Caption Text" 1 0.9 1 0 0.05

Image with caption text on the upper-right corner:
PDF3DSwfInjector file.pdf clip.swf "Caption Text" 1 0.9 1 0.95 1