org.silverpeas.viewer.util
Class SwfUtil

java.lang.Object
  extended by org.silverpeas.exec.ExternalExecution
      extended by org.silverpeas.viewer.util.SwfUtil

public class SwfUtil
extends ExternalExecution

Some centralized tools to use SwfTools API

Author:
Yohann Chastagnier

Nested Class Summary
 
Nested classes/interfaces inherited from class org.silverpeas.exec.ExternalExecution
ExternalExecution.Config
 
Field Summary
static String PAGE_FILENAME_SEPARATOR
           
static String SWF_DOCUMENT_EXTENSION
           
 
Constructor Summary
SwfUtil()
           
 
Method Summary
static void fromPdfToImage(File fileIn, File fileOut)
          Converts a PDF file into an image file.
static void fromPdfToSwf(File fileIn, File fileOut)
          Converts a PDF file into a SWF file.
static void fromPdfToSwf(File fileIn, File fileOut, boolean oneFilePerPage)
          Converts a PDF file into a SWF file.
static void fromPdfToSwf(File fileIn, File fileOut, boolean oneFilePerPage, String endingCommand)
          Converts a PDF file into a SWF file.
static DocumentInfo getPdfDocumentInfo(File pdfFile)
          Return some document info from a PDF file
static boolean isPdfToImageActivated()
          Indicates if swfrender0 tool is activated
static boolean isPdfToSwfActivated()
          Indicates if pdf2swf tool is activated
 
Methods inherited from class org.silverpeas.exec.ExternalExecution
exec, exec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SWF_DOCUMENT_EXTENSION

public static final String SWF_DOCUMENT_EXTENSION
See Also:
Constant Field Values

PAGE_FILENAME_SEPARATOR

public static final String PAGE_FILENAME_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

SwfUtil

public SwfUtil()
Method Detail

isPdfToSwfActivated

public static boolean isPdfToSwfActivated()
Indicates if pdf2swf tool is activated

Returns:

isPdfToImageActivated

public static boolean isPdfToImageActivated()
Indicates if swfrender0 tool is activated

Returns:

fromPdfToImage

public static void fromPdfToImage(File fileIn,
                                  File fileOut)
Converts a PDF file into an image file.

Parameters:
fileIn - the pdf file
fileOut - the image file

fromPdfToSwf

public static void fromPdfToSwf(File fileIn,
                                File fileOut)
Converts a PDF file into a SWF file.

Parameters:
fileIn - the pdf file
fileOut - the swf file

fromPdfToSwf

public static void fromPdfToSwf(File fileIn,
                                File fileOut,
                                boolean oneFilePerPage)
Converts a PDF file into a SWF file.

Parameters:
fileIn - the pdf file
fileOut - the swf file
oneFilePerPage - if true it activates one swf file per page

fromPdfToSwf

public static void fromPdfToSwf(File fileIn,
                                File fileOut,
                                boolean oneFilePerPage,
                                String endingCommand)
Converts a PDF file into a SWF file.

Parameters:
fileIn - the pdf file
fileOut - the swf file
oneFilePerPage - if true it activates one swf file per page
endingCommand -

getPdfDocumentInfo

public static DocumentInfo getPdfDocumentInfo(File pdfFile)
Return some document info from a PDF file

Parameters:
pdfFile -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.