mesaglam / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Cannot use "Method.LOCAL" in "savePDF" request #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I click on the button, something seems to be work but any pop-up
appears on the screen.

I'm using the alivePDF library 0.1.4 downloaded yesterday on the site.

I make a script to run alivePDF with a Java server, and it runs perfectly,
I just have a problem to make the same thing in local.

the code :
myPDF.savePDF(Method.LOCAL,"", Download.ATTACHMENT, "myPDF.pdf");

Original issue reported on code.google.com by frederic...@gmail.com on 5 Dec 2007 at 9:01

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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:

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
- 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