1 Replies - 2577 Views - Last Post: 02 July 2008 - 09:24 AM

#1 vennasa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 29-June 08

Can convert HTML TO PDF from flash actionscript?

Posted 29 June 2008 - 08:40 PM

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.




//________________________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 June 2008 - 09:48 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Can convert HTML TO PDF from flash actionscript?

#2 BetaWar  Icon User is online

  • #include "soul.h"
  • member icon

Reputation: 1148
  • View blog
  • Posts: 7,145
  • Joined: 07-September 06

Re: Can convert HTML TO PDF from flash actionscript?

Posted 02 July 2008 - 09:24 AM

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).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1