Plugin Document2Flash


 

Plugin Document2Flash
This extension allows to browse a document as a book with page flipping.

Authors

Anyware Services

Most recent version

1.1.0

Tracking issues

https://issues.ametys.org/browse/DOCTOFLASH

Download

Latest version 

  1. Presentation
  2. User manual
  3. Integrator manual
    1. Customization
  4. Installation and download
    1. Download
    2. Installation / Integration
  5. Compatibility

Presentation

The Document2Flash plugin allows to make a document browsable on-line, through a "book-like" look and feel. Currently, only PDF documents are supported.

User manual

You can insert a link allowing to view a PDF document which is located in the resources explorer, or send a PDF document from your computer.
To do this, when editing a rich text field, open the "Interactive PDF" menu and select one of the two available options: "Local PDF file" or "Shared PDF file".


interactive-menu-en.png

  • The first option, "Local PDF file", opens the "content attachments" dialog box. You can upload a PDF file located on your computer, or select one of the existing content attachments.


attachments-en.png

  • The second option, "Shared PDF file", opens a dialog box showing the PDF files contained in the resources explorer. Select the PDF file you want to make available.


shared-pdf-en.png

The result in the content is a link to the selected PDF document.


content-view-en.png

When the user clicks on this link, the book-like interface opens in a new tab or window.


pageflip-singlepage-en.png

The controls available in the book interface are:

  • Browsing the document by either making a flipping motion (dragging the page end toward the other end), clicking on the left, right, first page and last page arrows, or going directly to a given page by entering its number.
  • Switching between ideal size (adapted to the screen) and original size by clicking respectively on the magnifying glass and "1:1" icons.

Integrator manual

Customization

The document browsing interface can be customized in a skin by overriding the following files:

  • pages/flashpageflip/book.xsl: this file controls the browsing interface's HTML structure, including references to CSS and JS files.
  • pages/flashpageflip/pages.xsl: this file generates the page list with some parameters.
  • pages/flashpageflip/lang.xsl: this file contains all the string literals used in by the magazine interface.

The overriding files can be placed in the same locations as when overriding a service, that is: skins/MYSKIN/services/document2flash/pages/flashpageflip/pages.xsl

Here is a sample of a stylesheet overriding pages.xsl in the skin, changing the colors:

<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
    
    <xsl:import href="plugin:document2flash://pages/flashpageflip/pages.xsl"/>
    
    <xsl:template name="properties">
        <xsl:attribute name="width"><xsl:value-of select="$imageWidth"/></xsl:attribute>
        <xsl:attribute name="height"><xsl:value-of select="$imageHeight"/></xsl:attribute>
        <xsl:attribute name="bgcolor">ff7777</xsl:attribute>
        <xsl:attribute name="loadercolor">ff7777</xsl:attribute>
        <xsl:attribute name="panelcolor">9ab4cf</xsl:attribute>
        <xsl:attribute name="buttoncolor">004381</xsl:attribute>
        <xsl:attribute name="textcolor">ff7777</xsl:attribute>
    </xsl:template>
    
</xsl:stylesheet>

Installation and download

Download

Installation / Integration

  • Add the plugin JAR in the WEB-INF/lib directory of your Ametys application.
  • Add the org.ametys.pdf2flash.editor.Insert editor button in the org.ametys.cms.content.EditionTab tab of your cms-ribbon-*.xmlfiles:

    <layout align="top" size="small">
        <control id="org.ametys.inlinemedia.editor.Insert.flash"/>
        <control id="org.ametys.inlinemedia.editor.Insert.video"/>
        <control id="org.ametys.pdf2flash.editor.Insert"/>
    </layout>
    
  • Restart the server
  • Add the right to insert an animated PDF to users.

Compatibility

Plugin version

1.0.x

1.1.x

Ametys 3.0.x

 

 

Ametys 3.1.x

 

 

Ametys 3.2.x


tick_16.png

 

Ametys 3.3.x

 


tick_16.png

Back to top