Class JPedalSettings

java.lang.Object
org.jpedal.constants.JPedalSettings

public final class JPedalSettings extends Object
Used by JPedal for constants which allow user to set flags
This is achieved with a PdfDecoder method modifyJPedalParameters(Map values).

How does it work?

The example code below gives examples of how to use this function and a full list of valid settings. It should be called before any files are opened.

Map mapValues=new HashMap();
mapValues.put(JPedalSettings.DISPLAY_INVISIBLE_TEXT,Boolean.TRUE);
mapValues.put(JPedalSettings.TEXT_HIGHLIGHT_COLOUR, Color.GREEN);
mapValues.put(JPedalSettings.CACHE_LARGE_FONTS,new Integer(65536));
//exception will be thrown if invalid value passed
PdfDecoder.modifyJPedalParameters(mapValues);

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Integer
    For use with converting to Image, this key will allow JPedal to generate pages smaller than the PDFs page size when using HiRes image conversion.
    static final Integer
    For use with all JPedal functionality, this key will allow JPedal to cache large fonts to avoid big memory hit.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to replace the color of the shapes on the page in the same way the text color is changed.
    static final Integer
    For use with Viewer, this key will allow JPedal to change the display areas background color to the specified value.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to display invisible text in current fill colour.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to make adjustments to lines positioned at fractional pixel positions to improve appearance.
    static final Integer
    For use with converting to Image, this key will allow JPedal to limit the amount of scaling on Best quality to a given maximum.
    static final Integer
    For use with converting to Image, this key will allow JPedal to limit the amount of scaling on Best quality.
    static final Integer
    For use with Viewer, this key will allow JPedal to render the full page off-screen to improve performance of off-screen rendering but increases memory consumption.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to render shapes with a stroke of 1px width after scaling
    static final Integer
    For use with Viewer, this key will allow JPedal to highlight visible and interactable form fields.
    static final Integer
    For use with Viewer, this key will let you set the highlight color of form fields when using the JPedalSettings.HIGHLIGHT_FORM_FIELDS settings.
    static final Integer
    For use with Print, this key will allow JPedal to ignore the specified form types and subtypes when printing a PDF.
    static final Integer
    For use with Viewer, this key will allow JPedal to invert the color values inside of highlighted areas.
    static final Integer
    For use with Viewer, this key will allow JPedal to use off screen rendering techniques to improve rendering performance in the viewer.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to use the given color as the background color for the PDF pages.
    static final Integer
    For use with converting to Image, this key will tell JPedal to use JPedalSettings.EXTRACT_AT_PAGE_SIZE instead of JPedalSettings.EXTRACT_AT_BEST_QUALITY_MAXSCALING.
    static final Integer
    Deprecated.
    This value should no longer be used and instead JPedalSettings.TEXT_COLOR should be used.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to only replace text color if the color values go beyond a given threshold.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to use smoothing techniques to enhance the appearance of images.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to replace text color with the specified value or use the original color if a null object is provided.
    static final Integer
    For use with Viewer, this key will allow JPedal to use the specified colour for highlighting text.
    static final Integer
    For use with Viewer, this key will allow JPedal to set a color to be used for text when highlighted.
    static final Integer
    For use with Print, this key will allow JPedal to print all text fonts as Java text printing.
    static final Integer
    For use with Viewer, this key will allow JPedal to use the given color when a page that has not been rendered yet.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to convolution in image scaling to improve its final appearance.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to use int instead of float values for page sizes which can give better scaling on some PDF files.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to use soft-clipping when rendering images.
    static final Integer
    For use with Viewer, Print, and converting to Image, this key will allow JPedal to use soft-clipping when rendering shapes.
  • Method Summary

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TEXT_HIGHLIGHT_COLOUR

      public static final Integer TEXT_HIGHLIGHT_COLOUR
      For use with Viewer, this key will allow JPedal to use the specified colour for highlighting text.
    • DISPLAY_INVISIBLE_TEXT

      public static final Integer DISPLAY_INVISIBLE_TEXT
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to display invisible text in current fill colour.
    • CACHE_LARGE_FONTS

      public static final Integer CACHE_LARGE_FONTS
      For use with all JPedal functionality, this key will allow JPedal to cache large fonts to avoid big memory hit.
    • TEXT_PRINT_NON_EMBEDDED_FONTS

      public static final Integer TEXT_PRINT_NON_EMBEDDED_FONTS
      For use with Print, this key will allow JPedal to print all text fonts as Java text printing.
    • TEXT_INVERTED_COLOUR

      public static final Integer TEXT_INVERTED_COLOUR
      For use with Viewer, this key will allow JPedal to set a color to be used for text when highlighted.
    • EXTRACT_AT_BEST_QUALITY_MAXSCALING

      public static final Integer EXTRACT_AT_BEST_QUALITY_MAXSCALING
      For use with converting to Image, this key will allow JPedal to limit the amount of scaling on Best quality to a given maximum.
    • EXTRACT_AT_PAGE_SIZE

      public static final Integer EXTRACT_AT_PAGE_SIZE
      For use with converting to Image, this key will allow JPedal to limit the amount of scaling on Best quality. This value only has meaning if JPedalSettings.PAGE_SIZE_OVERRIDES_IMAGE has been set.
    • PAGE_SIZE_OVERRIDES_IMAGE

      public static final Integer PAGE_SIZE_OVERRIDES_IMAGE
      For use with converting to Image, this key will tell JPedal to use JPedalSettings.EXTRACT_AT_PAGE_SIZE instead of JPedalSettings.EXTRACT_AT_BEST_QUALITY_MAXSCALING.
    • INVERT_HIGHLIGHT

      public static final Integer INVERT_HIGHLIGHT
      For use with Viewer, this key will allow JPedal to invert the color values inside of highlighted areas.
    • IGNORE_FORMS_ON_PRINT

      public static final Integer IGNORE_FORMS_ON_PRINT
      For use with Print, this key will allow JPedal to ignore the specified form types and subtypes when printing a PDF.
    • ALLOW_PAGES_SMALLER_THAN_PAGE_SIZE

      public static final Integer ALLOW_PAGES_SMALLER_THAN_PAGE_SIZE
      For use with converting to Image, this key will allow JPedal to generate pages smaller than the PDFs page size when using HiRes image conversion.
    • PAGE_COLOR

      public static final Integer PAGE_COLOR
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to use the given color as the background color for the PDF pages.
    • UNDRAWN_PAGE_COLOR

      public static final Integer UNDRAWN_PAGE_COLOR
      For use with Viewer, this key will allow JPedal to use the given color when a page that has not been rendered yet.
    • TEXT_COLOR

      public static final Integer TEXT_COLOR
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to replace text color with the specified value or use the original color if a null object is provided.
    • REPLACE_TEXT_COLOR

      @Deprecated public static final Integer REPLACE_TEXT_COLOR
      Deprecated.
      This value should no longer be used and instead JPedalSettings.TEXT_COLOR should be used.
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to replace text color with the specified value or use the original color if a null object is provided.
    • CHANGE_LINEART

      public static final Integer CHANGE_LINEART
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to replace the color of the shapes on the page in the same way the text color is changed. This value only has meaning if JPedalSettings.TEXT_COLOR has been set.
    • DISPLAY_BACKGROUND

      public static final Integer DISPLAY_BACKGROUND
      For use with Viewer, this key will allow JPedal to change the display areas background color to the specified value.
    • REPLACEMENT_COLOR_THRESHOLD

      public static final Integer REPLACEMENT_COLOR_THRESHOLD
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to only replace text color if the color values go beyond a given threshold. This value only has meaning if JPedalSettings.TEXT_COLOR has been set.
    • ENHANCE_FRACTIONAL_LINES

      public static final Integer ENHANCE_FRACTIONAL_LINES
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to make adjustments to lines positioned at fractional pixel positions to improve appearance.
    • USE_INT_PAGE_SIZE_FOR_SCALING

      public static final Integer USE_INT_PAGE_SIZE_FOR_SCALING
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to use int instead of float values for page sizes which can give better scaling on some PDF files.
    • USE_SOFTCLIP_FOR_SHAPES

      public static final Integer USE_SOFTCLIP_FOR_SHAPES
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to use soft-clipping when rendering shapes. Hard clipping clips an image where whole pixels are either in or out of the clip, this is how Java clips. Soft clipping clips an image by allowing the boundary pixels to have its alpha adjusted based on the portion in the clip. The effect of soft clipping is to give the clipped shapes a smoother, less jagged, edge.
    • HIGHLIGHT_FORM_FIELDS

      public static final Integer HIGHLIGHT_FORM_FIELDS
      For use with Viewer, this key will allow JPedal to highlight visible and interactable form fields.
    • HIGHLIGHT_FORM_FIELDS_COLOR

      public static final Integer HIGHLIGHT_FORM_FIELDS_COLOR
      For use with Viewer, this key will let you set the highlight color of form fields when using the JPedalSettings.HIGHLIGHT_FORM_FIELDS settings.
    • OFF_SCREEN_RENDERING

      public static final Integer OFF_SCREEN_RENDERING
      For use with Viewer, this key will allow JPedal to use off screen rendering techniques to improve rendering performance in the viewer. This can improve performance in the viewer when using features such as text highlighting that update the display without altering the portion of the page displayed.
    • USE_CONVOLUTION

      public static final Integer USE_CONVOLUTION
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to convolution in image scaling to improve its final appearance.
    • USE_SOFTCLIP_FOR_IMAGES

      public static final Integer USE_SOFTCLIP_FOR_IMAGES
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to use soft-clipping when rendering images. Hard clipping clips an image where whole pixels are either in or out of the clip, this is how Java clips. Soft clipping clips an image by allowing the boundary pixels to have its alpha adjusted based on the portion in the clip. The effect of soft clipping is to give the clipped images a smoother, less jagged, edge.
    • SMOOTH_IMAGES

      public static final Integer SMOOTH_IMAGES
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to use smoothing techniques to enhance the appearance of images.
    • FULL_OFF_SCREEN_RENDERING

      public static final Integer FULL_OFF_SCREEN_RENDERING
      For use with Viewer, this key will allow JPedal to render the full page off-screen to improve performance of off-screen rendering but increases memory consumption.
    • HIDE_LINE_WEIGHTS

      public static final Integer HIDE_LINE_WEIGHTS
      For use with Viewer, Print, and converting to Image, this key will allow JPedal to render shapes with a stroke of 1px width after scaling