开发者

Flex 3 + AlivePDF - How to display pdf in the browser

I'm testing alivePDF 0.1.5 and till now everything's been fine. I'm super interested in the new function writeFlashHTMLText() cause it makes my life so much easier! xD I'm now trying to display the generated pdf in a browser tab/window instead of just saving the file (using the filereference class' save functi开发者_StackOverflow社区on). I saw that there was a PDF.save() function that allowed that specifying the argument Download.INLINE. However I don't want to use the save function of the pdf class cause I don't want to use a script.

Is there any other way to achieve what I want?

Thanks a lot for your answers. Regards,

BS_C3


Because of the way Flash works security-wise you have two options:

  1. Generate and save the PDF to the local machine - this can be done entirely client-side using FlashPlayer 10+ (see the FileReference class).
    The user can then navigate to, and launch, the generated PDF file.

  2. Save the PDF to a server and link to the PDF from your Flash application. This will let you open the PDF in the browser. Obviously this requires a server of some sort.

  3. Build your app as an AIR application - this will let you save the file and, as far as I'm aware, launch it from the local machine.

The current state of things: you cannot generate a PDF and open it in the browser completely client-side (i.e. FlashPlayer in a browser) unless you are using AIR.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜