Re: How to customize the flash Webviewer? Especially , I want to disable the textselection button.

37 views
Skip to first unread message

Support

unread,
Mar 26, 2013, 12:43:10 PM3/26/13
to pdfne...@googlegroups.com
 

First, please read carefully the README_FIRST.txt file that is included with the download.

 

You listed some error messages, such as...

D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\ThumbnailItem.as(30): col: 40 Error: Type was not found or was not a compile-time constant: DocumentViewer.
public function ThumbnailItem(viewer:DocumentViewer, page:uint, width:Number, height:Number)

 

It looks like you're not including the WebViewer.swc file (located in Samples\ReaderControl\lib folder).

Your project then includes the ReaderControl.swc generated by the ReaderControl project (loacted in Samples\ReaderControl\bin folder).

 

If you're using FlashBuilder, then these instructions work fine for us.

1. Extract to FlashWebViewerSDK folder

2. Open Flash Builder

3. Switch to new workspace and set to the directory where FlashWebViewerSDK was extracted

4. Select File -> "Import Flash Builder Project..."

5. Select "Project Folder:" radio button

6. Browse to "Samples\ReaderControl"

7. Select Finish.

8. Repeat steps 4-7 but for "Samples\WebViewerDemo"

9. Copy output of "Samples\WebViewerDemo\bin-debug" to your server. For example "c:\www_root\webviewer"

10. Load webpage "http://localhost/webviewer/WebViewer.html" in your browser.

 

As for customization, all source code that we provide is already included. See "Samples\ReaderControl\src\com\pdftron\webviewer\ReaderControl.mxml" as your starting point. Everything you want to change is there, or can be found from there. Also the documentation folder shows the API that ReaderControl uses.

 
 

On Sunday, March 24, 2013 8:22:10 PM UTC-7, ironwire wrote:
Now I am evaluating your products. I downlaoded the WebViewer demo samples, and I think they are wonderful to match our requirements. But I must customize the tool bar panel of the webviewer. now I customized the html5 webviewer according to some posts here, and I am trying to customized the flash vebviewer. and i had got the FlashWebViewerSDK.zip here, and dowloaded the Flashdevelop to try to build the projects in the zip file, but i always failed.I almost know nothing about the flash development, But the errors returned may tell me you guys forgot to wrap some files in the zip file. Below is the errors returned. Can you give me some glue to resolve the problems? Thanks in advance.

D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\ThumbnailItem.as(30): col: 40 Error: Type was not found or was not a compile-time constant: DocumentViewer.
public function ThumbnailItem(viewer:DocumentViewer, page:uint, width:Number, height:Number)
^
D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\ThumbnailItem.as(104): col: 39 Error: Type was not found or was not a compile-time constant: OnLoadThumbnailAsyncCallbackArgs.
protected function onThumbnail(args:OnLoadThumbnailAsyncCallbackArgs):void
^
D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\SearchResultItem.as(38): col: 84 Error: Type was not found or was not a compile-time constant: Quad.
public function SearchResultItem(ambient:String, result:String, page:uint, quads:Vector.<Quad>)
^
D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\SearchResultItem.as(1): col: 1 Error: Type was not found or was not a compile-time constant: Quad.
package com.pdftron.webviewer
^
D:\FlashWebViewerSDK\Samples\ReaderControl\src\com\pdftron\webviewer\SearchResultItem.as(1): col: 1 Error: Type was not found or was not a compile-time constant: Quad.
package com.pdftron.webviewer
^
Build halted with errors (fcsh).
(fcsh)
 

Reply all
Reply to author
Forward
0 new messages