This question about Using an extension: Asked

trying to use FlexPaperPlugin, looking for help...

Im looking to use this plugin = FlexPaperPlugin. I just want to find out if I am using the FlexPaperPlugin properly or not... If not, I'm hoping someone can correct me. So far, I have been completely unsuccessful at getting FlexPaperPlugin to display any PDFs. I can though browse to "foswiki/pub/System/FlexPaperPlugin/FlexPaperViewer.swf" and sure enough it displays the FlexPaperViewer just fine, everything works there.

I have installed the plugin successfully, and enabled it --- it is listed as installed in my foswiki/System/InstallPlugins page, swftools are installed as well. the foswiki/bin/configure page => Extensions => FlexPaperPlugin has a single option called " {FlexPaperPlugin}{Pdf2swfCmd} " which was set at default = " pdf2swf -q -f -T 9 -t -s storeallcharacters %FILENAME|F% -o %OUTPUT|F% " .. I have also tried using " /usr/bin/pdf2swf -q -f -T 9 -t -s storeallcharacters %FILENAME|F% -o %OUTPUT|F% " as well (which is truly where 'pdf2swf' resides, btw my WebSeverEnvironment does have /usr/bin listed in both ORIGINAL PATH, and CURRENT PATH).

To test the FlexPaperPlugin out, I have created a test wiki page (example: "foswiki/Main/WikiGo") and attached a PDF file called: TermPaper.pdf .. the file gets attached and all is well. there is nothing special about this PDF file (heck, Ive tried attaching several different pdf's just to see what would happen).

When I try to use the FlexPaperPlugin on my test wiki page "foswiki/Main/WikiGo" to display my TermPaper.pdf attachment, I am using the following syntax ::

%FLEXPAPER{"TermPaper.pdf"}% ... also have tried %FLEXPAPER{"attachment"}% .. also, %FLEXPAPER{"attachment" topic="WikiGo"}% ... also, %FLEXPAPER{"TermPaper.pdf" topic="WikiGo"}% ... also, %FLEXPAPER{"1" topic="WikiGo"}%

eveything I've tried doesn't seem to work. I'm thinking the first syntax I listed above is proper, but when using it nothing is displayed - no error, nothing - just my normal wikipage called "WikiGo". I've tried different browsers, and as listed, different syntaxes, but nothing is working for me. can someone shed some light on this issue I am running into? many thanks for any support or direction someone can point me to!


PS: a little more information might be helpful. I do have "JQueryPlugin" installed and enabled, I have tried using both JQuery version 1.4.3 and 1.4.4 (both to no avail). When browsing the wikipage that I am trying to use FlexPaperPlugin to display my PDF file, here is an example of some of the HTML Source for my wiki page ::
<script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/plugins/livequery/jquery.livequery.js?version=1.1.1'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js?version=2.01'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type="text/javascript" src="/foswiki/pub/System/JavascriptFiles/foswikiPref.js"></script><!--JavascriptFiles/foswikiPref-->
<script type="text/javascript" src="/foswiki/pub/System/JavascriptFiles/foswikiString.js"></script><!--JavascriptFiles/foswikiString-->
<script type='text/javascript' src='/foswiki/pub/System/JQTablePlugin/jquery.tablesorter.min.js?version=2.0.3'></script><!--JQUERYPLUGIN::TABLESORTER-->
<meta name='foswiki.FlexPaperPlugin.viewer' content='http://localhost/foswiki/pub/System/FlexPaperPlugin/FlexPaperViewer.swf' /><!--FLEXPAPER::META-->
<script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN--><script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/plugins/livequery/jquery.livequery.js?version=1.1.1'></script><!--JQUERYPLUGIN::LIVEQUERY--><script type='text/javascript' src='/foswiki/pub/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js?version=2.01'></script><!--JQUERYPLUGIN::FOSWIKI--><script type="text/javascript" src="/foswiki/pub/System/JavascriptFiles/foswikiPref.js"></script><!--JavascriptFiles/foswikiPref--><script type="text/javascript" src="/foswiki/pub/System/JavascriptFiles/foswikiString.js"></script><!--JavascriptFiles/foswikiString--><script type='text/javascript' src='/foswiki/pub/System/JQTablePlugin/jquery.tablesorter.min.js?version=2.0.3'></script><!--JQUERYPLUGIN::TABLESORTER--><meta name='foswiki.FlexPaperPlugin.viewer' content='http://xxxxxxxxxxx/foswiki/pub/System/FlexPaperPlugin/FlexPaperViewer.swf' /><!--FLEXPAPER::META--> .........    ......... <div id='flexPaper545' class='jqFlexPaper {source:"/foswiki/pub/Main/WikiGo/_flexpaper_TermPaper.swf", width:"800", height:"600", Scale:"1.0", FitPageOnLoad:false, FitWidthOnLoad:true, PrintToolsVisible:true, ViewModeToolsVisible:true, ZoomToolsVisible:true, FullScreenVisible:true, NavToolsVisible:true, CursorToolsVisible:true, SearchToolsVisible:true, localeChain:"en_US"}'></div><p />   

there also is truly my attached file located on my webserver @ /foswiki/pub/Main/WikiGo/TermPaper.pdf also I see _flexpaper_TermPaper.swf

I also have the same result on a vanilla Foswiki 1.1.2. Note that I may not know what i'm talking about, but it seems to have to do with jquery. I hacked the plugin to use "standard" javascript and I can get it to work that way. in Foswiki-1.1.2/lib/Foswiki/Plugins/FlexPaperPlugin/ around line 212
  my $id = "flexPaper".Foswiki::Plugins::JQueryPlugin::Plugins::getRandom();
  my $swfUrl = $Foswiki::cfg{PubUrlPath}."/".$theWeb."/".$theTopic."/_flexpaper_".$fileBase.".swf";
  my $result = "<noautolink><div id='$id' class='jqFlexPaper {".
    "source:\"$swfUrl\", ".
    "width:\"$theWidth\", ".
    "height:\"$theHeight\", ".
    "Scale:\"$theScale\", ".
    "FitPageOnLoad:$fitPageOnLoad, ".
    "FitWidthOnLoad:$fitWidthOnLoad, ".
    "PrintToolsVisible:$thePrintTools, ".
    "ViewModeToolsVisible:$theViewModeTools, ".
    "ZoomToolsVisible:$theZoomTools, ".
    "FullScreenVisible:$theFullScreenTools, ".
    "NavToolsVisible:$theNavTools, ".
    "CursorToolsVisible:$theCursorTools, ".
    "SearchToolsVisible:$theSearchTools, ".

  my $id = "flexPaper".Foswiki::Plugins::JQueryPlugin::Plugins::getRandom();
  my $swfUrl = $Foswiki::cfg{PubUrlPath}."/".$theWeb."/".$theTopic."/_flexpaper_".$fileBase.".swf";
  my $result = "<noautolink><script type=\"text/javascript\"> \n".
    "var flashvars = { \n".
    "SwfFile:escape(\"$swfUrl\"), \n".
    "Scale:\"$theScale\", \n".
    "ZoomTransition:\"easeOut\", \n".
    "ZoomTime:0.5, \n".
    "ZoomInterval:0.1, \n".
    "FitPageOnLoad:$fitPageOnLoad, \n".
    "FitWidthOnLoad:$fitWidthOnLoad, \n".
    "ViewModeToolsVisible:$theViewModeTools, \n".
    "PrintToolsVisible:$thePrintTools, \n".
    "ZoomToolsVisible:$theZoomTools, \n".
    "FullScreenVisible:$theFullScreenTools, \n".
    "NavToolsVisible:$theNavTools, \n".
    "CursorToolsVisible:$theCursorTools, \n".
    "SearchToolsVisible:$theSearchTools, \n".
    "localeChain:\"$locale\"\n}; \n".

    "var params = {}; params.quality = \"high\"; params.bgcolor = \"#ffffff\"; params.allowscriptaccess = \"sameDomain\"; params.allowfullscreen = \"true\"; \n".
    "var attributes = {}; = \"FlexPaperViewer\"; = \"FlexPaperViewer\"; \n".
    "swfobject.embedSWF(\"%PUBURL%/%SYSTEMWEB%/FlexPaperPlugin/FlexPaperViewer.swf\", \"$id\", \"$theWidth\", \"$theHeight\", \"9.0.0\", \"\", flashvars, params, attributes); \n".
    "</script></noautolink> \n".
    "<noautolink><div id='$id'></div></noautolink>";

Hope it helps.

-- MathieuGallant - 28 Feb 2011

QuestionForm edit

Subject Using an extension
Extension FlexPaperPlugin
Version Foswiki 1.1.2
Status Asked
Topic revision: r2 - 28 Feb 2011, MathieuGallant - This page was cached on 04 Jun 2020 - 00:01.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy