7 Replies Latest reply on Aug 11, 2006 8:57 AM by frickin_chicken

    Flex to PDF

    Starlover_jacob Level 1
      Can someone help me with this one please?
      Suggestions or other solutions are verry welcome!

      let say i want to create an order from selected items that are dragged into my canvas or list or datagrid.
      This includes the images of the products.

      I would like to create this in a new screen as a pdf so the user can click in the flex application the button createpdf and than save the pdf to their computer.

      Any suggestions how to do this?
        • 1. Re: Flex to PDF
          dishmael Level 1
          I'd be interested in knowing how to do this as well.
          • 2. Re: Flex to PDF
            JeffreyGong
            In your Flex application, create an instance of FlexPrintJob, send your print job to a printer; In the print list, you may find a printer called "Adobe PDF" if your computer installed FlashPaper2. This so-called printer lets you save your print job as a PDF file and opens it in a PDF window, then, you may print the PDF in a real printer.

            Have fun!

            Jeffrey
            • 3. Re: Flex to PDF
              dishmael Level 1
              The only downside to using this approach is the need for the client to have an Adobe PDF printer setup. I'm not familiar with the FlashPaper2 module, what is that?
              • 4. Re: Flex to PDF
                frickin_chicken Level 1
                cutePDF is a free alternative
                • 5. Re: Flex to PDF
                  Starlover_jacob Level 1
                  first thanx for the answers.

                  cutePDF is a nice program. but im not really searching for this solution.
                  i have some canvases stacked ontop of eachother
                  1 backgroundcolor
                  2 backgroundpattern (with alpha blend)
                  3 canvas with images and tekst.

                  i am looking for some kind of way to save it as a pdf on my server and give the visitor of my site an new browser screen with the created pdf in it.

                  maybe a function that changes the canvases into xml or php and than let php create the pdf or something?
                  The point is that it must work on its own and does not need installed stuf at client side.

                  I hope this gives a better idea of what i trie to do.

                  (sorry for my english)
                  • 6. Re: Flex to PDF
                    nated
                    You can always send an HTTPService "job" to a PHP page with any necessary parameters. Then your PHP page can generate the PDF file dynamically. Once it returns successful, you have the navigateToURL function (not sure if that's EXACTLY it, but it's close :D) to pop up a new browser window pointed to the newly created PDF.
                    Of course, you'd have to build your PDF generating PHP page to "replicate" the Flex Canvas you want. You wouldn't be able to easily port your Flex to your PHP page. But once you got your PHP page generating a good PDF file, you'd never really have to update your PHP page! :D
                    • 7. Re: Flex to PDF
                      frickin_chicken Level 1
                      oh i see. hmmm. i get it now.

                      i have no experience with the data services side of flex... but my impression is that it handles things similar to what you are asking. You might be able to create whatever component you have to bitmapdata and send it back to the server. (maybe using serialization???)

                      then your server can do the conversion stuff. (ghostscript, imagemagick???)