On 9/27/06, Ettwein, Josh <[EMAIL PROTECTED]> wrote:
I have a need to consume PDFs with the flash player - no problem in the
past - just use PDF2SWF to convert to multiframe SWF and loadMovie. The
problem I'm having now is that the specs I've been given require that no
PDF files be stored on the server, so the PDF can't physically exist,
even in a temp dir for PDF2SWF to hit it. I can't really see a way to
pass the byte stream of the PDF as it is rendered from the database
content from .Net into PDF2SWF to render the SWF. Anyone else ever pull
this off?
If it's not possible (in a reasonably straightforward manner) to do it
dynamically, I will just tell the powers that be that they're just going
to have to store the PDF in a temp dir on the server until PDF2SWF is
done with it and then just destroy it. I don't really see a problem with
that, and I've done it with great success in the past, but there's a lot
of PII (personally identifiable info) in these PDFs we're creating, and
the execs are concerned about storing anything for even a moment.
I hope they don't find out that the PDF is also stored in memory while
it's converting! Next they'll ask you to convert the file without it
ever actually going into RAM!
Seriously though, if it were me, I'd tell them it has to be in a temp
file and will be destroyed as soon as it's converted. If you can't
convince them, and you have a linux server, you might look into FIFOs
/ named pipes. Basically, what you do is something like:
// create a FIFO called 'temp.pdf' this is not a file, but a 'named
pipe'. Nothing is stored on disk
mkfifo temp.pdf
// start the pdf2swf conversion in the background
pdf2swf temp.pdf &
// simulate transfering data from the network.
// the data will get passed directly to pdf2swf without going to disk
cat inputFile.pdf > temp.pdf
Another option is to use tmpfs, basically it's a ramdisk, that will
not be stored (it's only in RAM).
And finally...pdf2swf is opensource, so it shouldn't be too hard to
add an option to read from stdin and write from stdout.
If anyone has a solution that fits my needs, I would be forever
grateful. :-)
Josh
Good luck!
-David R
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com