Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-18-2012, 10:55 AM   #1
tinfanide
Member
 
Join Date: Oct 2011
Posts: 71
Default Save SWF as PDF?

I have searched online and people point to AlivePDF.
I just couldn't use it without error.
Could anyone point me to somewhere I don't need to do it through PHP and just save the SWF locally as PDF?

Thanks in advance.
tinfanide is offline   Reply With Quote
Old 07-18-2012, 03:55 PM   #2
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,878
Send a message via Skype™ to henke37
Default

Flash movies are interactive and can load external content. PDF files are not interactive (to this extent) and is a poor fit for the possible content of a Flash movie.

And that's excluding obvious facts like that pdf files don't do animation or sound.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 07-18-2012, 04:22 PM   #3
tinfanide
Member
 
Join Date: Oct 2011
Posts: 71
Default

Quote:
Originally Posted by henke37 View Post
Flash movies are interactive and can load external content. PDF files are not interactive (to this extent) and is a poor fit for the possible content of a Flash movie.

And that's excluding obvious facts like that pdf files don't do animation or sound.
What about this?
I was thinking of converting a SWF to JPEG and I did work it out.
And just one further step:
by any means (not just ActionScript, maybe other scripting languages in Adobe) could I convert JPEG to PDF?
tinfanide is offline   Reply With Quote
Old 07-19-2012, 01:48 AM   #4
BobThyAsian
Registered User
 
Join Date: Jul 2012
Posts: 3
Default

Dude, it's like you're trying to turn a movie into a book in a literal sense. I'm sure you could "print screen" and save that as a pdf after converting from image.
BobThyAsian is offline   Reply With Quote
Old 07-19-2012, 02:09 AM   #5
tinfanide
Member
 
Join Date: Oct 2011
Posts: 71
Default

Quote:
Originally Posted by BobThyAsian View Post
Dude, it's like you're trying to turn a movie into a book in a literal sense. I'm sure you could "print screen" and save that as a pdf after converting from image.
Yes, I knew other than programming it, there are plenty of ways to turn an image into a PDF. Yet, what I wanted was to do it programmatically so that users can do something in my application and finally save it in PDF on the fly.
tinfanide is offline   Reply With Quote
Old 07-19-2012, 02:16 AM   #6
jsprclimber123
Breaking things...
 
Join Date: Jan 2010
Posts: 635
Default

As long as you're aware of the implications of the static nature of PDF's vs. the dynamic and interactive nature of SWF's, I don't see why you couldn't render out the current scene of the SWF as pixel data (to something like a canvas) and save from there. Browser support is an issue here, but is one option for you to consider.
jsprclimber123 is offline   Reply With Quote
Old 07-19-2012, 02:20 AM   #7
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,878
Send a message via Skype™ to henke37
Default

You don't want to save a flash movie as a pdf. You want to export a pdf file from an application implemented as a flash movie.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 07-19-2012, 03:05 AM   #8
tinfanide
Member
 
Join Date: Oct 2011
Posts: 71
Default

Quote:
Originally Posted by jsprclimber123 View Post
As long as you're aware of the implications of the static nature of PDF's vs. the dynamic and interactive nature of SWF's, I don't see why you couldn't render out the current scene of the SWF as pixel data (to something like a canvas) and save from there. Browser support is an issue here, but is one option for you to consider.
How about this? (still error opening the PDF, though):
ActionScript Code:
import flash.display.BitmapData; import flash.net.FileReference; import flash.display.Bitmap; var dBitmap:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); // pixel data? dBitmap.draw(stage); var oBitmap:Bitmap = new Bitmap(dBitmap); var oFileReference:FileReference = new FileReference(); oFileReference.save(oBitmap.bitmapData,"pdf.pdf"); // error opening the pdf.pdf
tinfanide is offline   Reply With Quote
Old 07-19-2012, 05:45 PM   #9
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,878
Send a message via Skype™ to henke37
Default

Congratulations on pointlessly creating a Bitmap object when you only wanted the BitmapData object.

Also, you shouldn't even attempt to export anything if you think that just changing the extension will change the actual data. Go and read the PDF file format specification and then come back.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:15 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.