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 Details

    • TEXT_HIGHLIGHT_COLOUR

      public static final Integer TEXT_HIGHLIGHT_COLOUR
      This flag will allow JPedal to use the specified colour for highlighting text.
    • DISPLAY_INVISIBLE_TEXT

      public static final Integer DISPLAY_INVISIBLE_TEXT
      This flag will allow JPedal to display invisible text in current fill colour.
    • CACHE_LARGE_FONTS

      public static final Integer CACHE_LARGE_FONTS
      This flag 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
      This flag will allow JPedal to print all text fonts as Java text printing.
    • TEXT_INVERTED_COLOUR

      public static final Integer TEXT_INVERTED_COLOUR
      This flag 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
      This flag 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
      This flag 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
      This flag will tell JPedal to to use JPedalSettings.EXTRACT_AT_PAGE_SIZE instead of JPedalSettings.EXTRACT_AT_BEST_QUALITY_MAXSCALING.
    • INVERT_HIGHLIGHT

      public static final Integer INVERT_HIGHLIGHT
      This flag will allow JPedal to invert the color values inside of highlighted areas.
    • IGNORE_FORMS_ON_PRINT

      public static final Integer IGNORE_FORMS_ON_PRINT
      This flag 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
      This flag 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
      This flag 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
      This flag 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
      This flag 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.
      This flag 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
      This flag 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
      This flag will allow JPedal to change the display areas background color to the specified value.
    • REPLACEMENT_COLOR_THRESHOLD

      public static final Integer REPLACEMENT_COLOR_THRESHOLD
      This flag 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
      This flag 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
      This flag 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
      This flag 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
      This flag will allow JPedal to highlight visible and interactable form fields.
    • HIGHLIGHT_FORM_FIELDS_COLOR

      public static final Integer HIGHLIGHT_FORM_FIELDS_COLOR
      This flag 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
      This flag 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
      This flag 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
      This flag 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
      This flag 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
    • HIDE_LINE_WEIGHTS

      public static final Integer HIDE_LINE_WEIGHTS
      This flag will allow JPedal to render shapes with a stroke of 1px width after scaling