SOA
© 2004 SoS Group
All Rights Reserved

sos.koa
Class ViewPdf

java.lang.Object
  extended bysos.koa.ViewPdf

class ViewPdf
extends java.lang.Object

A static class used to execute a native PDF viewer on a specific PDF file generated by the KOA application. one or more districts.

If the user wants to specify a particular PDF viewer, they should use the PdfViewer property, e.g.,

    java -DPdfViewer=my_viewer sos.koa.MenuPanel
 

Version:
$Id: ViewPdf.java,v 1.9 2004/05/04 19:51:52 martijno Exp $
Author:
Joe Kiniry (kiniry@cs.kun.nl)

Field Summary
private static java.lang.String[] DEFAULT_PDF_VIEWERS
          An ordered list of pre-defined PDF viewers.
private static java.lang.String PDF_VIEW_PROPERTY
          The command-line Java property that is used to determine a user-defined PDF previewer.
 
Constructor Summary
(package private) ViewPdf()
          This class should never be instantiated.
 
Method Summary
static void main(java.lang.String[] some_args)
          A test routine.
(package private) static void showPdf(java.io.File a_pdf_file)
          Display in a PDF viewer the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDF_VIEW_PROPERTY

private static final java.lang.String PDF_VIEW_PROPERTY
The command-line Java property that is used to determine a user-defined PDF previewer.

See Also:
Constant Field Values

DEFAULT_PDF_VIEWERS

private static final java.lang.String[] DEFAULT_PDF_VIEWERS
An ordered list of pre-defined PDF viewers. The order is based upon some combination of the capability and likelihood of each viewer being installed.

Constructor Detail

ViewPdf

ViewPdf()
This class should never be instantiated.

Method Detail

showPdf

static void showPdf(java.io.File a_pdf_file)
             throws java.io.IOException
Display in a PDF viewer the specified file. If the file does not exist, is not readable, etc., then this method will simply return.

Parameters:
a_pdf_file - the file to show to the user.
Throws:
java.io.IOException - if something goes seriously wrong while reading the specified PDF file.

main

public static void main(java.lang.String[] some_args)
A test routine. Will show the specified files, or if no files are specified, the file "./samples/KOA_rapport.pdf"

Parameters:
some_args - a list of PDF files to preview.

SOA
© 2004 SoS Group
All Rights Reserved