com.pdflib

## Class pdflib

- java.lang.Object
- - com.pdflib.pdflib

- All Implemented Interfaces:
    IpCOS

      public final class pdflib
      extends java.lang.Object
      implements IpCOS

  PDFlib -- a library for generating PDF on the fly. Note that this is only a syntax summary. It covers several products: PDFlib, PDFlib+PDI, and PDFlib Personalization Server (PPS). Some methods will work only if a suitable license key for the product class has been provided. A comparison which details function availability in different products is available at http://www.pdflib.com. For complete information please refer to the PDFlib API reference manual which is available as PDF file in the "doc" directory of the PDFlib distribution.
  Version:
    11.0.0
  Author:
    PDFlib GmbH

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `pdflib()` Create a new PDFlib object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate_item(int id)` Activate a previously created structure element or other content item.
    `void` | `add_nameddest(java.lang.String name, java.lang.String optlist)` Create a named destination on a page in the document.
    `int` | `add_path_point(int path, double x, double y, java.lang.String type, java.lang.String optlist)` Add a point to a new or existing path object.
    `int` | `add_portfolio_file(int folder, java.lang.String filename, java.lang.String optlist)` Add a file to a portfolio folder or a package.
    `int` | `add_portfolio_folder(int parent, java.lang.String foldername, java.lang.String optlist)` Add a folder to a new or existing portfolio.
    `int` | `add_table_cell(int table, int column, int row, java.lang.String text, java.lang.String optlist)` Add a cell to a new or existing table.
    `int` | `add_textflow(int textflow, java.lang.String text, java.lang.String optlist)` Create a Textflow object, or add text and explicit options to an existing Textflow.
    `void` | `align(double dx, double dy)` Align the coordinate system with a relative vector.
    `void` | `arc(double x, double y, double r, double alpha, double beta)` Draw a counterclockwise circular arc segment.
    `void` | `arcn(double x, double y, double r, double alpha, double beta)` Draw a clockwise circular arc segment.
    `int` | `begin_document(java.lang.String filename, java.lang.String optlist)` Create a new PDF file subject to various options.
    `void` | `begin_dpart(java.lang.String optlist)` Create a new node in the document part hierarchy (requires PDF/VT or PDF 2.0).
    `void` | `begin_font(java.lang.String fontname, double a, double b, double c, double d, double e, double f, java.lang.String optlist)` Start a Type 3 font definition.
    `void` | `begin_glyph_ext(int uv, java.lang.String optlist)` Start a glyph definition for a Type 3 font.
    `int` | `begin_item(java.lang.String tagname, java.lang.String optlist)` Open a structure element or other content item with attributes supplied as options.
    `void` | `begin_layer(int layer)` Start a layer for subsequent output on the page.
    `void` | `begin_mc(java.lang.String tagname, java.lang.String optlist)` Begin a marked content sequence with optional properties.
    `void` | `begin_page_ext(double width, double height, java.lang.String optlist)` Add a new page to the document, and specify various options.
    `int` | `begin_pattern_ext(double width, double height, java.lang.String optlist)` Start a pattern definition with options.
    `int` | `begin_template_ext(double width, double height, java.lang.String optlist)` Start a template definition.
    `void` | `circle(double x, double y, double r)` Draw a circle.
    `void` | `circular_arc(double x1, double y1, double x2, double y2)` Draw a circular arc segment defined by three points.
    `void` | `clip()` Use the current path as clipping path, and terminate the path.
    `void` | `close_font(int font)` Close an open font handle which has not yet been used in the document.
    `void` | `close_graphics(int graphics)` Close vector graphics.
    `void` | `close_image(int image)` Close an image or template.
    `void` | `close_pdi_document(int doc)` Close all open PDI page handles, and close the input PDF document.
    `void` | `close_pdi_page(int page)` Close the page handle and free all page-related resources.
    `void` | `closepath_fill_stroke()` Close the path, fill, and stroke it.
    `void` | `closepath_stroke()` Close the path, and stroke it.
    `void` | `closepath()` Close the current path.
    `void` | `concat(double a, double b, double c, double d, double e, double f)` Apply a transformation matrix to the current coordinate system.
    `void` | `continue_text(java.lang.String text)` Print text at the next line.
    `java.lang.String` | `convert_to_unicode(java.lang.String inputformat, byte[] inputstring, java.lang.String optlist)` Convert a string in an arbitrary encoding to a Unicode string in various formats.
    `int` | `create_3dview(java.lang.String username, java.lang.String optlist)` Create a 3D view.
    `int` | `create_action(java.lang.String type, java.lang.String optlist)` Create an action which can be applied to various objects and events.
    `void` | `create_annotation(double llx, double lly, double urx, double ury, java.lang.String type, java.lang.String optlist)` Create an annotation on the current page.
    `int` | `create_bookmark(java.lang.String text, java.lang.String optlist)` Create a bookmark subject to various options.
    `int` | `create_devicen(java.lang.String optlist)` Create a DeviceN colorspace with an arbitrary number of color components.
    `void` | `create_field(double llx, double lly, double urx, double ury, java.lang.String name, java.lang.String type, java.lang.String optlist)` Create a new form field or fill an imported form field.
    `void` | `create_fieldgroup(java.lang.String name, java.lang.String optlist)` Create a form field group subject to various options.
    `int` | `create_gstate(java.lang.String optlist)` Create a graphics state object subject to various options.
    `void` | `create_pvf(java.lang.String filename, byte[] data, java.lang.String optlist)` Create a named virtual read-only file from data provided in memory.
    `int` | `create_textflow(java.lang.String text, java.lang.String optlist)` Create a Textflow object from text contents, inline options, and explicit options.
    `void` | `curveto(double x1, double y1, double x2, double y2, double x3, double y3)` Draw a Bezier curve from the current point, using 3 more control points.
    `int` | `define_layer(java.lang.String name, java.lang.String optlist)` Create a new layer definition.
    `void` | `delete_path(int path)` Delete a path object.
    `int` | `delete_pvf(java.lang.String filename)` Delete a named virtual file and free its data structures (but not the contents).
    `void` | `delete_table(int table, java.lang.String optlist)` Delete a table and all associated data structures.
    `void` | `delete_textflow(int textflow)` Delete a textflow and all associated data structures.
    `void` | `delete()` Delete a PDFlib object and free all internal resources.
    `int` | `download(java.lang.String filename, java.lang.String optlist)` Download data from a network resource and store it in a disk-based or virtual file.
    `void` | `draw_path(int path, double x, double y, java.lang.String optlist)` Draw a path object.
    `void` | `ellipse(double x, double y, double rx, double ry)` Draw an ellipse.
    `void` | `elliptical_arc(double x, double y, double rx, double ry, java.lang.String optlist)` Draw an elliptical arc segment from the current point.
    `void` | `encoding_set_char(java.lang.String encoding, int slot, java.lang.String glyphname, int uv)` Add a glyph name and/or Unicode value to a custom 8-bit encoding.
    `void` | `end_document(java.lang.String optlist)` Close the generated PDF document and apply various options.
    `void` | `end_dpart(java.lang.String optlist)` Close a node in the document part hierarchy (requires PDF/VT or PDF 2.0).
    `void` | `end_font()` Terminate a Type 3 font definition.
    `void` | `end_glyph()` Terminate a glyph definition for a Type 3 font.
    `void` | `end_item(int id)` Close a structure element or other content item.
    `void` | `end_layer()` Deactivate all active layers.
    `void` | `end_mc()` End the least recently opened marked content sequence.
    `void` | `end_page_ext(java.lang.String optlist)` Finish a page, and apply various options.
    `void` | `end_pattern()` Finish a pattern definition.
    `void` | `end_template_ext(double width, double height)` Finish a template definition.
    `void` | `endpath()` End the current path without filling or stroking it.
    `int` | `fill_graphicsblock(int page, java.lang.String blockname, int graphics, java.lang.String optlist)` Fill a graphics block with variable data according to its properties.
    `int` | `fill_imageblock(int page, java.lang.String blockname, int image, java.lang.String optlist)` Fill an image block with variable data according to its properties.
    `int` | `fill_pdfblock(int page, java.lang.String blockname, int contents, java.lang.String optlist)` Fill a PDF block with variable data according to its properties.
    `void` | `fill_stroke()` Fill a Textline or Textflow Block with variable data according to its properties.
    `int` | `fill_textblock(int page, java.lang.String blockname, java.lang.String text, java.lang.String optlist)` Fill a Textline or Textflow Block with variable data according to its properties.
    `void` | `fill()` Fill the interior of the path with the current fill color.
    `void` | `fit_graphics(int graphics, double x, double y, java.lang.String optlist)` Place vector graphics on a content stream, subject to various options.
    `void` | `fit_image(int image, double x, double y, java.lang.String optlist)` Place an image or template on the page, subject to various options.
    `void` | `fit_pdi_page(int page, double x, double y, java.lang.String optlist)` Place an imported PDF page on the page subject to various options.
    `java.lang.String` | `fit_table(int table, double llx, double lly, double urx, double ury, java.lang.String optlist)` Fully or partially place a table on the page.
    `java.lang.String` | `fit_textflow(int textflow, double llx, double lly, double urx, double ury, java.lang.String optlist)` Format the next portion of a Textflow.
    `void` | `fit_textline(java.lang.String text, double x, double y, java.lang.String optlist)` Place a single line of text at position (x, y) subject to various options.
    `java.lang.String` | `get_apiname()` Get the name of the API method which threw the last exception or failed.
    `byte[]` | `get_buffer()` Get the contents of the PDF output buffer.
    `java.lang.String` | `get_errmsg()` Get the text of the last thrown exception or the reason of a failed method call.
    `int` | `get_errnum()` Get the number of the last thrown exception or the reason of a failed method call.
    `double` | `get_option(java.lang.String keyword, java.lang.String optlist)` Retrieve some option or other value.
    `java.lang.String` | `get_string(int idx, java.lang.String optlist)` Retrieve a string value.
    `double` | `info_font(int font, java.lang.String keyword, java.lang.String optlist)` Query detailed information about a loaded font.
    `double` | `info_graphics(int graphics, java.lang.String keyword, java.lang.String optlist)` Format vector graphics and query metrics and other properties.
    `double` | `info_image(int image, java.lang.String keyword, java.lang.String optlist)` Format an image and query metrics and other image properties.
    `double` | `info_matchbox(java.lang.String boxname, int num, java.lang.String keyword)` Query information about a matchbox on the current page.
    `double` | `info_path(int path, java.lang.String keyword, java.lang.String optlist)` Query the results of drawing a path object without actually drawing it.
    `double` | `info_pdi_page(int page, java.lang.String keyword, java.lang.String optlist)` Perform formatting calculations for a PDI page and query the resulting metrics.
    `double` | `info_pvf(java.lang.String filename, java.lang.String keyword)` Query properties of a virtual file or the PDFlib Virtual Filesystem (PVF).
    `double` | `info_table(int table, java.lang.String keyword)` Query table information related to the most recently placed table instance.
    `double` | `info_textflow(int textflow, java.lang.String keyword)` Query the current state of a Textflow.
    `double` | `info_textline(java.lang.String text, java.lang.String keyword, java.lang.String optlist)` Perform textline formatting without creating output and query the resulting metrics.
    `void` | `lineto(double x, double y)` Draw a line from the current point to another point.
    `int` | `load_3ddata(java.lang.String filename, java.lang.String optlist)` Load a 3D model from a disk-based or virtual file.
    `int` | `load_asset(java.lang.String type, java.lang.String filename, java.lang.String optlist)` Load a multimedia asset or file attachment from a file or URL.
    `int` | `load_font(java.lang.String fontname, java.lang.String encoding, java.lang.String optlist)` Search for a font and prepare it for later use.
    `int` | `load_graphics(java.lang.String type, java.lang.String filename, java.lang.String optlist)` Open a disk-based or virtual vector graphics file subject to various options.
    `int` | `load_iccprofile(java.lang.String profilename, java.lang.String optlist)` Search for an ICC profile, and prepare it for later use.
    `int` | `load_image(java.lang.String imagetype, java.lang.String filename, java.lang.String optlist)` Open a disk-based or virtual image file subject to various options.
    `int` | `makespotcolor(java.lang.String spotname)` Find a built-in spot color name, or make a named spot color from the current fill color.
    `void` | `mc_point(java.lang.String tagname, java.lang.String optlist)` Add a marked content point with optional properties.
    `void` | `moveto(double x, double y)` Set the current point for graphics output.
    `int` | `open_pdi_document(java.lang.String filename, java.lang.String optlist)` Open a disk-based or virtual PDF document and prepare it for later use.
    `int` | `open_pdi_page(int doc, int pagenumber, java.lang.String optlist)` Prepare a page for later use with PDF_fit_pdi_page().
    `void` | `pcos_close_document(int doc, java.lang.String optlist)` Close PLOP input document via the IpCOS interface.
    `double` | `pcos_get_number(int doc, java.lang.String path)` Get the value of a pCOS path with type number or boolean.
    `byte[]` | `pcos_get_stream(int doc, java.lang.String optlist, java.lang.String path)` Get the contents of a pCOS path with type stream, fstream, or string.
    `java.lang.String` | `pcos_get_string(int doc, java.lang.String path)` Get the value of a pCOS path with type name, number, string, or boolean.
    `int` | `pcos_open_document(java.lang.String filename, java.lang.String optlist)` Open a disk-based or virtual PDF document via the IpCOS interface.
    `void` | `poca_delete(int container, java.lang.String optlist)` Delete a PDF container object.
    `void` | `poca_insert(int container, java.lang.String optlist)` Insert a simple or container object in a PDF container object.
    `int` | `poca_new(java.lang.String optlist)` Create a new PDF container object of type dictionary or array and insert objects.
    `void` | `poca_remove(int container, java.lang.String optlist)` Remove a simple or container object from a PDF container object.
    `int` | `process_pdi(int doc, int page, java.lang.String optlist)` Process certain elements of an imported PDF document.
    `void` | `rect(double x, double y, double width, double height)` Draw a rectangle.
    `void` | `restore()` Restore the most recently saved graphics state from the stack.
    `void` | `resume_page(java.lang.String optlist)` Resume a page to add more content to it.
    `void` | `rotate(double phi)` Rotate the coordinate system.
    `void` | `save()` Save the current graphics state to a stack.
    `void` | `scale(double sx, double sy)` Scale the coordinate system.
    `void` | `set_graphics_option(java.lang.String optlist)` Set one or more graphics appearance options.
    `void` | `set_gstate(int gstate)` Activate a graphics state object.
    `void` | `set_info(java.lang.String key, java.lang.String value)` Fill document information field key with value.
    `void` | `set_layer_dependency(java.lang.String type, java.lang.String optlist)` Define layer relationships.
    `void` | `set_option(java.lang.String optlist)` Set one or more global options.
    `void` | `set_text_option(java.lang.String optlist)` Set one or more text filter or text appearance options for simple text output methods.
    `void` | `set_text_pos(double x, double y)` Set the position for simple text output on the page.
    `void` | `setcolor(java.lang.String fstype, java.lang.String colorspace, double c1, double c2, double c3, double c4)` Set the color space and color for the graphics and text state..
    `void` | `setfont(int font, double fontsize)` Set the current font in the specified size.
    `void` | `setlinewidth(double width)` Set the current linewidth.
    `void` | `setmatrix(double a, double b, double c, double d, double e, double f)` Explicitly set the current transformation matrix.
    `int` | `shading_pattern(int shading, java.lang.String optlist)` Define a shading pattern using a shading object.
    `int` | `shading(java.lang.String type, double x0, double y0, double x1, double y1, double c1, double c2, double c3, double c4, java.lang.String optlist)` Define a shading (color gradient) between two or more colors.
    `void` | `shfill(int shading)` Fill an area with a shading, based on a shading object.
    `void` | `show_xy(java.lang.String text, double x, double y)` Print text in the current font at the specified position.
    `void` | `show(java.lang.String text)` Print text in the current font and size at the current position.
    `void` | `skew(double alpha, double beta)` Skew the coordinate system.
    `double` | `stringwidth(java.lang.String text, int font, double fontsize)` Calculate the width of text in an arbitrary font.
    `void` | `stroke()` Stroke the path with the current color and line width, and clear it.
    `void` | `suspend_page(java.lang.String optlist)` Suspend the current page so that it can later be resumed.
    `void` | `translate(double tx, double ty)` Translate the origin of the coordinate system.

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

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

- - ### Constructor Detail

    - #### pdflib

          public pdflib()
                 throws PDFlibException

      Create a new PDFlib object.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

  - ### Method Detail

    - #### activate_item

          public final void activate_item(int id)
                                   throws PDFlibException

      Activate a previously created structure element or other content item.
      Parameters:
        `id` - id
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_nameddest

          public final void add_nameddest(java.lang.String name,
                                          java.lang.String optlist)
                                   throws PDFlibException

      Create a named destination on a page in the document.
      Parameters:
        `name` - name
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_path_point

          public final int add_path_point(int path,
                                          double x,
                                          double y,
                                          java.lang.String type,
                                          java.lang.String optlist)
                                   throws PDFlibException

      Add a point to a new or existing path object.
      Parameters:
        `path` - path
        `x` - x
        `y` - y
        `type` - type
        `optlist` - optlist
      Returns:
        A path handle which can be used in subsequent path-related calls.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_portfolio_file

          public final int add_portfolio_file(int folder,
                                              java.lang.String filename,
                                              java.lang.String optlist)
                                       throws PDFlibException

      Add a file to a portfolio folder or a package.
      Parameters:
        `folder` - folder
        `filename` - filename
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_portfolio_folder

          public final int add_portfolio_folder(int parent,
                                                java.lang.String foldername,
                                                java.lang.String optlist)
                                         throws PDFlibException

      Add a folder to a new or existing portfolio.
      Parameters:
        `parent` - parent
        `foldername` - foldername
        `optlist` - optlist
      Returns:
        A folder handle which can be used in subsequent portfolio-related calls.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_table_cell

          public final int add_table_cell(int table,
                                          int column,
                                          int row,
                                          java.lang.String text,
                                          java.lang.String optlist)
                                   throws PDFlibException

      Add a cell to a new or existing table.
      Parameters:
        `table` - table
        `column` - column
        `row` - row
        `text` - text
        `optlist` - optlist
      Returns:
        A table handle which can be used in subsequent table-related calls.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### add_textflow

          public final int add_textflow(int textflow,
                                        java.lang.String text,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Create a Textflow object, or add text and explicit options to an existing Textflow.
      Parameters:
        `textflow` - textflow
        `text` - text
        `optlist` - optlist
      Returns:
        A Textflow handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### align

          public final void align(double dx,
                                  double dy)
                           throws PDFlibException

      Align the coordinate system with a relative vector.
      Parameters:
        `dx` - dx
        `dy` - dy
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### arc

          public final void arc(double x,
                                double y,
                                double r,
                                double alpha,
                                double beta)
                         throws PDFlibException

      Draw a counterclockwise circular arc segment.
      Parameters:
        `x` - x
        `y` - y
        `r` - r
        `alpha` - alpha
        `beta` - beta
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### arcn

          public final void arcn(double x,
                                 double y,
                                 double r,
                                 double alpha,
                                 double beta)
                          throws PDFlibException

      Draw a clockwise circular arc segment.
      Parameters:
        `x` - x
        `y` - y
        `r` - r
        `alpha` - alpha
        `beta` - beta
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_document

          public final int begin_document(java.lang.String filename,
                                          java.lang.String optlist)
                                   throws PDFlibException

      Create a new PDF file subject to various options.
      Parameters:
        `filename` - filename
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_dpart

          public final void begin_dpart(java.lang.String optlist)
                                 throws PDFlibException

      Create a new node in the document part hierarchy (requires PDF/VT or PDF 2.0).
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_font

          public final void begin_font(java.lang.String fontname,
                                       double a,
                                       double b,
                                       double c,
                                       double d,
                                       double e,
                                       double f,
                                       java.lang.String optlist)
                                throws PDFlibException

      Start a Type 3 font definition.
      Parameters:
        `fontname` - fontname
        `a` - a
        `b` - b
        `c` - c
        `d` - d
        `e` - e
        `f` - f
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_glyph_ext

          public final void begin_glyph_ext(int uv,
                                            java.lang.String optlist)
                                     throws PDFlibException

      Start a glyph definition for a Type 3 font.
      Parameters:
        `uv` - uv
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_item

          public final int begin_item(java.lang.String tagname,
                                      java.lang.String optlist)
                               throws PDFlibException

      Open a structure element or other content item with attributes supplied as options.
      Parameters:
        `tagname` - tagname
        `optlist` - optlist
      Returns:
        An item handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_layer

          public final void begin_layer(int layer)
                                 throws PDFlibException

      Start a layer for subsequent output on the page.
      Parameters:
        `layer` - layer
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_mc

          public final void begin_mc(java.lang.String tagname,
                                     java.lang.String optlist)
                              throws PDFlibException

      Begin a marked content sequence with optional properties.
      Parameters:
        `tagname` - tagname
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_page_ext

          public final void begin_page_ext(double width,
                                           double height,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Add a new page to the document, and specify various options.
      Parameters:
        `width` - width
        `height` - height
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_pattern_ext

          public final int begin_pattern_ext(double width,
                                             double height,
                                             java.lang.String optlist)
                                      throws PDFlibException

      Start a pattern definition with options.
      Parameters:
        `width` - width
        `height` - height
        `optlist` - optlist
      Returns:
        A pattern handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### begin_template_ext

          public final int begin_template_ext(double width,
                                              double height,
                                              java.lang.String optlist)
                                       throws PDFlibException

      Start a template definition.
      Parameters:
        `width` - width
        `height` - height
        `optlist` - optlist
      Returns:
        A template handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### circle

          public final void circle(double x,
                                   double y,
                                   double r)
                            throws PDFlibException

      Draw a circle.
      Parameters:
        `x` - x
        `y` - y
        `r` - r
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### circular_arc

          public final void circular_arc(double x1,
                                         double y1,
                                         double x2,
                                         double y2)
                                  throws PDFlibException

      Draw a circular arc segment defined by three points.
      Parameters:
        `x1` - x1
        `y1` - y1
        `x2` - x2
        `y2` - y2
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### clip

          public final void clip()
                          throws PDFlibException

      Use the current path as clipping path, and terminate the path.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### close_font

          public final void close_font(int font)
                                throws PDFlibException

      Close an open font handle which has not yet been used in the document.
      Parameters:
        `font` - font
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### close_graphics

          public final void close_graphics(int graphics)
                                    throws PDFlibException

      Close vector graphics.
      Parameters:
        `graphics` - graphics
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### close_image

          public final void close_image(int image)
                                 throws PDFlibException

      Close an image or template.
      Parameters:
        `image` - image
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### close_pdi_document

          public final void close_pdi_document(int doc)
                                        throws PDFlibException

      Close all open PDI page handles, and close the input PDF document.
      Parameters:
        `doc` - doc
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### close_pdi_page

          public final void close_pdi_page(int page)
                                    throws PDFlibException

      Close the page handle and free all page-related resources.
      Parameters:
        `page` - page
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### closepath

          public final void closepath()
                               throws PDFlibException

      Close the current path.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### closepath_fill_stroke

          public final void closepath_fill_stroke()
                                           throws PDFlibException

      Close the path, fill, and stroke it.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### closepath_stroke

          public final void closepath_stroke()
                                      throws PDFlibException

      Close the path, and stroke it.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### concat

          public final void concat(double a,
                                   double b,
                                   double c,
                                   double d,
                                   double e,
                                   double f)
                            throws PDFlibException

      Apply a transformation matrix to the current coordinate system.
      Parameters:
        `a` - a
        `b` - b
        `c` - c
        `d` - d
        `e` - e
        `f` - f
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### continue_text

          public final void continue_text(java.lang.String text)
                                   throws PDFlibException

      Print text at the next line.
      Parameters:
        `text` - text
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### convert_to_unicode

          public final java.lang.String convert_to_unicode(java.lang.String inputformat,
                                                           byte[] inputstring,
                                                           java.lang.String optlist)
                                                    throws PDFlibException

      Convert a string in an arbitrary encoding to a Unicode string in various formats.
      Specified by:
        `convert_to_unicode` in interface `IpCOS`
      Parameters:
        `inputformat` - inputformat
        `inputstring` - inputstring
        `optlist` - optlist
      Returns:
        The converted Unicode string.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_3dview

          public final int create_3dview(java.lang.String username,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Create a 3D view.
      Parameters:
        `username` - username
        `optlist` - optlist
      Returns:
        A 3D view handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_action

          public final int create_action(java.lang.String type,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Create an action which can be applied to various objects and events.
      Parameters:
        `type` - type
        `optlist` - optlist
      Returns:
        An action handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_annotation

          public final void create_annotation(double llx,
                                              double lly,
                                              double urx,
                                              double ury,
                                              java.lang.String type,
                                              java.lang.String optlist)
                                       throws PDFlibException

      Create an annotation on the current page.
      Parameters:
        `llx` - llx
        `lly` - lly
        `urx` - urx
        `ury` - ury
        `type` - type
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_devicen

          public final int create_devicen(java.lang.String optlist)
                                   throws PDFlibException

      Create a DeviceN colorspace with an arbitrary number of color components.
      Parameters:
        `optlist` - optlist
      Returns:
        A DeviceN color space handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_bookmark

          public final int create_bookmark(java.lang.String text,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Create a bookmark subject to various options.
      Parameters:
        `text` - text
        `optlist` - optlist
      Returns:
        A handle for the generated bookmark.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_field

          public final void create_field(double llx,
                                         double lly,
                                         double urx,
                                         double ury,
                                         java.lang.String name,
                                         java.lang.String type,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Create a new form field or fill an imported form field.
      Parameters:
        `llx` - llx
        `lly` - lly
        `urx` - urx
        `ury` - ury
        `name` - name
        `type` - type
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_fieldgroup

          public final void create_fieldgroup(java.lang.String name,
                                              java.lang.String optlist)
                                       throws PDFlibException

      Create a form field group subject to various options.
      Parameters:
        `name` - name
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_gstate

          public final int create_gstate(java.lang.String optlist)
                                  throws PDFlibException

      Create a graphics state object subject to various options.
      Parameters:
        `optlist` - optlist
      Returns:
        A graphic state handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_pvf

          public final void create_pvf(java.lang.String filename,
                                       byte[] data,
                                       java.lang.String optlist)
                                throws PDFlibException

      Create a named virtual read-only file from data provided in memory.
      Specified by:
        `create_pvf` in interface `IpCOS`
      Parameters:
        `filename` - filename
        `data` - data
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### create_textflow

          public final int create_textflow(java.lang.String text,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Create a Textflow object from text contents, inline options, and explicit options.
      Parameters:
        `text` - text
        `optlist` - optlist
      Returns:
        A Textflow handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### curveto

          public final void curveto(double x1,
                                    double y1,
                                    double x2,
                                    double y2,
                                    double x3,
                                    double y3)
                             throws PDFlibException

      Draw a Bezier curve from the current point, using 3 more control points.
      Parameters:
        `x1` - x1
        `y1` - y1
        `x2` - x2
        `y2` - y2
        `x3` - x3
        `y3` - y3
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### define_layer

          public final int define_layer(java.lang.String name,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Create a new layer definition.
      Parameters:
        `name` - name
        `optlist` - optlist
      Returns:
        A layer handle which can be used in subsequent layer-related calls.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### delete_path

          public final void delete_path(int path)
                                 throws PDFlibException

      Delete a path object.
      Parameters:
        `path` - path
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### delete_pvf

          public final int delete_pvf(java.lang.String filename)
                               throws PDFlibException

      Delete a named virtual file and free its data structures (but not the contents).
      Specified by:
        `delete_pvf` in interface `IpCOS`
      Parameters:
        `filename` - filename
      Returns:
        -1 if the virtual file exists but is locked, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### delete_table

          public final void delete_table(int table,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Delete a table and all associated data structures.
      Parameters:
        `table` - table
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### delete_textflow

          public final void delete_textflow(int textflow)
                                     throws PDFlibException

      Delete a textflow and all associated data structures.
      Parameters:
        `textflow` - textflow
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### download

          public final int download(java.lang.String filename,
                                    java.lang.String optlist)
                             throws PDFlibException

      Download data from a network resource and store it in a disk-based or virtual file.
      Parameters:
        `filename` - filename
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### draw_path

          public final void draw_path(int path,
                                      double x,
                                      double y,
                                      java.lang.String optlist)
                               throws PDFlibException

      Draw a path object.
      Parameters:
        `path` - path
        `x` - x
        `y` - y
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### ellipse

          public final void ellipse(double x,
                                    double y,
                                    double rx,
                                    double ry)
                             throws PDFlibException

      Draw an ellipse.
      Parameters:
        `x` - x
        `y` - y
        `rx` - rx
        `ry` - ry
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### elliptical_arc

          public final void elliptical_arc(double x,
                                           double y,
                                           double rx,
                                           double ry,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Draw an elliptical arc segment from the current point.
      Parameters:
        `x` - x
        `y` - y
        `rx` - rx
        `ry` - ry
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### encoding_set_char

          public final void encoding_set_char(java.lang.String encoding,
                                              int slot,
                                              java.lang.String glyphname,
                                              int uv)
                                       throws PDFlibException

      Add a glyph name and/or Unicode value to a custom 8-bit encoding.
      Parameters:
        `encoding` - encoding
        `slot` - slot
        `glyphname` - glyphname
        `uv` - uv
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_document

          public final void end_document(java.lang.String optlist)
                                  throws PDFlibException

      Close the generated PDF document and apply various options.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_dpart

          public final void end_dpart(java.lang.String optlist)
                               throws PDFlibException

      Close a node in the document part hierarchy (requires PDF/VT or PDF 2.0).
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_font

          public final void end_font()
                              throws PDFlibException

      Terminate a Type 3 font definition.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_glyph

          public final void end_glyph()
                               throws PDFlibException

      Terminate a glyph definition for a Type 3 font.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_item

          public final void end_item(int id)
                              throws PDFlibException

      Close a structure element or other content item.
      Parameters:
        `id` - id
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_layer

          public final void end_layer()
                               throws PDFlibException

      Deactivate all active layers.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_mc

          public final void end_mc()
                            throws PDFlibException

      End the least recently opened marked content sequence.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_page_ext

          public final void end_page_ext(java.lang.String optlist)
                                  throws PDFlibException

      Finish a page, and apply various options.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_pattern

          public final void end_pattern()
                                 throws PDFlibException

      Finish a pattern definition.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### end_template_ext

          public final void end_template_ext(double width,
                                             double height)
                                      throws PDFlibException

      Finish a template definition.
      Parameters:
        `width` - width
        `height` - height
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### endpath

          public final void endpath()
                             throws PDFlibException

      End the current path without filling or stroking it.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill

          public final void fill()
                          throws PDFlibException

      Fill the interior of the path with the current fill color.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill_graphicsblock

          public final int fill_graphicsblock(int page,
                                              java.lang.String blockname,
                                              int graphics,
                                              java.lang.String optlist)
                                       throws PDFlibException

      Fill a graphics block with variable data according to its properties.
      Parameters:
        `page` - page
        `blockname` - blockname
        `graphics` - graphics
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill_imageblock

          public final int fill_imageblock(int page,
                                           java.lang.String blockname,
                                           int image,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Fill an image block with variable data according to its properties.
      Parameters:
        `page` - page
        `blockname` - blockname
        `image` - image
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill_pdfblock

          public final int fill_pdfblock(int page,
                                         java.lang.String blockname,
                                         int contents,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Fill a PDF block with variable data according to its properties.
      Parameters:
        `page` - page
        `blockname` - blockname
        `contents` - contents
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill_stroke

          public final void fill_stroke()
                                 throws PDFlibException

      Fill a Textline or Textflow Block with variable data according to its properties.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fill_textblock

          public final int fill_textblock(int page,
                                          java.lang.String blockname,
                                          java.lang.String text,
                                          java.lang.String optlist)
                                   throws PDFlibException

      Fill a Textline or Textflow Block with variable data according to its properties.
      Parameters:
        `page` - page
        `blockname` - blockname
        `text` - text
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_graphics

          public final void fit_graphics(int graphics,
                                         double x,
                                         double y,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Place vector graphics on a content stream, subject to various options.
      Parameters:
        `graphics` - graphics
        `x` - x
        `y` - y
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_image

          public final void fit_image(int image,
                                      double x,
                                      double y,
                                      java.lang.String optlist)
                               throws PDFlibException

      Place an image or template on the page, subject to various options.
      Parameters:
        `image` - image
        `x` - x
        `y` - y
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_pdi_page

          public final void fit_pdi_page(int page,
                                         double x,
                                         double y,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Place an imported PDF page on the page subject to various options.
      Parameters:
        `page` - page
        `x` - x
        `y` - y
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_table

          public final java.lang.String fit_table(int table,
                                                  double llx,
                                                  double lly,
                                                  double urx,
                                                  double ury,
                                                  java.lang.String optlist)
                                           throws PDFlibException

      Fully or partially place a table on the page.
      Parameters:
        `table` - table
        `llx` - llx
        `lly` - lly
        `urx` - urx
        `ury` - ury
        `optlist` - optlist
      Returns:
        A string which specifies the reason for returning.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_textflow

          public final java.lang.String fit_textflow(int textflow,
                                                     double llx,
                                                     double lly,
                                                     double urx,
                                                     double ury,
                                                     java.lang.String optlist)
                                              throws PDFlibException

      Format the next portion of a Textflow.
      Parameters:
        `textflow` - textflow
        `llx` - llx
        `lly` - lly
        `urx` - urx
        `ury` - ury
        `optlist` - optlist
      Returns:
        A string which specifies the reason for returning.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### fit_textline

          public final void fit_textline(java.lang.String text,
                                         double x,
                                         double y,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Place a single line of text at position (x, y) subject to various options.
      Parameters:
        `text` - text
        `x` - x
        `y` - y
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### get_apiname

          public final java.lang.String get_apiname()

      Get the name of the API method which threw the last exception or failed.
      Specified by:
        `get_apiname` in interface `IpCOS`
      Returns:
        Name of an API method.

    - #### get_buffer

          public final byte[] get_buffer()
                                  throws PDFlibException

      Get the contents of the PDF output buffer.
      Returns:
        A buffer full of binary PDF data for consumption by the client.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### get_errmsg

          public final java.lang.String get_errmsg()

      Get the text of the last thrown exception or the reason of a failed method call.
      Specified by:
        `get_errmsg` in interface `IpCOS`
      Returns:
        Text containing the description of the most recent error condition.

    - #### get_errnum

          public final int get_errnum()

      Get the number of the last thrown exception or the reason of a failed method call.
      Specified by:
        `get_errnum` in interface `IpCOS`
      Returns:
        The error code of the most recent error condition.

    - #### get_option

          public final double get_option(java.lang.String keyword,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Retrieve some option or other value.
      Parameters:
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some option value as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### get_string

          public final java.lang.String get_string(int idx,
                                                   java.lang.String optlist)
                                            throws PDFlibException

      Retrieve a string value.
      Parameters:
        `idx` - idx
        `optlist` - optlist
      Returns:
        a string identified by a string index returned by another method.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_font

          public final double info_font(int font,
                                        java.lang.String keyword,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Query detailed information about a loaded font.
      Parameters:
        `font` - font
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some font property as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_graphics

          public final double info_graphics(int graphics,
                                            java.lang.String keyword,
                                            java.lang.String optlist)
                                     throws PDFlibException

      Format vector graphics and query metrics and other properties.
      Parameters:
        `graphics` - graphics
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some graphics metrics as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_image

          public final double info_image(int image,
                                         java.lang.String keyword,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Format an image and query metrics and other image properties.
      Parameters:
        `image` - image
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some image metrics as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_matchbox

          public final double info_matchbox(java.lang.String boxname,
                                            int num,
                                            java.lang.String keyword)
                                     throws PDFlibException

      Query information about a matchbox on the current page.
      Parameters:
        `boxname` - boxname
        `num` - num
        `keyword` - keyword
      Returns:
        The value of some matchbox parameter as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_path

          public final double info_path(int path,
                                        java.lang.String keyword,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Query the results of drawing a path object without actually drawing it.
      Parameters:
        `path` - path
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some geometrical values as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_pdi_page

          public final double info_pdi_page(int page,
                                            java.lang.String keyword,
                                            java.lang.String optlist)
                                     throws PDFlibException

      Perform formatting calculations for a PDI page and query the resulting metrics.
      Parameters:
        `page` - page
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some page metrics as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_pvf

          public final double info_pvf(java.lang.String filename,
                                       java.lang.String keyword)
                                throws PDFlibException

      Query properties of a virtual file or the PDFlib Virtual Filesystem (PVF).
      Specified by:
        `info_pvf` in interface `IpCOS`
      Parameters:
        `filename` - filename
        `keyword` - keyword
      Returns:
        The value of some file parameter as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_table

          public final double info_table(int table,
                                         java.lang.String keyword)
                                  throws PDFlibException

      Query table information related to the most recently placed table instance.
      Parameters:
        `table` - table
        `keyword` - keyword
      Returns:
        The value of some table parameter as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_textflow

          public final double info_textflow(int textflow,
                                            java.lang.String keyword)
                                     throws PDFlibException

      Query the current state of a Textflow.
      Parameters:
        `textflow` - textflow
        `keyword` - keyword
      Returns:
        The value of some Textflow parameter as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### info_textline

          public final double info_textline(java.lang.String text,
                                            java.lang.String keyword,
                                            java.lang.String optlist)
                                     throws PDFlibException

      Perform textline formatting without creating output and query the resulting metrics.
      Parameters:
        `text` - text
        `keyword` - keyword
        `optlist` - optlist
      Returns:
        The value of some text metric value as requested by keyword.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### lineto

          public final void lineto(double x,
                                   double y)
                            throws PDFlibException

      Draw a line from the current point to another point.
      Parameters:
        `x` - x
        `y` - y
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_3ddata

          public final int load_3ddata(java.lang.String filename,
                                       java.lang.String optlist)
                                throws PDFlibException

      Load a 3D model from a disk-based or virtual file.
      Parameters:
        `filename` - filename
        `optlist` - optlist
      Returns:
        A 3D handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_asset

          public final int load_asset(java.lang.String type,
                                      java.lang.String filename,
                                      java.lang.String optlist)
                               throws PDFlibException

      Load a multimedia asset or file attachment from a file or URL.
      Parameters:
        `type` - type
        `filename` - filename
        `optlist` - optlist
      Returns:
        An asset handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_font

          public final int load_font(java.lang.String fontname,
                                     java.lang.String encoding,
                                     java.lang.String optlist)
                              throws PDFlibException

      Search for a font and prepare it for later use.
      Parameters:
        `fontname` - fontname
        `encoding` - encoding
        `optlist` - optlist
      Returns:
        A font handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_graphics

          public final int load_graphics(java.lang.String type,
                                         java.lang.String filename,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Open a disk-based or virtual vector graphics file subject to various options.
      Parameters:
        `type` - type
        `filename` - filename
        `optlist` - optlist
      Returns:
        A graphics handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_iccprofile

          public final int load_iccprofile(java.lang.String profilename,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Search for an ICC profile, and prepare it for later use.
      Parameters:
        `profilename` - profilename
        `optlist` - optlist
      Returns:
        A profile handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### load_image

          public final int load_image(java.lang.String imagetype,
                                      java.lang.String filename,
                                      java.lang.String optlist)
                               throws PDFlibException

      Open a disk-based or virtual image file subject to various options.
      Parameters:
        `imagetype` - imagetype
        `filename` - filename
        `optlist` - optlist
      Returns:
        An image handle, or -1 on error.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### makespotcolor

          public final int makespotcolor(java.lang.String spotname)
                                  throws PDFlibException

      Find a built-in spot color name, or make a named spot color from the current fill color.
      Parameters:
        `spotname` - spotname
      Returns:
        A color handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### mc_point

          public final void mc_point(java.lang.String tagname,
                                     java.lang.String optlist)
                              throws PDFlibException

      Add a marked content point with optional properties.
      Parameters:
        `tagname` - tagname
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### moveto

          public final void moveto(double x,
                                   double y)
                            throws PDFlibException

      Set the current point for graphics output.
      Parameters:
        `x` - x
        `y` - y
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### open_pdi_document

          public final int open_pdi_document(java.lang.String filename,
                                             java.lang.String optlist)
                                      throws PDFlibException

      Open a disk-based or virtual PDF document and prepare it for later use.
      Parameters:
        `filename` - filename
        `optlist` - optlist
      Returns:
        A PDI document handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### open_pdi_page

          public final int open_pdi_page(int doc,
                                         int pagenumber,
                                         java.lang.String optlist)
                                  throws PDFlibException

      Prepare a page for later use with PDF_fit_pdi_page().
      Parameters:
        `doc` - doc
        `pagenumber` - pagenumber
        `optlist` - optlist
      Returns:
        A page handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### pcos_get_number

          public final double pcos_get_number(int doc,
                                              java.lang.String path)
                                       throws PDFlibException

      Get the value of a pCOS path with type number or boolean.
      Specified by:
        `pcos_get_number` in interface `IpCOS`
      Parameters:
        `doc` - doc
        `path` - path
      Returns:
        The numerical value of the object identified by the pCOS path.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### pcos_get_string

          public final java.lang.String pcos_get_string(int doc,
                                                        java.lang.String path)
                                                 throws PDFlibException

      Get the value of a pCOS path with type name, number, string, or boolean.
      Specified by:
        `pcos_get_string` in interface `IpCOS`
      Parameters:
        `doc` - doc
        `path` - path
      Returns:
        A string with the value of the object identified by the pCOS path.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### pcos_get_stream

          public final byte[] pcos_get_stream(int doc,
                                              java.lang.String optlist,
                                              java.lang.String path)
                                       throws PDFlibException

      Get the contents of a pCOS path with type stream, fstream, or string.
      Specified by:
        `pcos_get_stream` in interface `IpCOS`
      Parameters:
        `doc` - doc
        `optlist` - optlist
        `path` - path
      Returns:
        The unencrypted data contained in the stream or string.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### poca_delete

          public final void poca_delete(int container,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Delete a PDF container object.
      Parameters:
        `container` - container
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### poca_insert

          public final void poca_insert(int container,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Insert a simple or container object in a PDF container object.
      Parameters:
        `container` - container
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### poca_new

          public final int poca_new(java.lang.String optlist)
                             throws PDFlibException

      Create a new PDF container object of type dictionary or array and insert objects.
      Parameters:
        `optlist` - optlist
      Returns:
        A container handle which can be used until it is deleted with PDF_poca_delete().
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### poca_remove

          public final void poca_remove(int container,
                                        java.lang.String optlist)
                                 throws PDFlibException

      Remove a simple or container object from a PDF container object.
      Parameters:
        `container` - container
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### process_pdi

          public final int process_pdi(int doc,
                                       int page,
                                       java.lang.String optlist)
                                throws PDFlibException

      Process certain elements of an imported PDF document.
      Parameters:
        `doc` - doc
        `page` - page
        `optlist` - optlist
      Returns:
        -1 on error, and 1 otherwise.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### rect

          public final void rect(double x,
                                 double y,
                                 double width,
                                 double height)
                          throws PDFlibException

      Draw a rectangle.
      Parameters:
        `x` - x
        `y` - y
        `width` - width
        `height` - height
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### restore

          public final void restore()
                             throws PDFlibException

      Restore the most recently saved graphics state from the stack.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### resume_page

          public final void resume_page(java.lang.String optlist)
                                 throws PDFlibException

      Resume a page to add more content to it.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### rotate

          public final void rotate(double phi)
                            throws PDFlibException

      Rotate the coordinate system.
      Parameters:
        `phi` - phi
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### save

          public final void save()
                          throws PDFlibException

      Save the current graphics state to a stack.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### scale

          public final void scale(double sx,
                                  double sy)
                           throws PDFlibException

      Scale the coordinate system.
      Parameters:
        `sx` - sx
        `sy` - sy
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_graphics_option

          public final void set_graphics_option(java.lang.String optlist)
                                         throws PDFlibException

      Set one or more graphics appearance options.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_gstate

          public final void set_gstate(int gstate)
                                throws PDFlibException

      Activate a graphics state object.
      Parameters:
        `gstate` - gstate
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_info

          public final void set_info(java.lang.String key,
                                     java.lang.String value)
                              throws PDFlibException

      Fill document information field key with value.
      Parameters:
        `key` - key
        `value` - value
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_layer_dependency

          public final void set_layer_dependency(java.lang.String type,
                                                 java.lang.String optlist)
                                          throws PDFlibException

      Define layer relationships.
      Parameters:
        `type` - type
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_option

          public final void set_option(java.lang.String optlist)
                                throws PDFlibException

      Set one or more global options.
      Specified by:
        `set_option` in interface `IpCOS`
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_text_option

          public final void set_text_option(java.lang.String optlist)
                                     throws PDFlibException

      Set one or more text filter or text appearance options for simple text output methods.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### set_text_pos

          public final void set_text_pos(double x,
                                         double y)
                                  throws PDFlibException

      Set the position for simple text output on the page.
      Parameters:
        `x` - x
        `y` - y
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### setcolor

          public final void setcolor(java.lang.String fstype,
                                     java.lang.String colorspace,
                                     double c1,
                                     double c2,
                                     double c3,
                                     double c4)
                              throws PDFlibException

      Set the color space and color for the graphics and text state..
      Parameters:
        `fstype` - fstype
        `colorspace` - colorspace
        `c1` - c1
        `c2` - c2
        `c3` - c3
        `c4` - c4
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### setfont

          public final void setfont(int font,
                                    double fontsize)
                             throws PDFlibException

      Set the current font in the specified size.
      Parameters:
        `font` - font
        `fontsize` - fontsize
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### setlinewidth

          public final void setlinewidth(double width)
                                  throws PDFlibException

      Set the current linewidth.
      Parameters:
        `width` - width
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### setmatrix

          public final void setmatrix(double a,
                                      double b,
                                      double c,
                                      double d,
                                      double e,
                                      double f)
                               throws PDFlibException

      Explicitly set the current transformation matrix.
      Parameters:
        `a` - a
        `b` - b
        `c` - c
        `d` - d
        `e` - e
        `f` - f
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### shading

          public final int shading(java.lang.String type,
                                   double x0,
                                   double y0,
                                   double x1,
                                   double y1,
                                   double c1,
                                   double c2,
                                   double c3,
                                   double c4,
                                   java.lang.String optlist)
                            throws PDFlibException

      Define a shading (color gradient) between two or more colors.
      Parameters:
        `type` - type
        `x0` - x0
        `y0` - y0
        `x1` - x1
        `y1` - y1
        `c1` - c1
        `c2` - c2
        `c3` - c3
        `c4` - c4
        `optlist` - optlist
      Returns:
        A shading handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### shading_pattern

          public final int shading_pattern(int shading,
                                           java.lang.String optlist)
                                    throws PDFlibException

      Define a shading pattern using a shading object.
      Parameters:
        `shading` - shading
        `optlist` - optlist
      Returns:
        A pattern handle.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### shfill

          public final void shfill(int shading)
                            throws PDFlibException

      Fill an area with a shading, based on a shading object.
      Parameters:
        `shading` - shading
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### show

          public final void show(java.lang.String text)
                          throws PDFlibException

      Print text in the current font and size at the current position.
      Parameters:
        `text` - text
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### show_xy

          public final void show_xy(java.lang.String text,
                                    double x,
                                    double y)
                             throws PDFlibException

      Print text in the current font at the specified position.
      Parameters:
        `text` - text
        `x` - x
        `y` - y
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### skew

          public final void skew(double alpha,
                                 double beta)
                          throws PDFlibException

      Skew the coordinate system.
      Parameters:
        `alpha` - alpha
        `beta` - beta
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### stringwidth

          public final double stringwidth(java.lang.String text,
                                          int font,
                                          double fontsize)
                                   throws PDFlibException

      Calculate the width of text in an arbitrary font.
      Parameters:
        `text` - text
        `font` - font
        `fontsize` - fontsize
      Returns:
        The width of text.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### stroke

          public final void stroke()
                            throws PDFlibException

      Stroke the path with the current color and line width, and clear it.
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### suspend_page

          public final void suspend_page(java.lang.String optlist)
                                  throws PDFlibException

      Suspend the current page so that it can later be resumed.
      Parameters:
        `optlist` - optlist
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### translate

          public final void translate(double tx,
                                      double ty)
                               throws PDFlibException

      Translate the origin of the coordinate system.
      Parameters:
        `tx` - tx
        `ty` - ty
      Throws:
        `PDFlibException` - PDF output cannot be finished after an exception.

    - #### delete

          public final void delete()

      Delete a PDFlib object and free all internal resources. Never throws any PDFlib exception.
      Specified by:
        `delete` in interface `IpCOS`

    - #### pcos_open_document

          public int pcos_open_document(java.lang.String filename,
                                        java.lang.String optlist)
                                 throws java.lang.Exception

      Open a disk-based or virtual PDF document via the IpCOS interface.
      Specified by:
        `pcos_open_document` in interface `IpCOS`
      Parameters:
        `filename` - The full path name of the PDF file to be opened. The file will be searched by means of the SearchPath resource.
        `optlist` - An option list specifying document options.
      Returns:
        A document handle.
      Throws:
        `java.lang.Exception` - PDF output cannot be finished after an exception.

    - #### pcos_close_document

          public void pcos_close_document(int doc,
                                          java.lang.String optlist)
                                   throws java.lang.Exception

      Close PLOP input document via the IpCOS interface.
      Specified by:
        `pcos_close_document` in interface `IpCOS`
      Parameters:
        `doc` - A valid document handle obtained with open_document().
        `optlist` - An option list specifying document options.
      Throws:
        `java.lang.Exception` - PDF output cannot be finished after an exception.