Flex 4 - flexpaper help

1.8k views Asked by At

I'm trying to get the flexpaper document viewer working in my flex app, but don't seem to be having any luck.

flexpaper - http://flexpaper.devaldi.com/default.jsp

I've downloaded the swc file here - http://code.google.com/p/flexpaper/downloads/detail?name=FlexPaper_1.4.1_SDK_4.0_beta_swc.zip&can=2&q=

I've converted my pdf to a swf and have placed it in my projects bin-debug folder.

The Component seem to display on screen when I run my project but no file loads within the viewer. The loading icon in the upper right hand side of the component just spins and spins.

I'm wondering what I'm doing wrong, why can't flexpaper find/load my pdf swf?

Here's the code from my project I'm using.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:fp="com.devaldi.controls.flexpaper.*">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

    <fp:FlexPaperViewer width="960" height="450" Scale="0.6" SwfFile="test.swf" /> 

</s:Application>

Any thoughts?

1

There are 1 answers

0
Adam On BEST ANSWER

Ok so I figured it out.

It appears that SWF2PDF adds a built in viewer by default. I changed the setting under edit->options and set it to ‘No viewer’ re-exported and add the new file into the bin-debug folder of my project.

Everything seems to work fine now!