Hi! There is open source FPDF library, which generates PDF files. I'm trying to add SWF suport for it.
For sample, in order to add image to PDF, it parses the file and returns those values:
//////////////////////////////////////////////////////////////////////////////////////////////////
array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
w - width
h - height
cs - color space
bpc- bits
f - decoder
data - image data
And then outputs file to PDF
$this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
//////////////////////////////////////////////////////////////////////////////////////////////
How should this process look for SWF file?
Aside from parsing it, which minimal amount of data should be outputed to PDF, in order for it to display embedded SWF correctly? Is there any sample around the net?
All I can found, is information how to embed swf using Captives, but not programatically generate syntax. There is one sample in Adobe Reference, but is is quite complex and has no "Hello swf" to start with.