943,438 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Apr 29th, 2003
0

Convert a Flash page to PDF format?

Expand Post »
I know I have to take a screen capture of the page that was generated in Flash. But how then can I get that to a PDF format? I want a button on the Flash page that the user can click for all this to happen in the background.

Thanks for any help!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rhall is offline Offline
1 posts
since Apr 2003
May 9th, 2003
0
Re: Convert a Flash page to PDF format?
This would have to be done via some server side script that created a pdf file on the fly.

What operating system would the server be? (Windows NT/2000, Linux, etc?) If you were using linux, for example, you'd need the flash program to automatically execute a script which would run a program on the server in the background which generated the image.

I'm not exactly sure how to go about doing this or how it would be done. I just know it seems pretty complicated ...
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
May 10th, 2003
0
Re: Convert a Flash page to PDF format?
I'm an owner of Adobe Acrobat 5.0, and I swear my life by it. The way we create PDF files with Acrobat 5 is by printing to an Actobat Printer. In theory, you would need to create a little program that captures the screen and prints it to the PDF printer.
Moderator
Reputation Points: 322
Solved Threads: 28
The C# Man, Myth, Legend
Tekmaven is offline Offline
914 posts
since Feb 2002
May 11th, 2003
0
Re: Convert a Flash page to PDF format?
What you're trying to do I think is impossible, within Flash anyways. If you're trying to automate this process, all from within Flash, and by that I mean, when you press a Flash button, it takes a screen shot and saves it as a PDF in the background. If this is the case, then Flash would need some system access, which it doesn't have for security reasons, and thank God for that. It would suck if I went to a Flash web site, while I had another window open with passwords, and this Flash web site took a screenshot of everything and processed it on the server.

What you're trying to do though, if I follow correctly, can be done with ActiveX. You'd have to code this control yourself. The browser would ask the user if it's safe to download the control. Once this is downloaded by the user, it can take the snapshot, send it back to the server, and you can use another process to convert to PDF. There are SDKs out there to convert images to PDFs on the fly.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
May 28th, 2010
1
Re: Convert a Flash page to PDF format?
Reputation Points: 167
Solved Threads: 239
Nearly a Posting Virtuoso
rajarajan07 is offline Offline
1,445 posts
since May 2008
Sep 16th, 2010
0
Re: Convert a Flash page to PDF format?
PDF generation is possible with PHP, I believe. What you need to do is redirect the user to a PHP form (with all of the information passed in a GET request) and have PHP generate a PDF file which it outputs for the user to download.

It cannot be done with ActionScript alone -- you will require some form of server-side programming language.

Torres Aarron
Last edited by Ezzaral; Sep 16th, 2010 at 12:28 pm. Reason: Snipped "fake sig" link. Please restrict such links to your site-wide user signature, which can be edited from the user control panel.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
t.aarron is offline Offline
1 posts
since Sep 2010
May 10th, 2011
0
Re: Convert a Flash page to PDF format?
PDF FILE INTO FLASH CODE
--------------------------------------------------------------------------------
Graphics and Multimedia Syntax (Toggle Plain Text)
  1. on (press) {
  2.  
  3. import flash.net.FileReference;
  4.  
  5. var listener:Object = new Object();
  6.  
  7.  
  8.  
  9. listener.onSelect = function(file:FileReference):Void {
  10.  
  11. trace("onSelect: " + file.name);
  12.  
  13. }
  14.  
  15.  
  16.  
  17. listener.onCancel = function(file:FileReference):Void {
  18.  
  19. trace("onCancel");
  20.  
  21. }
  22.  
  23.  
  24.  
  25. listener.onOpen = function(file:FileReference):Void {
  26.  
  27. trace("onOpen: " + file.name);
  28.  
  29. }
  30.  
  31.  
  32.  
  33. listener.onProgress = function(file:FileReference, bytesLoaded:Number,
  34.  
  35. bytesTotal:Number):Void {
  36.  
  37. trace("onProgress with bytesLoaded: " + bytesLoaded
  38.  
  39. + " bytesTotal: " + bytesTotal);
  40.  
  41. }
  42.  
  43.  
  44.  
  45. listener.onComplete = function(file:FileReference):Void {
  46.  
  47. trace("onComplete: " + file.name);
  48.  
  49. }
  50.  
  51.  
  52.  
  53. listener.onIOError = function(file:FileReference):Void {
  54.  
  55. trace("onIOError: " + file.name);
  56.  
  57. }
  58.  
  59.  
  60.  
  61. var fileRef:FileReference = new FileReference();
  62.  
  63. fileRef.addListener(listener);
  64.  
  65. var url:String = "resume.pdf";
  66.  
  67. if(!fileRef.download(url, "resume.pdf")) {
  68.  
  69. trace("dialog box failed to open.");
  70.  
  71. }
  72.  
  73. }
Last edited by Ezzaral; May 10th, 2011 at 12:58 pm. Reason: Added code tags. Please use them to format any code that you post.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Amit Adav is offline Offline
1 posts
since May 2011
Jun 24th, 2011
0
Re: Convert a Flash page to PDF format?
it does not work for me .. what did I did wrong?
Reputation Points: 2
Solved Threads: 8
Junior Poster in Training
matricol is offline Offline
98 posts
since Jun 2011
Jul 1st, 2011
0
Re: Convert a Flash page to PDF format?
visit to this site

Go to PDFMeNot.com
Reputation Points: 13
Solved Threads: 4
Light Poster
shiva07 is offline Offline
37 posts
since Jun 2011
Jul 3rd, 2011
0
Re: Convert a Flash page to PDF format?
There are many companies who will do this pretty cheap.
Reputation Points: 8
Solved Threads: 6
Junior Poster
pgmco is offline Offline
182 posts
since May 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Graphics and Multimedia Forum Timeline: Free Graphic resources
Next Thread in Graphics and Multimedia Forum Timeline: multi-key function ActionScript 3





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC