Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,466 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,559 people online right now. Registration is fast and FREE... Join Now!




Can convert HTML TO PDF from flash actionscript?

 
Reply to this topicStart new topic

Can convert HTML TO PDF from flash actionscript?

vennasa
29 Jun, 2008 - 07:40 PM
Post #1

New D.I.C Head
*

Joined: 29 Jun, 2008
Posts: 1

Hi all,
I would like to know about the following case, Can we convert HTML to PDF by using Flash Actionscript?
My idea is like this,I have a flash file which embbedded in the web page and in that flash file I have a button which called save_btn,and if clicked on the button,can I save the current HTML page to PDF?

And the following are my sample code.



CODE


//________________________M Y   C O D E  F O R  B U T T O N  P R E S S

_root.save_btn.onPress= savePDF;
//_________________________
//________________________M Y   C O D E  F O R  B U T T O N  P R E S S F U N C T I O N

function savePDF()
{
    txt1.text="clicked to save PDF";
    
        //getURL("java script:window.close();");
       //can I put the code here to convert HTM TO PDF?
}
//_________________________




Thanks all, pls kindly help me out and thanks in adavance.

This post has been edited by vennasa: 29 Jun, 2008 - 08:48 PM
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Can Convert HTML TO PDF From Flash Actionscript?
2 Jul, 2008 - 08:24 AM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,023



Thanked: 81 times
Dream Kudos: 1175
My Contributions
Sadly, Flash can't save files without talking to more powerful languages. So, if you wanted to do something like that it would have to get the page's source code (through talking with javascript most likely) and then sending it to a php script that you have gottent he plugins for making pdf files. The php would have to save the file off (to the server) then if you are wanting people to be able to download it the php would have to use a forced download function to make the recently created file popup in a download window.

It i sa lot of work, yes, but at this point that is the only way to save files off with flash (plus the fact that flash can't convert things to pdf).
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:59PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month