Open GoogleCodeExporter opened 9 years ago
I use alivePDF in a Flex Application and not AIR
Original comment by frederic...@gmail.com
on 5 Dec 2007 at 1:42
Hi frederic,
I don't understand everything. You want to save the PDF locally from a Flex
application ? Is that right ?
regards,
Thibault
Original comment by thibault.imbert
on 6 Dec 2007 at 12:07
Hi thibault
You're right, it's exactly what I want to do.
Normally, you have a generated folder and I think the pdf file must be in that
place,
but there is nothing.
I put my code in an attach file.
Thanks for your help.
Fred
Original comment by frederic...@gmail.com
on 6 Dec 2007 at 9:03
Attachments:
You can't save directly to local HDD in a Flex App.
Only in AIR ones.
Cheers,
Juan
Original comment by juan.t...@gmail.com
on 29 Jan 2009 at 7:52
- YES you can save directly to a local HDD in a flex app, the user
will be prompted for the file location.
- YES this does work with CS3 but you DO need flash player 10
- Code like this will do the trick:
var f:FileReference = new FileReference();
var bytes:ByteArray = this.pdf.save(Method.LOCAL);
f.save(bytes, “drawing.pdf”);
- YES you do get an error in flash UNLESS you compile specifically for
flashplayer 10
- In Flex Builder you can use Project Properties >> Flex Compiler, and set
“Required
Flash Player Version” to 10.0.00
- if you use the SDK you can either:
> add the option “-target-player=10.0.00″ to the mxmlc options line OR:
> modify the flex_sdk_3/frameworks/flex-config.xml file to change that same
option
Note that the compiler option trumps the config file.
then… you may get another error: in flash this function is only allowed for an
interactively initiated function. In other words if you have this save() as
part of a
file completion handler it will not work since it is called from a
non-interactively
invoked method. It will work from, for example, a mouseclick handler.
Original comment by andredeb...@gmail.com
on 2 Sep 2009 at 11:46
Original issue reported on code.google.com by
frederic...@gmail.com
on 5 Dec 2007 at 9:01