jvx.loader

## Class PgPdfLoader

- java.lang.Object
- - jv.loader.PgAbstractLoader
  - - jvx.loader.PgPdfLoader

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgPdfLoader
      extends PgAbstractLoader

  Loader for writing PDF files containing geometries in U3D format, u3d is specified by the ecma standard ECMA-363.
  Author:
    Ulrich Reitebuch
  Version:
    09.03.15, 2.00 revised (kp) Moved to jvx.loader from dev.loader.
    10.05.06, 1.00 created (ur)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FORMAT_A3_LANDSCAPE` ID for A4 medium in "Landscape" orientation.
    `static int` | `FORMAT_A3_PORTRAIT` ID for A4 medium in "Portrait" orientation.
    `static int` | `FORMAT_A4_LANDSCAPE` ID for A4 medium in "Landscape" orientation.
    `static int` | `FORMAT_A4_PORTRAIT` ID for A4 medium in "Portrait" orientation.

    - ### Fields inherited from interface jv.loader.PgLoaderIf

      `GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgPdfLoader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PgJvxSrc[]` | `read(java.io.BufferedReader in)` Read geometry file.
    `PgJvxSrc[]` | `read(java.lang.String fileName)`
    `void` | `setContents(java.lang.String text)` Add textual contents to the PDF document.
    `void` | `setHeader(java.lang.String text)` Set text of header for the PDF document.
    `void` | `setMediaBox(double xMin, double yMin, double xMax, double yMax)` Set size of page medium; unit: 1/72 inch.
    `void` | `setMediaBox(int id)` Set size of page medium.
    `boolean` | `write(java.io.DataOutputStream outWriter, PgJvxSrc[] geomArr)` Write an array of geometries to a file.
    `boolean` | `write(java.io.Writer writer, PgJvxSrc[] geomArr)` Write an array of geometries into an output stream writer.

    - ### Methods inherited from class jv.loader.PgAbstractLoader

      `getAnimations, getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FORMAT_A4_PORTRAIT

          public static final int FORMAT_A4_PORTRAIT

      ID for A4 medium in "Portrait" orientation.
      See Also:
        Constant Field Values

    - #### FORMAT_A4_LANDSCAPE

          public static final int FORMAT_A4_LANDSCAPE

      ID for A4 medium in "Landscape" orientation.
      See Also:
        Constant Field Values

    - #### FORMAT_A3_PORTRAIT

          public static final int FORMAT_A3_PORTRAIT

      ID for A4 medium in "Portrait" orientation.
      See Also:
        Constant Field Values

    - #### FORMAT_A3_LANDSCAPE

          public static final int FORMAT_A3_LANDSCAPE

      ID for A4 medium in "Landscape" orientation.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PgPdfLoader

          public PgPdfLoader()

  - ### Method Detail

    - #### setMediaBox

          public void setMediaBox(double xMin,
                                  double yMin,
                                  double xMax,
                                  double yMax)

      Set size of page medium; unit: 1/72 inch.

    - #### setMediaBox

          public void setMediaBox(int id)

      Set size of page medium.

    - #### setHeader

          public void setHeader(java.lang.String text)

      Set text of header for the PDF document.

    - #### setContents

          public void setContents(java.lang.String text)

      Add textual contents to the PDF document.

    - #### read

          public PgJvxSrc[] read(java.lang.String fileName)

      Author:
        Konrad Polthier
      Version:
        20.02.01, 2.00 revised (kp) Method body moved to read(BufferedReader).
        04.03.00, 1.50 revised (kp) Argument geometry removed, just fill private arrays.
        00.00.98, 1.00 created (kp)

    - #### read

          public PgJvxSrc[] read(java.io.BufferedReader in)

      Read geometry file.
      Specified by:
        `read` in interface `PgLoaderIf`
      Overrides:
        `read` in class `PgAbstractLoader`
      Parameters:
        `in` - BufferedReader to read textual data from.
      Returns:
        Array of JVX geometries.
      See Also:
        `PgAbstractLoader.write(Writer, PgJvxSrc [])`
      Author:
        Konrad Polthier
      Version:
        20.02.01, 1.00 revised (kp)
        20.02.01, 1.00 created (kp) Method body from former version read(String fileName).

    - #### write

          public boolean write(java.io.Writer writer,
                               PgJvxSrc[] geomArr)
                        throws java.io.IOException

      Write an array of geometries into an output stream writer.

      Numbers with absolute value less than `jv.vecmath.PuMath#EPS` are shown as zero. This avoids the annoying fact that double precision numbers fill the whole text area hiding the exponent, which hides their small value.

      Specified by:
        `write` in interface `PgLoaderIf`
      Overrides:
        `write` in class `PgAbstractLoader`
      Parameters:
        `writer` - Write all data to this stream
        `geomArr` - Array with geometries to save
      Returns:
        `true` on success.
      Throws:
        `java.io.IOException`
      See Also:
        `read(BufferedReader)`
      Version:
        09.09.02, 2.00 revised (kp) Exchange vn and vt, remove vd vector fields to comply with OBJ format.
        10.05.02, 1.30 revised (ep) Save first vector field if existent and vertex based as 'vd'.
        10.06.01, 1.20 revised (kp) Save array of geometries instead of single geometry.
        22.08.99, 1.10 revised (kp) Number with abs value less than PuMath.EPS are shown as zero.
        22.08.99, 1.00 created (kp)

    - #### write

          public boolean write(java.io.DataOutputStream outWriter,
                               PgJvxSrc[] geomArr)

      Write an array of geometries to a file.
      Specified by:
        `write` in interface `PgLoaderIf`
      Overrides:
        `write` in class `PgAbstractLoader`
      Parameters:
        `outWriter` - Write all data to this stream
        `geomArr` - Array with geometries to save
      Returns:
        `true` on success.
      See Also:
        `PgAbstractLoader.read(BufferedReader)`, `PgAbstractLoader.read(DataInputStream)`, `PgAbstractLoader.write(Writer, PgJvxSrc [])`
      Version:
        10.05.06, 1.00 created (ur)

"

The software JavaView? is copyright protected. All Rights Reserved.
"