2 Replies Latest reply on Oct 30, 2008 10:10 AM by David Borrink

    Can Flex Do This (yes, I'm researching...)

    David Borrink
      A client and I are looking into developing an app that will allow users to open up PDF files which contain layers, and allow users to pick the layers they want to print out. We don't want users to be able to edit the data on the layers, just pick and choose which layers they want to print. All the info would be on a DVD.

      From what we've read, Flex offers great dev tools, and with AIR we can make it a desktop app. Before we dive in and try to make this happen, would someone be able to give me an idea if what we're looking to do is really possible in Flex/AIR and wouldn't require too much geek factor? We're not afraid to get geeky, and we have a grasp of coding on a moderate level. It would help us plan and commit wisely if we heard "veterans" tell us if we're on the right track.

      Thanks for any advice and comments!
        • 1. Re: Can Flex Do This (yes, I'm researching...)
          Dr. Fred Mbogo Level 1
          The first thing I'd test is if Adobe Acrobat Reader can open your AI files. If not, game over.

          Next, to make the layer swaps happen, you're going to have to rely on Javascript in the PDF/AI file. The AIR web control -- which is how you show a PDF -- doesn't give you a lot of direct control over the presentation of the content. The best you can do is call into JS within the displayed document and have that code do things for you.

          Personally, I'd render these things down to high-res transparent PNGs and do the layering in ActionScript, drawing them on a canvas with the proper stack-up. The Flash platform's drawing mechanisms do scaling, transparency and antialiasing very well,
          • 2. Re: Can Flex Do This (yes, I'm researching...)
            David Borrink Level 1
            Well, I know that Reader can open PDF files with layers set up in Illustrator. So that means "game on".

            We know a bit of Javascript between the two of us. But what if we don't go with the idea of changing the layers around and just leave them as is, with just the option to turn layers on and off for printing? Would that work in Flex/AIR?

            As for your idea of transparent PNGs, that might work fine if we weren't looking to a huge quantity of drawings. We'd like to be able to bring in PDFs because there are going to be so many files! We'd like to have an interface which allows a user to open a file from a menu/interface and then see the PDF right there, access the layers and turn them on/off as they need for printing without being able to take the data and use it for themselves in Illustrator (basically ripping our data off).